Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
INTBuilder
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chloe Dequeker
INTBuilder
Commits
e08ee47c
Commit
e08ee47c
authored
Oct 20, 2016
by
Chloe Dequeker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge getDataForComplex HCMD2 and original MAXDo
parent
173a10b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
81 deletions
+28
-81
INTBuilder.c
src/INTBuilder.c
+27
-80
struct.h
src/struct.h
+1
-1
No files found.
src/INTBuilder.c
View file @
e08ee47c
...
@@ -232,10 +232,11 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL){
...
@@ -232,10 +232,11 @@ void getInterface(struct pdb_values* pdbR, struct pdb_values* pdbL){
}
}
struct
docking_results
*
getDataForComplex
_HCMD2
(){
struct
docking_results
*
getDataForComplex
(){
char
*
buf
=
NULL
;
char
*
buf
=
NULL
;
FILE
*
condFile_stream
=
NULL
;
FILE
*
condFile_stream
=
NULL
;
int
numberOfConf
=
0
,
rc
;
int
numberOfConf
=
0
,
rc
;
int
idConf
=
0
,
buf4
,
prevID
=
-
1
;
float
buf3
=
0
;
float
buf3
=
0
;
size_t
len
=
2000
;
size_t
len
=
2000
;
struct
docking_results
*
dock_res
=
NULL
;
struct
docking_results
*
dock_res
=
NULL
;
...
@@ -257,88 +258,30 @@ struct docking_results* getDataForComplex_HCMD2(){
...
@@ -257,88 +258,30 @@ struct docking_results* getDataForComplex_HCMD2(){
numberOfConf
++
;
numberOfConf
++
;
rewind
(
condFile_stream
);
rewind
(
condFile_stream
);
dock_res
=
allocate_dockingResults
(
numberOfConf
);
/* This is with the first MAXDo format */
if
(
!
HCMD2
){
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the first line */
int
idConf
=
0
,
buf4
,
prevID
=
-
1
;
while
(
!
feof
(
condFile_stream
)){
/* We take the first value as it is the ID of the conformation */
rc
=
fscanf
(
condFile_stream
,
"%d %d %d %d"
,
&
idConf
,
&
buf4
,
&
buf4
,
&
buf4
);
if
(
prevID
==
idConf
){
break
;
}
else
{
prevID
=
idConf
;
}
rc
=
fscanf
(
condFile_stream
,
"%f %f %f %f %f %f"
,
&
dock_res
->
distCenters
[
idConf
],
&
dock_res
->
theta
[
idConf
],
&
dock_res
->
phi
[
idConf
],
&
dock_res
->
alpha
[
idConf
],
&
dock_res
->
beta
[
idConf
],
&
dock_res
->
gamma
[
idConf
]);
/* printf("%d %f %f %f %f %f %f\n",idConf,dock_res->distCenters[idConf],dock_res->theta[idConf],dock_res->phi[idConf],dock_res->alpha[idConf],dock_res->beta[idConf],dock_res->gamma[idConf]); */
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the rest of the line */
//dock_res->theta[idConf] = dock_res->theta[idConf]*cdr;
//dock_res->phi[idConf] = dock_res->phi[idConf]*cdr;
dock_res
->
alpha
[
idConf
]
=
dock_res
->
alpha
[
idConf
]
*
CDR
;
dock_res
->
beta
[
idConf
]
=
dock_res
->
beta
[
idConf
]
*
CDR
;
dock_res
->
gamma
[
idConf
]
=
dock_res
->
gamma
[
idConf
]
*
CDR
;
}
}
dock_res
->
nbConf
=
numberOfConf
;
/* Now that we know how many conformations we are dealing with
* allocate a structure large enough
fclose
(
condFile_stream
);
free
(
buf
);
return
dock_res
;
}
struct
docking_results
*
getDataForComplex
(){
char
*
buf
=
NULL
;
char
buf2
[
5
];
FILE
*
condFile_stream
=
NULL
;
int
numberOfConf
=
0
,
rc
;
size_t
len
=
2000
;
struct
docking_results
*
dock_res
=
NULL
;
strncpy
(
buf2
,
receptor
,
4
);
buf2
[
4
]
=
'\0'
;
//sprintf(totalFilePath,"%s/%s/Cond.%s.%s.UB.global.dat",dockingFile,buf2,receptor,ligand);
if
(
access
(
dockingFile
,
F_OK
)
==
-
1
){
/* File does not exists, 4 file in this case
* Return NULL, which should be treated accordingly
*/
*/
fprintf
(
stderr
,
"No such file : %s
\n
"
,
dockingFile
);
exit
(
EXIT_FAILURE
);
}
condFile_stream
=
fopen
(
dockingFile
,
"r"
);
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of first line */
/* Get the number of conformations */
float
buf3
=
0
;
rc
=
fscanf
(
condFile_stream
,
"%f"
,
&
buf3
);
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the rest of the line */
if
(
buf3
>
numberOfConf
)
numberOfConf
=
(
int
)
buf3
;
while
(
!
feof
(
condFile_stream
)){
rc
=
fscanf
(
condFile_stream
,
"%f"
,
&
buf3
);
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the rest of the line */
if
(
buf3
>
numberOfConf
)
numberOfConf
=
(
int
)
buf3
;
}
numberOfConf
++
;
rewind
(
condFile_stream
);
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the first line */
dock_res
=
allocate_dockingResults
(
numberOfConf
);
dock_res
=
allocate_dockingResults
(
numberOfConf
);
int
idConf
=
0
,
buf4
,
prevID
=
-
1
;
while
(
!
feof
(
condFile_stream
)){
while
(
!
feof
(
condFile_stream
)){
/* HCMD2 format */
if
(
HCMD2
){
/* We take the first value as it is the ID of the conformation
* The rest of the line doesn't interests us here
*/
rc
=
fscanf
(
condFile_stream
,
"%d %d %d %d"
,
&
idConf
,
&
buf4
,
&
buf4
,
&
buf4
);
}
else
{
/* First MAXDo format */
rc
=
fscanf
(
condFile_stream
,
"%d %d"
,
&
idConf
,
&
buf4
);
rc
=
fscanf
(
condFile_stream
,
"%d %d"
,
&
idConf
,
&
buf4
);
}
/* This happens when we arrive on the last line */
if
(
prevID
==
idConf
){
if
(
prevID
==
idConf
){
break
;
break
;
}
else
{
}
else
{
...
@@ -348,13 +291,16 @@ struct docking_results* getDataForComplex(){
...
@@ -348,13 +291,16 @@ struct docking_results* getDataForComplex(){
rc
=
fscanf
(
condFile_stream
,
"%f %f %f %f %f %f"
,
&
dock_res
->
distCenters
[
idConf
],
&
dock_res
->
theta
[
idConf
],
&
dock_res
->
phi
[
idConf
],
&
dock_res
->
alpha
[
idConf
],
&
dock_res
->
beta
[
idConf
],
&
dock_res
->
gamma
[
idConf
]);
rc
=
fscanf
(
condFile_stream
,
"%f %f %f %f %f %f"
,
&
dock_res
->
distCenters
[
idConf
],
&
dock_res
->
theta
[
idConf
],
&
dock_res
->
phi
[
idConf
],
&
dock_res
->
alpha
[
idConf
],
&
dock_res
->
beta
[
idConf
],
&
dock_res
->
gamma
[
idConf
]);
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the rest of the line */
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the rest of the line */
/* theta and phi angles are written in Radian already
* However that is not the case for alpha, beta and gamma angles
*/
//dock_res->theta[idConf] = dock_res->theta[idConf]*
cdr
;
//dock_res->theta[idConf] = dock_res->theta[idConf]*
COEF_DEGREE_TO_RADIAN
;
//dock_res->phi[idConf] = dock_res->phi[idConf]*
cdr
;
//dock_res->phi[idConf] = dock_res->phi[idConf]*
COEF_DEGREE_TO_RADIAN
;
dock_res
->
alpha
[
idConf
]
=
dock_res
->
alpha
[
idConf
]
*
CDR
;
dock_res
->
alpha
[
idConf
]
=
dock_res
->
alpha
[
idConf
]
*
COEF_DEGREE_TO_RADIAN
;
dock_res
->
beta
[
idConf
]
=
dock_res
->
beta
[
idConf
]
*
CDR
;
dock_res
->
beta
[
idConf
]
=
dock_res
->
beta
[
idConf
]
*
COEF_DEGREE_TO_RADIAN
;
dock_res
->
gamma
[
idConf
]
=
dock_res
->
gamma
[
idConf
]
*
CDR
;
dock_res
->
gamma
[
idConf
]
=
dock_res
->
gamma
[
idConf
]
*
COEF_DEGREE_TO_RADIAN
;
}
}
dock_res
->
nbConf
=
numberOfConf
;
dock_res
->
nbConf
=
numberOfConf
;
...
@@ -364,6 +310,7 @@ struct docking_results* getDataForComplex(){
...
@@ -364,6 +310,7 @@ struct docking_results* getDataForComplex(){
return
dock_res
;
return
dock_res
;
}
}
struct
pdb_values
*
readPDB
(
char
*
protein
)
{
struct
pdb_values
*
readPDB
(
char
*
protein
)
{
int
i
=
0
,
j
=
0
;
int
i
=
0
,
j
=
0
;
int
rc
=
0
,
nbRes
=
0
,
numCA
=
0
;
int
rc
=
0
,
nbRes
=
0
,
numCA
=
0
;
...
...
src/struct.h
View file @
e08ee47c
...
@@ -23,7 +23,7 @@ char* outputDir;
...
@@ -23,7 +23,7 @@ char* outputDir;
char
*
outputPDB
;
char
*
outputPDB
;
FILE
*
outputFile_rec
;
FILE
*
outputFile_rec
;
FILE
*
outputFile_lig
;
FILE
*
outputFile_lig
;
#define C
DR
0.017453293
#define C
OEF_DEGREE_TO_RADIAN
0.017453293
#define NB_MAX_ATOM_PER_RES 20
#define NB_MAX_ATOM_PER_RES 20
#define DIST_FOR_CONTACT 10
#define DIST_FOR_CONTACT 10
#define FORMAT_LINE_PDB "ATOM %5d %3s %3s %c%5s %8.3f%8.3f%8.3f\n"
#define FORMAT_LINE_PDB "ATOM %5d %3s %3s %c%5s %8.3f%8.3f%8.3f\n"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment