Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
ocladock
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
docking
ocladock
Commits
62625b1d
Commit
62625b1d
authored
Dec 14, 2018
by
Leonardo Solis
2
Browse files
Options
Browse Files
Download
Plain Diff
#20, merge rmsd solution into fastergrad
parents
84d2e94e
6ec6f3b0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
78 additions
and
26 deletions
+78
-26
README.md
README.md
+1
-0
doc/readme/readme_users.md
doc/readme/readme_users.md
+1
-0
host/inc/getparameters.h
host/inc/getparameters.h
+2
-0
host/inc/performdocking.h
host/inc/performdocking.h
+8
-7
host/inc/processresult.h
host/inc/processresult.h
+1
-0
host/src/getparameters.cpp
host/src/getparameters.cpp
+16
-3
host/src/main.cpp
host/src/main.cpp
+12
-3
host/src/performdocking.cpp
host/src/performdocking.cpp
+15
-9
host/src/processresult.cpp
host/src/processresult.cpp
+22
-4
No files found.
README.md
View file @
62625b1d
...
...
@@ -98,6 +98,7 @@ By default the output log file is written in the current working folder. Example
| -lsrat | Local-search rate | 6 (%) |
| -trat | Tournament rate | 60 (%) |
| -resnam | Name for docking output log | _"docking"_ |
| -hsym | Handle symmetry in RMSD calc. | 1 |
For a complete list of available arguments and their default values, check:
[
getparameters.cpp
](
host/src/getparameters.cpp
)
.
...
...
doc/readme/readme_users.md
View file @
62625b1d
...
...
@@ -75,6 +75,7 @@ By default the output log file is written in the current working folder. Example
| -lsrat | Local-search rate | 6 (%) |
| -trat | Tournament rate | 60 (%) |
| -resnam | Name for docking output log | "docking" |
| -hsym | Handle symmetry in RMSD calc.| 1 |
For a complete list of available arguments and their default values, check:
[
getparameters.cpp
](
host/src/getparameters.cpp
)
.
...
...
host/inc/getparameters.h
View file @
62625b1d
...
...
@@ -67,6 +67,8 @@ typedef struct
char
gen_pdbs
;
char
fldfile
[
128
];
char
ligandfile
[
128
];
char
xrayligandfile
[
128
];
bool
given_xrayligandfile
;
float
ref_ori_angles
[
3
];
unsigned
long
num_of_runs
;
char
reflig_en_reqired
;
...
...
host/inc/performdocking.h
View file @
62625b1d
...
...
@@ -67,13 +67,14 @@ typedef struct {
} Gradientparameters;
#endif
int
docking_with_gpu
(
const
Gridinfo
*
mygrid
,
/*const*/
float
*
cpu_floatgrids
,
Dockpars
*
mypars
,
const
Liganddata
*
myligand_init
,
const
int
*
argc
,
char
**
argv
,
clock_t
clock_start_program
);
int
docking_with_gpu
(
const
Gridinfo
*
mygrid
,
/*const*/
float
*
cpu_floatgrids
,
Dockpars
*
mypars
,
const
Liganddata
*
myligand_init
,
const
Liganddata
*
myxrayligand
,
const
int
*
argc
,
char
**
argv
,
clock_t
clock_start_program
);
double
check_progress
(
int
*
evals_of_runs
,
int
generation_cnt
,
...
...
host/inc/processresult.h
View file @
62625b1d
...
...
@@ -73,6 +73,7 @@ void make_resfiles( float* final_population,
float
*
energies
,
const
Liganddata
*
ligand_ref
,
const
Liganddata
*
ligand_from_pdb
,
const
Liganddata
*
ligand_xray
,
const
Dockpars
*
mypars
,
int
evals_performed
,
int
generations_used
,
...
...
host/src/getparameters.cpp
View file @
62625b1d
...
...
@@ -167,12 +167,14 @@ void get_commandpars(const int* argc,
mypars
->
reflig_en_reqired
=
0
;
// char unbound_model
// AD4_free_energy_coeffs coeffs
mypars
->
handle_symmetry
=
0
;
mypars
->
handle_symmetry
=
1
;
mypars
->
gen_finalpop
=
0
;
mypars
->
gen_best
=
0
;
strcpy
(
mypars
->
resname
,
"docking"
);
mypars
->
qasp
=
0.01097
f
;
mypars
->
rmsd_tolerance
=
2.0
;
//2 Angström
mypars
->
rmsd_tolerance
=
2.0
;
//2 Angström
strcpy
(
mypars
->
xrayligandfile
,
mypars
->
ligandfile
);
// By default xray-ligand file is the same as the randomized input ligand
mypars
->
given_xrayligandfile
=
false
;
// That is, not given (explicitly by the user)
// ------------------------------------------
//overwriting values which were defined as a command line argument
...
...
@@ -574,9 +576,20 @@ void get_commandpars(const int* argc,
else
printf
(
"Warning: value of -rmstol argument ignored. Value must be a double greater than 0.
\n
"
);
}
// ----------------------------------
//Argument: ligand xray pdbqt file name
if
(
strcmp
(
"-xraylfile"
,
argv
[
i
])
==
0
)
{
arg_recognized
=
1
;
strcpy
(
mypars
->
xrayligandfile
,
argv
[
i
+
1
]);
mypars
->
given_xrayligandfile
=
true
;
printf
(
"Info: using -xraylfile value as X-ray ligand."
);
}
// ----------------------------------
if
(
arg_recognized
!=
1
)
printf
(
"Warning: unknown argument '%s'.
\n
"
,
argv
[
i
]);
}
//validating some settings
...
...
host/src/main.cpp
View file @
62625b1d
...
...
@@ -92,6 +92,17 @@ int main(int argc, char* argv[])
//------------------------------------------------------------
get_commandpars
(
&
argc
,
argv
,
&
(
mygrid
.
spacing
),
&
mypars
);
Liganddata
myxrayligand
;
Gridinfo
mydummygrid
;
// if -lxrayfile provided, then read xray ligand data
if
(
mypars
.
given_xrayligandfile
==
true
)
{
if
(
init_liganddata
(
mypars
.
xrayligandfile
,
&
myxrayligand
,
&
mydummygrid
)
!=
0
)
return
1
;
if
(
get_liganddata
(
mypars
.
xrayligandfile
,
&
myxrayligand
,
mypars
.
coeffs
.
AD4_coeff_vdW
,
mypars
.
coeffs
.
AD4_coeff_hb
)
!=
0
)
return
1
;
}
//------------------------------------------------------------
// Calculating energies of reference ligand if required
//------------------------------------------------------------
...
...
@@ -114,9 +125,7 @@ int main(int argc, char* argv[])
// Starting Docking
//------------------------------------------------------------
printf
(
"
\n
OCLADock version: %s
\n
"
,
VERSION
);
if
(
docking_with_gpu
(
&
mygrid
,
floatgrids
,
&
mypars
,
&
myligand_init
,
&
argc
,
argv
,
clock_start_program
)
!=
0
)
if
(
docking_with_gpu
(
&
mygrid
,
floatgrids
,
&
mypars
,
&
myligand_init
,
&
myxrayligand
,
&
argc
,
argv
,
clock_start_program
)
!=
0
)
return
1
;
free
(
floatgrids
);
...
...
host/src/performdocking.cpp
View file @
62625b1d
...
...
@@ -93,13 +93,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "stringify.h"
#include "correct_grad_axisangle.h"
int
docking_with_gpu
(
const
Gridinfo
*
mygrid
,
/*const*/
float
*
cpu_floatgrids
,
Dockpars
*
mypars
,
const
Liganddata
*
myligand_init
,
const
int
*
argc
,
char
**
argv
,
clock_t
clock_start_program
)
int
docking_with_gpu
(
const
Gridinfo
*
mygrid
,
/*const*/
float
*
cpu_floatgrids
,
Dockpars
*
mypars
,
const
Liganddata
*
myligand_init
,
const
Liganddata
*
myxrayligand
,
const
int
*
argc
,
char
**
argv
,
clock_t
clock_start_program
)
/* The function performs the docking algorithm and generates the corresponding result files.
parameter mygrid:
describes the grid
...
...
@@ -113,6 +114,9 @@ parameter mypars:
parameter myligand_init:
describes the ligands
filled with get_liganddata()
parameter myxrayligand:
describes the xray ligand
filled with get_xrayliganddata()
parameters argc and argv:
are the corresponding command line arguments parameter clock_start_program:
contains the state of the clock tick counter at the beginning of the program
...
...
@@ -1116,8 +1120,10 @@ filled with clock() */
arrange_result
(
cpu_final_populations
+
run_cnt
*
mypars
->
pop_size
*
GENOTYPE_LENGTH_IN_GLOBMEM
,
cpu_energies
+
run_cnt
*
mypars
->
pop_size
,
mypars
->
pop_size
);
make_resfiles
(
cpu_final_populations
+
run_cnt
*
mypars
->
pop_size
*
GENOTYPE_LENGTH_IN_GLOBMEM
,
cpu_energies
+
run_cnt
*
mypars
->
pop_size
,
&
myligand_reference
,
myligand_init
,
cpu_energies
+
run_cnt
*
mypars
->
pop_size
,
&
myligand_reference
,
myligand_init
,
myxrayligand
,
mypars
,
cpu_evals_of_runs
[
run_cnt
],
generation_cnt
,
...
...
host/src/processresult.cpp
View file @
62625b1d
...
...
@@ -232,9 +232,22 @@ void write_basic_info_dlg(FILE* fp, const Liganddata* ligand_ref, const Dockpars
fprintf
(
fp
,
"DPF> move %s
\n\n\n
"
,
mypars
->
ligandfile
);
}
void
make_resfiles
(
float
*
final_population
,
float
*
energies
,
const
Liganddata
*
ligand_ref
,
const
Liganddata
*
ligand_from_pdb
,
const
Dockpars
*
mypars
,
int
evals_performed
,
int
generations_used
,
const
Gridinfo
*
mygrid
,
const
float
*
grids
,
float
*
cpu_ref_ori_angles
,
const
int
*
argc
,
char
**
argv
,
int
debug
,
int
run_cnt
,
Ligandresult
*
best_result
)
void
make_resfiles
(
float
*
final_population
,
float
*
energies
,
const
Liganddata
*
ligand_ref
,
const
Liganddata
*
ligand_from_pdb
,
const
Liganddata
*
ligand_xray
,
const
Dockpars
*
mypars
,
int
evals_performed
,
int
generations_used
,
const
Gridinfo
*
mygrid
,
const
float
*
grids
,
float
*
cpu_ref_ori_angles
,
const
int
*
argc
,
char
**
argv
,
int
debug
,
int
run_cnt
,
Ligandresult
*
best_result
)
//The function writes out final_population generated by get_result
//as well as different parameters about the docking, the receptor and the ligand to a file called fdock_report.txt in a
//readable and understandable format. The ligand_from_pdb parametere must be the Liganddata which includes the original
...
...
@@ -309,7 +322,12 @@ void make_resfiles(float* final_population, float* energies, const Liganddata* l
accurate_intraE
[
i
]
=
calc_intraE_f
(
&
temp_docked
,
8
,
mypars
->
smooth
,
0
,
mypars
->
coeffs
.
scaled_AD4_coeff_elec
,
mypars
->
coeffs
.
AD4_coeff_desolv
,
mypars
->
qasp
,
debug
);
move_ligand
(
&
temp_docked
,
mygrid
->
origo_real_xyz
);
//moving it according to grid location
entity_rmsds
[
i
]
=
calc_rmsd
(
ligand_from_pdb
,
&
temp_docked
,
mypars
->
handle_symmetry
);
//calculating rmds compared to original pdb file
if
(
mypars
->
given_xrayligandfile
==
true
)
{
entity_rmsds
[
i
]
=
calc_rmsd
(
ligand_xray
,
&
temp_docked
,
mypars
->
handle_symmetry
);
//calculating rmds compared to original xray file
}
else
{
entity_rmsds
[
i
]
=
calc_rmsd
(
ligand_from_pdb
,
&
temp_docked
,
mypars
->
handle_symmetry
);
//calculating rmds compared to original pdb file
}
//copying best result to output parameter
if
(
i
==
0
)
//assuming this is the best one (final_population is arranged), however,
...
...
Leonardo Solis
@solis
mentioned in commit
29471253
·
Dec 15, 2018
mentioned in commit
29471253
mentioned in commit 294712531f8550ffc81ab01b6e2b6bf8c7d2d878
Toggle commit list
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