Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
docking
ocladock-fpga
Commits
6b3aa19c
Commit
6b3aa19c
authored
Jun 01, 2018
by
Leonardo Solis
Browse files
added smoothing
parent
76953836
Changes
9
Hide whitespace changes
Inline
Side-by-side
ofdock_taskpar_xl/Makefile
View file @
6b3aa19c
...
...
@@ -94,6 +94,7 @@ kerhwemu:
# Automate test
# "exe" and "xclbin" are rules from "rules.mk"
# Don't forget to copy and rename ./xclbin/*.xclbin file into ./Krnl_GA.xclbin
emu
:
XCL_EMULATION_MODE
=
sw_emu ./hostbin
-ffile
input/1stp/derived/1stp_protein.maps.fld
-lfile
input/1stp/derived/1stp_ligand.pdbqt
-nrun
2
-nev
2500000
...
...
ofdock_taskpar_xl/device/Krnl_IntraE.cl
View file @
6b3aa19c
...
...
@@ -21,6 +21,13 @@ void Krnl_IntraE(
__constant
char*
restrict
KerConstStatic_atom_types_const,
__global
const
char3*
restrict
KerConstStatic_intraE_contributors_const,
float
DockConst_smooth,
__constant
float*
restrict
KerConstStatic_reqm,
__constant
float*
restrict
KerConstStatic_reqm_hbond,
__constant
uint*
restrict
KerConstStatic_atom1_types_reqm,
__constant
uint*
restrict
KerConstStatic_atom2_types_reqm,
__constant
float*
restrict
KerConstStatic_VWpars_AC_const,
__constant
float*
restrict
KerConstStatic_VWpars_BD_const,
__constant
float*
restrict
KerConstStatic_dspars_S_const,
...
...
@@ -132,61 +139,107 @@ while(active) {
float
suby
=
loc_coords_atid1.y
-
loc_coords_atid2.y
;
float
subz
=
loc_coords_atid1.z
-
loc_coords_atid2.z
;
//distance
_leo
=
sqrt
(
subx*subx
+
suby*suby
+
subz*subz
)
*DockConst_grid_spacing
;
float
distance
_leo
=
sqrt_custom
(
subx*subx
+
suby*suby
+
subz*subz
)
*DockConst_grid_spacing
;
//
atomic_
distance
=
sqrt
(
subx*subx
+
suby*suby
+
subz*subz
)
*DockConst_grid_spacing
;
float
atomic_
distance
=
sqrt_custom
(
subx*subx
+
suby*suby
+
subz*subz
)
*DockConst_grid_spacing
;
if
(
distance_leo
<
1.0f
)
{
/*
if
(
atomic_distance
<
1.0f
)
{
#
if
defined
(
DEBUG_KRNL_INTRAE
)
printf
(
"\n\nToo low distance (%f) between atoms %u and %u\n"
,
distance
_leo
,
atom1_id,
atom2_id
)
;
printf
(
"\n\nToo low distance (%f) between atoms %u and %u\n"
,
atomic_
distance,
atom1_id,
atom2_id
)
;
#
endif
//return
HIGHEST_ENERGY
; // Returning maximal value
distance
_leo
=
1.0f
;
atomic_
distance
=
1.0f
;
}
*/
#
if
defined
(
DEBUG_KRNL_INTRAE
)
printf
(
"\n\nCalculating energy contribution of atoms %u and %u\n"
,
atom1_id+1,
atom2_id+1
)
;
printf
(
"Distance: %f\n"
,
distance
_leo
)
;
printf
(
"Distance: %f\n"
,
atomic_
distance
)
;
#
endif
/*
float
partialE1
;
float
partialE2
;
float
partialE3
;
float
partialE4
;
*/
//
But
only
if
the
distance
is
less
than
distance
cutoff
value
and
20.48A
(
because
of
the
tables
)
//if
((
distance_leo
<
8.0f
)
&&
(
distance_leo
<
20.48f
))
if
(
distance_leo
<
8.0f
)
float
partialE1
=
0.0f
;
float
partialE2
=
0.0f
;
float
partialE3
=
0.0f
;
float
partialE4
=
0.0f
;
//
Getting
types
ids
char
atom1_typeid
=
KerConstStatic_atom_types_const
[atom1_id]
;
char
atom2_typeid
=
KerConstStatic_atom_types_const
[atom2_id]
;
//
Getting
optimum
pair
distance
(
opt_distance
)
from
reqm
and
reqm_hbond
//
reqm:
equilibrium
internuclear
separation
//
(
sum
of
the
vdW
radii
of
two
like
atoms
(
A
))
in
the
case
of
vdW
//
reqm_hbond:
equilibrium
internuclear
separation
//
(
sum
of
the
vdW
radii
of
two
like
atoms
(
A
))
in
the
case
of
hbond
float
opt_distance
;
uint
atom1_type_vdw_hb
=
KerConstStatic_atom1_types_reqm
[atom1_typeid]
;
uint
atom2_type_vdw_hb
=
KerConstStatic_atom2_types_reqm
[atom2_typeid]
;
if
(
ref_intraE_contributors_const.z
==
1
)
//
H-bond
{
float
distance
_pow_2
=
distance_leo*distance_leo
;
float
inverse_distance_pow_2
=
native_divide
(
1.0f,
distance_pow_2
)
;
float
inverse_distance_pow_4
=
inverse_distance_pow_2
*
inverse_distance_pow_2
;
float
inverse_distance_pow_6
=
inverse_distance_pow_4
*
inverse_distance_pow_2
;
float
inverse_distance_pow_10
=
inverse_distance_pow_6
*
inverse_distance_pow_4
;
float
inverse_distance_pow_12
=
inverse_distance_pow_6
*
inverse_distance_pow_6
;
opt_
distance
=
KerConstStatic_reqm_hbond
[atom1_type_vdw_hb]
+
KerConstStatic_reqm_hbond
[atom2_type_vdw_hb]
;
}
else
//
Van
der
Waals
{
opt_distance
=
0.5f*
(
KerConstStatic_reqm
[atom1_type_vdw_hb]
+
KerConstStatic_reqm
[atom2_type_vdw_hb]
)
;
}
char
atom1_typeid
=
KerConstStatic_atom_types_const
[atom1_id]
;
char
atom2_typeid
=
KerConstStatic_atom_types_const
[atom2_id]
;
//
Getting
smoothed
distance
//
smoothed_distance
=
function
(
atomic_distance,
opt_distance
)
float
smoothed_distance
;
float
delta_distance
=
0.5f*DockConst_smooth
;
/*printf
(
"delta_distance: %f\n"
,
delta_distance
)
;*/
if
(
atomic_distance
<=
(
opt_distance
-
delta_distance
))
{
smoothed_distance
=
atomic_distance
+
delta_distance
;
}
else
if
(
atomic_distance
<
(
opt_distance
+
delta_distance
))
{
smoothed_distance
=
opt_distance
;
}
else
{
//
else
if
(
atomic_distance
>=
(
opt_distance
+
delta_distance
))
smoothed_distance
=
atomic_distance
-
delta_distance
;
}
float
distance_pow_2
=
atomic_distance*atomic_distance
;
float
smoothed_distance_pow_2
=
smoothed_distance*smoothed_distance
;
float
inverse_smoothed_distance_pow_2
=
native_divide
(
1.0f,
smoothed_distance_pow_2
)
;
float
inverse_smoothed_distance_pow_4
=
inverse_smoothed_distance_pow_2
*
inverse_smoothed_distance_pow_2
;
float
inverse_smoothed_distance_pow_6
=
inverse_smoothed_distance_pow_4
*
inverse_smoothed_distance_pow_2
;
float
inverse_smoothed_distance_pow_10
=
inverse_smoothed_distance_pow_6
*
inverse_smoothed_distance_pow_4
;
float
inverse_smoothed_distance_pow_12
=
inverse_smoothed_distance_pow_6
*
inverse_smoothed_distance_pow_6
;
if
(
atomic_distance
<
8.0f
)
{
//
Calculating
van
der
Waals
/
hydrogen
bond
term
partialE1
=
KerConstStatic_VWpars_AC_const
[atom1_typeid*DockConst_num_of_atypes+atom2_typeid]*inverse_distance_pow_12
;
partialE1
=
KerConstStatic_VWpars_AC_const
[atom1_typeid*DockConst_num_of_atypes+atom2_typeid]*inverse_
smoothed_
distance_pow_12
;
float
tmp_pE2
=
KerConstStatic_VWpars_BD_const
[atom1_typeid*DockConst_num_of_atypes+atom2_typeid]
;
if
(
ref_intraE_contributors_const.z
==
1
)
//
H-bond
partialE2
=
tmp_pE2
*
inverse_distance_pow_10
;
partialE2
=
tmp_pE2
*
inverse_
smoothed_
distance_pow_10
;
else
//
Van
der
Waals
partialE2
=
tmp_pE2
*
inverse_distance_pow_6
;
//
Calculating
electrostatic
term
partialE3
=
native_divide
(
(
DockConst_coeff_elec*KerConstStatic_atom_charges_const[atom1_id]*KerConstStatic_atom_charges_const[atom2_id]
)
,
(
distance_leo*
(
-8.5525f
+
native_divide
(
86.9525f,
(
1.0f
+
7.7839f*native_exp
(
-0.3154f*distance_leo
)))))
)
;
partialE2
=
tmp_pE2
*
inverse_smoothed_distance_pow_6
;
}
//
End
of
if:
if
(
dist
<
dcutoff
)
//
Calculating
desolvation
term
partialE4
=
(
(
KerConstStatic_dspars_S_const
[atom1_typeid]
+
DockConst_qasp*fabs
(
KerConstStatic_atom_charges_const[atom1_id]
))
*
KerConstStatic_dspars_V_const
[atom2_typeid]
+
(
KerConstStatic_dspars_S_const
[atom2_typeid]
+
DockConst_qasp*fabs
(
KerConstStatic_atom_charges_const[atom2_id]
))
*
KerConstStatic_dspars_V_const
[atom1_typeid]
)
*
DockConst_coeff_desolv*native_exp
(
-0.0386f*distance_pow_2
)
;
//
Calculating
electrostatic
term
partialE3
=
native_divide
(
(
DockConst_coeff_elec*KerConstStatic_atom_charges_const[atom1_id]*KerConstStatic_atom_charges_const[atom2_id]
)
,
(
atomic_distance*
(
-8.5525f
+
native_divide
(
86.9525f,
(
1.0f
+
7.7839f*native_exp
(
-0.3154f*atomic_distance
)))))
)
;
}
//
End
of
if:
if
((
dist
<
dcutoff
)
&&
(
dist
<
20.48
))
//
Calculating
desolvation
term
partialE4
=
(
(
KerConstStatic_dspars_S_const
[atom1_typeid]
+
DockConst_qasp*fabs
(
KerConstStatic_atom_charges_const[atom1_id]
))
*
KerConstStatic_dspars_V_const
[atom2_typeid]
+
(
KerConstStatic_dspars_S_const
[atom2_typeid]
+
DockConst_qasp*fabs
(
KerConstStatic_atom_charges_const[atom2_id]
))
*
KerConstStatic_dspars_V_const
[atom1_typeid]
)
*
DockConst_coeff_desolv*native_exp
(
-0.0386f*distance_pow_2
)
;
#
if
defined
(
FIXED_POINT_INTRAE
)
//shift_intraE[32]
=
shift_intraE[0]
+
partialE1
+
partialE2
+
partialE3
+
partialE4
;
...
...
ofdock_taskpar_xl/host/inc/calcenergy.h
View file @
6b3aa19c
...
...
@@ -59,7 +59,10 @@ typedef struct
float
mutation_rate
;
float
abs_max_dmov
;
float
abs_max_dang
;
float
lsearch_rate
;
float
lsearch_rate
;
float
smooth
;
unsigned
int
num_of_lsentities
;
float
rho_lower_bound
;
float
base_dmov_mul_sqrt3
;
...
...
@@ -127,6 +130,11 @@ typedef struct
char intraE_contributors_const[3*MAX_INTRAE_CONTRIBUTORS] __attribute__ ((aligned (32768)));
*/
cl_char3
intraE_contributors_const
[
MAX_INTRAE_CONTRIBUTORS
]
__attribute__
((
aligned
(
32768
)));
float
reqm_const
[
ATYPE_NUM
]
__attribute__
((
aligned
(
64
)));
float
reqm_hbond_const
[
ATYPE_NUM
]
__attribute__
((
aligned
(
64
)));
unsigned
int
atom1_types_reqm_const
[
ATYPE_NUM
]
__attribute__
((
aligned
(
64
)));
unsigned
int
atom2_types_reqm_const
[
ATYPE_NUM
]
__attribute__
((
aligned
(
64
)));
float
VWpars_AC_const
[
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
]
__attribute__
((
aligned
(
1024
)));
float
VWpars_BD_const
[
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
]
__attribute__
((
aligned
(
1024
)));
...
...
ofdock_taskpar_xl/host/inc/getparameters.h
View file @
6b3aa19c
...
...
@@ -38,6 +38,9 @@ typedef struct
float
mutation_rate
;
float
crossover_rate
;
float
lsearch_rate
;
float
smooth
;
unsigned
long
num_of_ls
;
float
tournament_rate
;
float
rho_lower_bound
;
...
...
ofdock_taskpar_xl/host/inc/processligand.h
View file @
6b3aa19c
...
...
@@ -77,6 +77,15 @@ typedef struct
int
atom_rigid_structures
[
256
];
char
bonds
[
256
][
256
];
char
intraE_contributors
[
256
][
256
];
// Sizes are hardcoded, ATYPE_NUM=22 float elements as in
// https://git.esa.informatik.tu-darmstadt.de/docking/ocladock/blob/master/host/src/processligand.cpp#L456
// See "User Guide AutoDock 4.2" (page 34)
double
reqm
[
ATYPE_NUM
];
double
reqm_hbond
[
ATYPE_NUM
];
unsigned
int
atom1_types_reqm
[
ATYPE_NUM
];
unsigned
int
atom2_types_reqm
[
ATYPE_NUM
];
double
VWpars_A
[
14
][
14
];
double
VWpars_B
[
14
][
14
];
double
VWpars_C
[
14
][
14
];
...
...
ofdock_taskpar_xl/host/src/calcenergy.cpp
View file @
6b3aa19c
...
...
@@ -272,6 +272,11 @@ int prepare_conststatic_fields_for_gpu(Liganddata* myligand_reference,
cl_char3
intraE_contributors
[
MAX_INTRAE_CONTRIBUTORS
];
float
reqm
[
ATYPE_NUM
];
float
reqm_hbond
[
ATYPE_NUM
];
unsigned
int
atom1_types_reqm
[
ATYPE_NUM
];
unsigned
int
atom2_types_reqm
[
ATYPE_NUM
];
float
VWpars_AC
[
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
];
float
VWpars_BD
[
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
];
float
dspars_S
[
MAX_NUM_OF_ATYPES
];
...
...
@@ -341,6 +346,19 @@ int prepare_conststatic_fields_for_gpu(Liganddata* myligand_reference,
}
}
// -------------------------------------------
// Smoothed pairwise potentials
// -------------------------------------------
// reqm, reqm_hbond: equilibrium internuclear separation for vdW and hbond
for
(
i
=
0
;
i
<
ATYPE_NUM
/*myligand_reference->num_of_atypes*/
;
i
++
)
{
reqm
[
i
]
=
myligand_reference
->
reqm
[
i
];
reqm_hbond
[
i
]
=
myligand_reference
->
reqm_hbond
[
i
];
atom1_types_reqm
[
i
]
=
myligand_reference
->
atom1_types_reqm
[
i
];
atom2_types_reqm
[
i
]
=
myligand_reference
->
atom2_types_reqm
[
i
];
}
// -------------------------------------------
//van der Waals parameters
for
(
i
=
0
;
i
<
myligand_reference
->
num_of_atypes
;
i
++
)
for
(
j
=
0
;
j
<
myligand_reference
->
num_of_atypes
;
j
++
)
...
...
@@ -402,6 +420,14 @@ int prepare_conststatic_fields_for_gpu(Liganddata* myligand_reference,
*/
for
(
m
=
0
;
m
<
MAX_INTRAE_CONTRIBUTORS
;
m
++
)
{
KerConstStatic
->
intraE_contributors_const
[
m
]
=
intraE_contributors
[
m
];
}
// -------------------------------------------
// Smoothed pairwise potentials
// -------------------------------------------
for
(
m
=
0
;
m
<
ATYPE_NUM
;
m
++
)
{
KerConstStatic
->
reqm_const
[
m
]
=
reqm
[
m
];
}
for
(
m
=
0
;
m
<
ATYPE_NUM
;
m
++
)
{
KerConstStatic
->
reqm_hbond_const
[
m
]
=
reqm_hbond
[
m
];
}
for
(
m
=
0
;
m
<
ATYPE_NUM
;
m
++
)
{
KerConstStatic
->
atom1_types_reqm_const
[
m
]
=
atom1_types_reqm
[
m
];
}
for
(
m
=
0
;
m
<
ATYPE_NUM
;
m
++
)
{
KerConstStatic
->
atom2_types_reqm_const
[
m
]
=
atom2_types_reqm
[
m
];
}
// -------------------------------------------
for
(
m
=
0
;
m
<
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
;
m
++
){
KerConstStatic
->
VWpars_AC_const
[
m
]
=
VWpars_AC
[
m
];
}
for
(
m
=
0
;
m
<
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
;
m
++
){
KerConstStatic
->
VWpars_BD_const
[
m
]
=
VWpars_BD
[
m
];
}
...
...
ofdock_taskpar_xl/host/src/getparameters.cpp
View file @
6b3aa19c
...
...
@@ -130,6 +130,8 @@ void get_commandpars(const int* argc,
mypars
->
crossover_rate
=
80
;
// 80%
mypars
->
lsearch_rate
=
6
;
// 6%
// unsigned long num_of_ls
mypars
->
smooth
=
0.5
f
;
mypars
->
tournament_rate
=
60
;
// 60%
mypars
->
rho_lower_bound
=
0.01
;
// 0.01
mypars
->
base_dmov_mul_sqrt3
=
2.0
/
(
*
spacing
)
*
sqrt
(
3.0
);
// 2 A
...
...
@@ -253,6 +255,24 @@ void get_commandpars(const int* argc,
// MISSING: unsigned long num_of_ls
// ---------------------------------
// -------------------------------------------
// Smoothed pairwise potentials
// -------------------------------------------
mypars
->
smooth
=
0.5
f
;
if
(
strcmp
(
"-smooth"
,
argv
[
i
])
==
0
)
{
arg_recognized
=
1
;
sscanf
(
argv
[
i
+
1
],
"%f"
,
&
tempfloat
);
// smooth is measured in Angstrom
if
((
tempfloat
>=
0.0
f
)
&&
(
tempfloat
<=
0.5
f
))
mypars
->
smooth
=
tempfloat
;
else
printf
(
"Warning: value of -smooth argument ignored. Value must be a float between 0 and 0.5.
\n
"
);
}
// -------------------------------------------
//Argument: tournament rate. Must be a float between 50 and 100.
//Means the probability that the better entity wins the tournament round during selectin
if
(
strcmp
(
"-trat"
,
argv
[
i
])
==
0
)
...
...
ofdock_taskpar_xl/host/src/performdocking.cpp
View file @
6b3aa19c
...
...
@@ -544,7 +544,13 @@ cl_mem mem_KerConstStatic_fixpt64_atom_charges_const;
#endif
cl_mem
mem_KerConstStatic_atom_charges_const
;
cl_mem
mem_KerConstStatic_atom_types_const
;
cl_mem
mem_KerConstStatic_intraE_contributors_const
;
cl_mem
mem_KerConstStatic_intraE_contributors_const
;
cl_mem
mem_KerConstStatic_reqm_const
;
cl_mem
mem_KerConstStatic_reqm_hbond_const
;
cl_mem
mem_KerConstStatic_atom1_types_reqm_const
;
cl_mem
mem_KerConstStatic_atom2_types_reqm_const
;
cl_mem
mem_KerConstStatic_VWpars_AC_const
;
cl_mem
mem_KerConstStatic_VWpars_BD_const
;
cl_mem
mem_KerConstStatic_dspars_S_const
;
...
...
@@ -806,6 +812,7 @@ filled with clock() */
dockpars
.
cons_limit
=
(
unsigned
int
)
mypars
->
cons_limit
;
dockpars
.
max_num_of_iters
=
(
unsigned
int
)
mypars
->
max_num_of_iters
;
dockpars
.
qasp
=
mypars
->
qasp
;
dockpars
.
smooth
=
mypars
->
smooth
;
/*
// passed correctly
...
...
@@ -858,8 +865,12 @@ printf("%i %i\n", dockpars.num_of_intraE_contributors, myligand_reference.num_of
/*
mallocBufferObject(context,CL_MEM_READ_ONLY, 3*MAX_INTRAE_CONTRIBUTORS*sizeof(char), &mem_KerConstStatic_intraE_contributors_const);
*/
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
MAX_INTRAE_CONTRIBUTORS
*
sizeof
(
cl_char3
),
&
mem_KerConstStatic_intraE_contributors_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
MAX_INTRAE_CONTRIBUTORS
*
sizeof
(
cl_char3
),
&
mem_KerConstStatic_intraE_contributors_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
ATYPE_NUM
*
sizeof
(
float
),
&
mem_KerConstStatic_reqm_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
ATYPE_NUM
*
sizeof
(
float
),
&
mem_KerConstStatic_reqm_hbond_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
ATYPE_NUM
*
sizeof
(
unsigned
int
),
&
mem_KerConstStatic_atom1_types_reqm_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
ATYPE_NUM
*
sizeof
(
unsigned
int
),
&
mem_KerConstStatic_atom2_types_reqm_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
*
sizeof
(
float
),
&
mem_KerConstStatic_VWpars_AC_const
);
mallocBufferObject
(
context
,
CL_MEM_READ_ONLY
,
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
*
sizeof
(
float
),
&
mem_KerConstStatic_VWpars_BD_const
);
...
...
@@ -919,7 +930,12 @@ printf("%i %i\n", dockpars.num_of_intraE_contributors, myligand_reference.num_of
/*
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_intraE_contributors_const, &KerConstStatic.intraE_contributors_const[0], 3*MAX_INTRAE_CONTRIBUTORS*sizeof(char));
*/
memcopyBufferObjectToDevice
(
command_queue
/*1*/
,
mem_KerConstStatic_intraE_contributors_const
,
&
KerConstStatic
.
intraE_contributors_const
[
0
],
MAX_INTRAE_CONTRIBUTORS
*
sizeof
(
cl_char3
));
memcopyBufferObjectToDevice
(
command_queue
/*1*/
,
mem_KerConstStatic_intraE_contributors_const
,
&
KerConstStatic
.
intraE_contributors_const
[
0
],
MAX_INTRAE_CONTRIBUTORS
*
sizeof
(
cl_char3
));
memcopyBufferObjectToDevice
(
command_queue
,
mem_KerConstStatic_reqm_const
,
&
KerConstStatic
.
reqm_const
,
ATYPE_NUM
*
sizeof
(
float
));
memcopyBufferObjectToDevice
(
command_queue
,
mem_KerConstStatic_reqm_hbond_const
,
&
KerConstStatic
.
reqm_hbond_const
,
ATYPE_NUM
*
sizeof
(
float
));
memcopyBufferObjectToDevice
(
command_queue
,
mem_KerConstStatic_atom1_types_reqm_const
,
&
KerConstStatic
.
atom1_types_reqm_const
,
ATYPE_NUM
*
sizeof
(
unsigned
int
));
memcopyBufferObjectToDevice
(
command_queue
,
mem_KerConstStatic_atom2_types_reqm_const
,
&
KerConstStatic
.
atom2_types_reqm_const
,
ATYPE_NUM
*
sizeof
(
unsigned
int
));
memcopyBufferObjectToDevice
(
command_queue
/*1*/
,
mem_KerConstStatic_VWpars_AC_const
,
&
KerConstStatic
.
VWpars_AC_const
[
0
],
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
*
sizeof
(
float
));
memcopyBufferObjectToDevice
(
command_queue
/*1*/
,
mem_KerConstStatic_VWpars_BD_const
,
&
KerConstStatic
.
VWpars_BD_const
[
0
],
MAX_NUM_OF_ATYPES
*
MAX_NUM_OF_ATYPES
*
sizeof
(
float
));
...
...
@@ -1113,19 +1129,27 @@ printf("%i %i\n", dockpars.num_of_intraE_contributors, myligand_reference.num_of
#ifdef ENABLE_KERNEL4 // Krnl_IntraE
setKernelArg
(
kernel4
,
0
,
sizeof
(
mem_KerConstStatic_atom_charges_const
),
&
mem_KerConstStatic_atom_charges_const
);
setKernelArg
(
kernel4
,
1
,
sizeof
(
mem_KerConstStatic_atom_types_const
),
&
mem_KerConstStatic_atom_types_const
);
setKernelArg
(
kernel4
,
2
/*0*/
,
sizeof
(
mem_KerConstStatic_intraE_contributors_const
),
&
mem_KerConstStatic_intraE_contributors_const
);
setKernelArg
(
kernel4
,
3
,
sizeof
(
mem_KerConstStatic_VWpars_AC_const
),
&
mem_KerConstStatic_VWpars_AC_const
);
setKernelArg
(
kernel4
,
4
,
sizeof
(
mem_KerConstStatic_VWpars_BD_const
),
&
mem_KerConstStatic_VWpars_BD_const
);
setKernelArg
(
kernel4
,
5
,
sizeof
(
mem_KerConstStatic_dspars_S_const
),
&
mem_KerConstStatic_dspars_S_const
);
setKernelArg
(
kernel4
,
6
,
sizeof
(
mem_KerConstStatic_dspars_V_const
),
&
mem_KerConstStatic_dspars_V_const
);
setKernelArg
(
kernel4
,
7
/*1*/
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_atoms
);
setKernelArg
(
kernel4
,
8
/*2*/
,
sizeof
(
unsigned
int
),
&
dockpars
.
num_of_intraE_contributors
);
setKernelArg
(
kernel4
,
9
,
sizeof
(
float
),
&
dockpars
.
grid_spacing
);
setKernelArg
(
kernel4
,
10
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_atypes
);
setKernelArg
(
kernel4
,
11
,
sizeof
(
float
),
&
dockpars
.
coeff_elec
);
setKernelArg
(
kernel4
,
12
,
sizeof
(
float
),
&
dockpars
.
qasp
);
setKernelArg
(
kernel4
,
13
,
sizeof
(
float
),
&
dockpars
.
coeff_desolv
);
setKernelArg
(
kernel4
,
2
,
sizeof
(
mem_KerConstStatic_intraE_contributors_const
),
&
mem_KerConstStatic_intraE_contributors_const
);
setKernelArg
(
kernel4
,
3
,
sizeof
(
dockpars
.
smooth
),
&
dockpars
.
smooth
);
setKernelArg
(
kernel4
,
4
,
sizeof
(
mem_KerConstStatic_reqm_const
),
&
mem_KerConstStatic_reqm_const
);
setKernelArg
(
kernel4
,
5
,
sizeof
(
mem_KerConstStatic_reqm_hbond_const
),
&
mem_KerConstStatic_reqm_hbond_const
);
setKernelArg
(
kernel4
,
6
,
sizeof
(
mem_KerConstStatic_atom1_types_reqm_const
),
&
mem_KerConstStatic_atom1_types_reqm_const
);
setKernelArg
(
kernel4
,
7
,
sizeof
(
mem_KerConstStatic_atom2_types_reqm_const
),
&
mem_KerConstStatic_atom2_types_reqm_const
);
setKernelArg
(
kernel4
,
8
,
sizeof
(
mem_KerConstStatic_VWpars_AC_const
),
&
mem_KerConstStatic_VWpars_AC_const
);
setKernelArg
(
kernel4
,
9
,
sizeof
(
mem_KerConstStatic_VWpars_BD_const
),
&
mem_KerConstStatic_VWpars_BD_const
);
setKernelArg
(
kernel4
,
10
,
sizeof
(
mem_KerConstStatic_dspars_S_const
),
&
mem_KerConstStatic_dspars_S_const
);
setKernelArg
(
kernel4
,
11
,
sizeof
(
mem_KerConstStatic_dspars_V_const
),
&
mem_KerConstStatic_dspars_V_const
);
setKernelArg
(
kernel4
,
12
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_atoms
);
setKernelArg
(
kernel4
,
13
,
sizeof
(
unsigned
int
),
&
dockpars
.
num_of_intraE_contributors
);
setKernelArg
(
kernel4
,
14
,
sizeof
(
float
),
&
dockpars
.
grid_spacing
);
setKernelArg
(
kernel4
,
15
,
sizeof
(
unsigned
char
),
&
dockpars
.
num_of_atypes
);
setKernelArg
(
kernel4
,
16
,
sizeof
(
float
),
&
dockpars
.
coeff_elec
);
setKernelArg
(
kernel4
,
17
,
sizeof
(
float
),
&
dockpars
.
qasp
);
setKernelArg
(
kernel4
,
18
,
sizeof
(
float
),
&
dockpars
.
coeff_desolv
);
/*
setKernelArg(kernel4,14, sizeof(unsigned int), &square_num_of_atypes);
*/
...
...
@@ -3354,7 +3378,13 @@ void cleanup() {
#endif
if
(
mem_KerConstStatic_atom_charges_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_atom_charges_const
);}
if
(
mem_KerConstStatic_atom_types_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_atom_types_const
);}
if
(
mem_KerConstStatic_intraE_contributors_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_intraE_contributors_const
);}
if
(
mem_KerConstStatic_intraE_contributors_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_intraE_contributors_const
);}
if
(
mem_KerConstStatic_reqm_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_reqm_const
);}
if
(
mem_KerConstStatic_reqm_hbond_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_reqm_hbond_const
);}
if
(
mem_KerConstStatic_atom1_types_reqm_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_atom1_types_reqm_const
);}
if
(
mem_KerConstStatic_atom2_types_reqm_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_atom2_types_reqm_const
);}
if
(
mem_KerConstStatic_VWpars_AC_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_VWpars_AC_const
);}
if
(
mem_KerConstStatic_VWpars_BD_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_VWpars_BD_const
);}
if
(
mem_KerConstStatic_dspars_S_const
)
{
clReleaseMemObject
(
mem_KerConstStatic_dspars_S_const
);}
...
...
ofdock_taskpar_xl/host/src/processligand.cpp
View file @
6b3aa19c
...
...
@@ -527,16 +527,28 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
//identifying atom types
for
(
i
=
0
;
i
<
ATYPE_NUM
;
i
++
)
//L30nardoSV
/*
// OCLADock
if (stricmp(atom_names [i], myligand->atom_types [atom_typeid1]) == 0)
//if (_stricmp(atom_names[i], myligand->atom_types[atom_typeid1]) == 0)
VWid_atype1 = i;
*/
if
(
stricmp
(
atom_names
[
i
],
myligand
->
atom_types
[
atom_typeid1
])
==
0
)
{
VWid_atype1
=
i
;
myligand
->
atom1_types_reqm
[
atom_typeid1
]
=
VWid_atype1
;
}
for
(
i
=
0
;
i
<
ATYPE_NUM
;
i
++
)
// L30nardoSV
/*
// OCLADock
if (stricmp(atom_names[i], myligand->atom_types[atom_typeid2]) == 0)
//if (_stricmp(atom_names[i], myligand->atom_types[atom_typeid2]) == 0)
VWid_atype2 = i;
*/
if
(
stricmp
(
atom_names
[
i
],
myligand
->
atom_types
[
atom_typeid2
])
==
0
)
{
VWid_atype2
=
i
;
myligand
->
atom2_types_reqm
[
atom_typeid2
]
=
VWid_atype2
;
}
if
(
VWid_atype1
==
ATYPE_NUM
)
{
...
...
@@ -571,6 +583,11 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
}
}
for
(
atom_typeid1
=
0
;
atom_typeid1
<
ATYPE_NUM
/*myligand->num_of_atypes*/
;
atom_typeid1
++
)
{
myligand
->
reqm
[
atom_typeid1
]
=
reqm
[
atom_typeid1
];
myligand
->
reqm_hbond
[
atom_typeid1
]
=
reqm_hbond
[
atom_typeid1
];
}
for
(
atom_typeid1
=
0
;
atom_typeid1
<
myligand
->
num_of_atypes
;
atom_typeid1
++
)
{
VWid_atype1
=
ATYPE_NUM
;
...
...
Write
Preview
Supports
Markdown
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