Commit 29c95f9d authored by Leonardo Solis's avatar Leonardo Solis

added smoothing

parent dcd12a25
......@@ -741,8 +741,8 @@ $(TARGET_DIR)/$(TARGET) : Makefile $(SRCS) $(INCS) $(TARGET_DIR)
# Following values are used only for emulation
# to have a short but still a representative test
PDB := 1stp
NRUN := 10
NEV := 50000
NRUN := 5
NEV := 100000
# Project name
PROJECT_NAME := ofdock_taskpar_alt
......
......@@ -18,6 +18,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,
......@@ -112,61 +119,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;
*/
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;
// 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)
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
{
opt_distance = KerConstStatic_reqm_hbond [atom1_type_vdw_hb] + KerConstStatic_reqm_hbond [atom2_type_vdw_hb];
}
else // Van der Waals
{
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 = 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;
partialE2 = tmp_pE2 * inverse_smoothed_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))))) );
} // 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;
......
......@@ -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;
......@@ -126,7 +129,12 @@ typedef struct
/*
char intraE_contributors_const[3*MAX_INTRAE_CONTRIBUTORS] __attribute__ ((aligned (32768)));
*/
cl_char3 intraE_contributors_const[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)));
......
......@@ -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;
......
......@@ -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];
......
......@@ -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++)
......@@ -400,8 +418,16 @@ int prepare_conststatic_fields_for_gpu(Liganddata* myligand_reference,
/*
for (m=0;m<3*MAX_INTRAE_CONTRIBUTORS;m++) { KerConstStatic->intraE_contributors_const[m] = intraE_contributors[m]; }
*/
for (m=0;m<MAX_INTRAE_CONTRIBUTORS;m++) { KerConstStatic->intraE_contributors_const[m] = intraE_contributors[m]; }
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]; }
......
......@@ -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.5f;
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.5f;
if (strcmp("-smooth", argv [i]) == 0)
{
arg_recognized = 1;
sscanf(argv [i+1], "%f", &tempfloat);
// smooth is measured in Angstrom
if ((tempfloat >= 0.0f) && (tempfloat <= 0.5f))
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)
......
......@@ -447,7 +447,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;
......@@ -708,7 +714,8 @@ filled with clock() */
dockpars.base_dang_mul_sqrt3 = mypars->base_dang_mul_sqrt3;
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.qasp = mypars->qasp;
dockpars.smooth = mypars->smooth;
/*
// passed correctly
......@@ -761,8 +768,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);
......@@ -823,6 +834,11 @@ 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_queue1,mem_KerConstStatic_intraE_contributors_const, &KerConstStatic.intraE_contributors_const[0], MAX_INTRAE_CONTRIBUTORS*sizeof(cl_char3));
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_reqm_const, &KerConstStatic.reqm_const, ATYPE_NUM*sizeof(float));
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_reqm_hbond_const, &KerConstStatic.reqm_hbond_const, ATYPE_NUM*sizeof(float));
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_atom1_types_reqm_const, &KerConstStatic.atom1_types_reqm_const, ATYPE_NUM*sizeof(unsigned int));
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_atom2_types_reqm_const, &KerConstStatic.atom2_types_reqm_const, ATYPE_NUM*sizeof(unsigned int));
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_VWpars_AC_const, &KerConstStatic.VWpars_AC_const[0], MAX_NUM_OF_ATYPES*MAX_NUM_OF_ATYPES*sizeof(float));
memcopyBufferObjectToDevice(command_queue1,mem_KerConstStatic_VWpars_BD_const, &KerConstStatic.VWpars_BD_const[0], MAX_NUM_OF_ATYPES*MAX_NUM_OF_ATYPES*sizeof(float));
......@@ -1016,19 +1032,26 @@ 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);
*/
......@@ -2963,7 +2986,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);}
......
......@@ -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;
......
  • Results of FPGA fitting process:

    Fitter Status Successful - Fri Jun 1 23:05:34 2018
    Quartus Prime Version 16.0.2 Build 222 07/20/2016 Patches 2.06 SJ Pro Edition
    Revision Name top
    Top-level Entity Name top
    Family Arria 10
    Device 10AX115H3F34I2SG
    Timing Models Final
    Logic utilization (in ALMs) 226,888 / 427,200 ( 53 % )
    Total registers 455472
    Total pins 169 / 618 ( 27 % )
    Total virtual pins 0
    Total block memory bits 24,415,503 / 55,562,240 ( 44 % )
    Total RAM Blocks 1,939 / 2,713 ( 71 % )
    Total DSP Blocks 670 / 1,518 ( 44 % )
    Total HSSI RX channels 8 / 24 ( 33 % )
    Total HSSI TX channels 8 / 24 ( 33 % )
    Total PLLs 30 / 80 ( 38 % )
    DC4b (FPL/FSP) This commit (DC4b + smoothing)
    Freq 187.5 MHz 190 MHz
    Best E, Best clusterSize, Time (Kcal/mol), (no units), (sec)
    3ptb -5.53, 66/100, 211 -5.52, 50/100, 213
    1stp -7.76, 69/100, 385 -7.75, 59/100, 377
    4hmg -4.11, 25/100, 623 -3.62, 45/100, 566
    3ce3 -10.88, 48/100, 1077 -10.93, 36/100, 1063
    3c1x -12.61, 22/100, 1487 -13.15, 51/100, 1486
    Edited by Leonardo Solis
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment