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
42ced6b9
Commit
42ced6b9
authored
Dec 05, 2016
by
Chloe Dequeker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some advancements
parent
fdc0b3c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
24 deletions
+17
-24
allocate.c
src/allocate.c
+12
-21
fileIO.c
src/fileIO.c
+3
-2
param.c
src/param.c
+1
-0
struct.h
src/struct.h
+1
-1
No files found.
src/allocate.c
View file @
42ced6b9
...
...
@@ -15,9 +15,15 @@ void freePDB(struct pdb_values* pdb){
void
freeDock
(
struct
docking_results
*
dock_res
){
/* Free the docking interface */
free
(
dock_res
->
listEner
);
free
(
dock_res
->
distCenters
);
free
(
dock_res
->
theta
);
free
(
dock_res
->
phi
);
if
(
HEX
){
free
(
dock_res
->
trans_X
);
free
(
dock_res
->
trans_Y
);
free
(
dock_res
->
trans_Z
);
}
else
{
free
(
dock_res
->
distCenters
);
free
(
dock_res
->
theta
);
free
(
dock_res
->
phi
);
}
free
(
dock_res
->
alpha
);
free
(
dock_res
->
beta
);
free
(
dock_res
->
gamma
);
...
...
@@ -114,21 +120,6 @@ struct docking_results* allocate_dockingResults(int nbConf){
exit
(
EXIT_FAILURE
);
}
}
dock_res
->
distCenters
=
malloc
((
2
*
nbConf
)
*
sizeof
(
float
));
if
(
dock_res
->
distCenters
==
NULL
){
perror
(
"malloc"
);
exit
(
EXIT_FAILURE
);
}
dock_res
->
theta
=
malloc
((
2
*
nbConf
)
*
sizeof
(
float
));
if
(
dock_res
->
theta
==
NULL
){
perror
(
"malloc"
);
exit
(
EXIT_FAILURE
);
}
dock_res
->
phi
=
malloc
((
2
*
nbConf
)
*
sizeof
(
float
));
if
(
dock_res
->
phi
==
NULL
){
perror
(
"malloc"
);
exit
(
EXIT_FAILURE
);
}
for
(
i
=
0
;
i
<
nbConf
;
i
++
){
dock_res
->
listEner
[
i
]
=
0
;
...
...
@@ -138,9 +129,9 @@ struct docking_results* allocate_dockingResults(int nbConf){
dock_res
->
gamma
[
i
]
=
0
;
dock_res
->
t_conf
[
i
]
=
0
;
if
(
HEX
){
dock_res
->
trans_X
=
0
;
dock_res
->
trans_Y
=
0
;
dock_res
->
trans_Z
=
0
;
dock_res
->
trans_X
[
i
]
=
0
;
dock_res
->
trans_Y
[
i
]
=
0
;
dock_res
->
trans_Z
[
i
]
=
0
;
}
else
{
dock_res
->
distCenters
[
i
]
=
0
;
dock_res
->
theta
[
i
]
=
0
;
...
...
src/fileIO.c
View file @
42ced6b9
...
...
@@ -50,6 +50,7 @@ struct docking_results* getDataForComplex(){
}
else
if
(
HEX
){
for
(
i
=
0
;
i
<
NB_HEADER_LINE_HEX
;
i
++
){
getline
(
&
buf
,
&
len
,
condFile_stream
);
printf
(
"%s
\n
"
,
buf
);
}
}
...
...
@@ -64,7 +65,7 @@ struct docking_results* getDataForComplex(){
if
(
MAXDo
){
/* First MAXDo format */
rc
=
fscanf
(
condFile_stream
,
"%d %d"
,
&
idConf
,
&
buf4
);
}
else
if
(
HEX
){
rc
=
fscanf
(
condFile_stream
,
"%d %d
"
,
&
buf4
,
&
idConf
);
rc
=
fscanf
(
condFile_stream
,
"%d %d
%f %f"
,
&
buf4
,
&
idConf
,
&
buf3
,
&
buf3
);
}
else
{
/* Else, that means that we have a format where
* values for distance between center follows directly
...
...
@@ -89,7 +90,7 @@ 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
]);
}
// TODO : Is this necessary for HEX ?
rc
=
getline
(
&
buf
,
&
len
,
condFile_stream
);
/* Get rid of the rest of the line
*/
/* rc = getline(&buf,&len,condFile_stream); /1* Get rid of the rest of the line *1/
*/
/* theta and phi angles are written in Radian already
* However that is not the case for alpha, beta and gamma angles
...
...
src/param.c
View file @
42ced6b9
...
...
@@ -54,6 +54,7 @@ struct argLine* parseLineOfArgument(int argc, char** argv){
target_conf
=
-
1
;
HCMD2
=
0
;
MAXDo
=
0
;
HEX
=
0
;
complexPDB
=
0
;
doNotOutputINT
=
0
;
clash
=
0
;
...
...
src/struct.h
View file @
42ced6b9
...
...
@@ -17,7 +17,7 @@
* two residues are in contact */
#define DIST_FOR_CLASH 2
/* Distance in Angstrom under which we consider
* the contact is a clash */
#define NB_HEADER_LINE_HEX
5
/* Number of header lines at the top of a hex docking file */
#define NB_HEADER_LINE_HEX
12
/* Number of header lines at the top of a hex docking file */
/* This is the format of a line in a PDB file */
#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