Commit e67c351f authored by Leonardo Solis's avatar Leonardo Solis

merged #40 (better hardcoding) into fastergrad

parents 29471253 01a20022
......@@ -39,7 +39,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define NUM_OF_THREADS_PER_BLOCK 64
#endif
#define ATYPE_NUM 22
#define ATYPE_NUM 22 // initial: 22
#define ATYPE_GETBONDS 16 // initial: 16
#define MAX_NUM_OF_ATOMS 256
#define MAX_NUM_OF_ATYPES 14
#define MAX_NUM_OF_ROTBONDS 32
......
......@@ -298,8 +298,6 @@ int prepare_const_fields_for_gpu(Liganddata* myligand_reference,
// "atom_rotbonds": array that contains the rotatable bonds - atoms assignment.
// If the element atom_rotbonds[atom index][rotatable bond index] is equal to 1,
// it means,that the atom must be rotated if the bond rotates. A 0 means the opposite.
for (i=0; i<MAX_NUM_OF_ROTBONDS; i++)
{
num_rotating_atoms_per_rotbond [i] = 0;
......
......@@ -21,7 +21,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "getparameters.h"
int get_filenames_and_ADcoeffs(const int* argc,
......@@ -232,7 +231,6 @@ void get_commandpars(const int* argc,
printf("Warning: value of -dang argument ignored. Value must be a float between 0 and 180.\n");
}
//Argument: mutation rate. Must be a float between 0 and 100.
//Means the rate of mutations (cca) in percent.
if (strcmp("-mrat", argv [i]) == 0)
......
......@@ -123,21 +123,6 @@ void vec_point2line(const double point [], const double line_pointA [], const do
vec [i] = proj_of_point [i] - point [i];
}
// -------------------------------------------------------------------
// L30nardoSV
// Replacing rotation genes: from spherical space to Shoemake space
// gene [0:2]: translation -> kept as original x, y, z
// gene [3:5]: rotation -> transformed into Shoemake (u1: adimensional, u2&u3: sexagesimal)
// gene [6:N]: torsions -> kept as original angles (all in sexagesimal)
// Shoemake ranges:
// u1: [0, 1]
// u2: [0: 2PI] or [0: 360]
// Random generator in the host is changed:
// LCG (original, myrand()) -> CPP std (rand())
// -------------------------------------------------------------------
void rotate(double point [], const double movvec [], const double normvec [], const double* angle, int debug)
//The function rotates the point given by the first parameter around an axis
//which is parallel to vector normvec and which
......@@ -169,10 +154,9 @@ void rotate(double point [], const double movvec [], const double normvec [], co
//q^-1 = quater_w-i*quater_x-j*quater_y-k*quater_z
//and * is the quaternion multiplication defined as follows:
//(a1+i*b1+j*c1+k*d1)*(a2+i*b2+j*c2+k*d2) = (a1a2-b1b2-c1c2-d1d2)+
// i*(a1b2+a2b1+c1d2-c2d1)+
// j*(a1c2+a2c1+b2d1-b1d2)+
// k*(a1d2+a2d1+b1c2-b2c1)
//
//i*(a1b2+a2b1+c1d2-c2d1)+
//j*(a1c2+a2c1+b2d1-b1d2)+
//k*(a1d2+a2d1+b1c2-b2c1)
anglediv2 = (*angle)/2/180*PI;
cos_anglediv2 = cos(anglediv2);
......@@ -252,6 +236,19 @@ void rotate(double point [], const double movvec [], const double normvec [], co
}
#if 0
// -------------------------------------------------------------------
// Replacing rotation genes: from spherical space to Shoemake space
// gene [0:2]: translation -> kept as original x, y, z
// gene [3:5]: rotation -> transformed into Shoemake (u1: adimensional, u2&u3: sexagesimal)
// gene [6:N]: torsions -> kept as original angles (all in sexagesimal)
// Shoemake ranges:
// u1: [0, 1]
// u2: [0: 2PI] or [0: 360]
// Random generator in the host is changed:
// LCG (original, myrand()) -> CPP std (rand())
// -------------------------------------------------------------------
void rotate_shoemake(double point [],
const double movvec [],
const double shoemake [],
......@@ -293,10 +290,9 @@ void rotate_shoemake(double point [],
//q^-1 = quater_w-i*quater_x-j*quater_y-k*quater_z
//and * is the quaternion multiplication defined as follows:
//(a1+i*b1+j*c1+k*d1)*(a2+i*b2+j*c2+k*d2) = (a1a2-b1b2-c1c2-d1d2)+
// i*(a1b2+a2b1+c1d2-c2d1)+
// j*(a1c2+a2c1+b2d1-b1d2)+
// k*(a1d2+a2d1+b1c2-b2c1)
//
//i*(a1b2+a2b1+c1d2-c2d1)+
//j*(a1c2+a2c1+b2d1-b1d2)+
//k*(a1d2+a2d1+b1c2-b2c1)
/*
anglediv2 = (*angle)/2/180*PI;
......@@ -388,25 +384,6 @@ void rotate_shoemake(double point [],
}
#endif
double angle_of_vectors(const double vector1 [], const double vector2 [])
//The function's inputs are two position vectors (whose starting point is the origo).
//The function returns the angle between them.
......@@ -489,7 +466,6 @@ void print_binary_string(unsigned long long to_print)
}
#ifndef _WIN32
// OCLADock
// This was disabled for Windows
int stricmp(const char* str1, const char* str2)
//The function compares the two input strings and
......@@ -527,8 +503,6 @@ int stricmp(const char* str1, const char* str2)
}
#endif
unsigned int genseed(unsigned int init)
//The function generates random numbers with a linear congruential generator,
//using Visual C++ generator constants.
......
......@@ -39,7 +39,6 @@ int get_gridinfo(const char* fldfilename, Gridinfo* mygrid)
//char* filename = basename(ts1);
#ifndef _WIN32
// OCLADock
char* ts1 = strdup(fldfilename);
mygrid->grid_file_path = dirname(ts1);
#else
......@@ -168,7 +167,6 @@ int get_gridvalues_f(const Gridinfo* mygrid, float** fgrids)
strcat(tempstr, "/");
strcat(tempstr, mygrid->receptor_name);
// OCLADock
//strcpy(tempstr, mygrid->receptor_name);
//-------------------------------------
strcat(tempstr, ".");
......
......@@ -36,7 +36,10 @@ int init_liganddata(const char* ligfilename,
{
FILE* fp;
int num_of_atypes, i, new_type;
#if 0
char atom_types [14][3];
#endif
char atom_types [MAX_NUM_OF_ATYPES][3];
char tempstr [256];
fp = fopen(ligfilename, "rb"); // fp = fopen(ligfilename, "r");
......@@ -78,7 +81,11 @@ int init_liganddata(const char* ligfilename,
if (new_type == 1) //if new type, copying string...
{
if (num_of_atypes >= 14) //checking if atom type number doesn't exceed 14
//checking if atom type number doesn't exceed 14
#if 0
if (num_of_atypes >= 14)
#endif
if (num_of_atypes >= MAX_NUM_OF_ATYPES)
{
printf("Error: too many types of ligand atoms!\n");
return 1;
......@@ -144,8 +151,12 @@ void get_intraE_contributors(Liganddata* myligand)
{
int atom_id1, atom_id2, atom_id3, rotb_id1, rotb_id2;
#if 0
char atom_neighbours [256];
char atom_neighbours_temp [256];
#endif
char atom_neighbours [MAX_NUM_OF_ATOMS];
char atom_neighbours_temp [MAX_NUM_OF_ATOMS];
int atom_id_a, atom_id_b, structure_id_A, structure_id_B;
int atom_id_a2, atom_id_b2;
......@@ -301,15 +312,38 @@ int get_bonds(Liganddata* myligand)
//which can be calculated from the atom_idxyzq field, so this field must contain valid data
//when calling this function.
{
#if 0
char atom_names [16][3];
#endif
char atom_names [ATYPE_GETBONDS][3];
//atom type indexes which refer to the atom type's bond type (length range)
#if 0
char bondtype_id [16] = {0, 0, 3,
1, 2, 4,
4, 5, 6,
4, 4, 4,
4, 4, 4,
4};
#endif
char bondtype_id [ATYPE_GETBONDS] = {
0, // "C"
0, // "A"
3, // "Hx"
1, // "Nx"
2, // "Ox"
4, // "F"
4, // "MG"
5, // "P"
6, // "Sx"
4, // "CL"
4, // "CA"
4, // "MN"
4, // "FE"
4, // "ZN"
4, // "BR"
4 // "I"
};
double mindist[7][7];
double maxdist[7][7];
......@@ -323,16 +357,16 @@ int get_bonds(Liganddata* myligand)
int atom_nameid1, atom_nameid2;
int bondtype_id1, bondtype_id2;
strcpy(atom_names[0], "C");
strcpy(atom_names[1], "A");
strcpy(atom_names[2], "Hx");
strcpy(atom_names[3], "Nx");
strcpy(atom_names[4], "Ox");
strcpy(atom_names[5], "F");
strcpy(atom_names[6], "MG");
strcpy(atom_names[7], "P");
strcpy(atom_names[8], "Sx");
strcpy(atom_names[9], "CL");
strcpy(atom_names[0], "C");
strcpy(atom_names[1], "A");
strcpy(atom_names[2], "Hx");
strcpy(atom_names[3], "Nx");
strcpy(atom_names[4], "Ox");
strcpy(atom_names[5], "F");
strcpy(atom_names[6], "MG");
strcpy(atom_names[7], "P");
strcpy(atom_names[8], "Sx");
strcpy(atom_names[9], "CL");
strcpy(atom_names[10], "CA");
strcpy(atom_names[11], "MN");
strcpy(atom_names[12], "FE");
......@@ -392,11 +426,18 @@ int get_bonds(Liganddata* myligand)
temp_point2[2] = myligand->atom_idxyzq[atom_id2][3];
temp_dist = distance(temp_point1, temp_point2);
# if 0
atom_nameid1 = 16;
atom_nameid2 = 16;
#endif
atom_nameid1 = ATYPE_GETBONDS;
atom_nameid2 = ATYPE_GETBONDS;
//identifying atom types
#if 0
for (i=0; i<16; i++)
#endif
for (i=0; i<ATYPE_GETBONDS; i++)
{
atom_typeid1 = myligand->atom_idxyzq[atom_id1][0];
if (atom_names[i][1] == 'x')
......@@ -406,51 +447,56 @@ int get_bonds(Liganddata* myligand)
}
else
{
// OCLADock
if (stricmp(atom_names[i], myligand->atom_types[atom_typeid1]) == 0)
//if (_stricmp(atom_names[i], myligand->atom_types[atom_typeid1]) == 0)
if (stricmp(atom_names[i], myligand->atom_types[atom_typeid1]) == 0)
//if (_stricmp(atom_names[i], myligand->atom_types[atom_typeid1]) == 0)
atom_nameid1 = i;
}
}
for (i=0; i<16; i++)
{
atom_typeid2 = myligand->atom_idxyzq[atom_id2][0];
if (atom_names[i][1] == 'x')
{
#if 0
for (i=0; i<16; i++)
#endif
for (i=0; i<ATYPE_GETBONDS; i++)
{
atom_typeid2 = myligand->atom_idxyzq[atom_id2][0];
if (atom_names[i][1] == 'x')
{
if (atom_names[i][0] == toupper(myligand->atom_types[atom_typeid2][0]))
atom_nameid2 = i;
}
else
{
// OCLADock
if (stricmp(atom_names[i], myligand->atom_types[atom_typeid2]) == 0)
//if (_stricmp(atom_names[i], myligand->atom_types[atom_typeid2]) == 0)
if (stricmp(atom_names[i], myligand->atom_types[atom_typeid2]) == 0)
//if (_stricmp(atom_names[i], myligand->atom_types[atom_typeid2]) == 0)
atom_nameid2 = i;
}
}
}
#if 0
if ((atom_nameid1 == 16) || (atom_nameid2 == 16))
#endif
if ((atom_nameid1 == ATYPE_GETBONDS) || (atom_nameid2 == ATYPE_GETBONDS))
{
printf("Error: Ligand includes atom with unknown type: %s!\n", myligand->atom_types[atom_typeid1]);
return 1;
}
bondtype_id1 = bondtype_id[atom_nameid1];
bondtype_id2 = bondtype_id[atom_nameid2];
if (((temp_dist >= mindist [bondtype_id1][bondtype_id2]) && (temp_dist <= maxdist [bondtype_id1][bondtype_id2])) || (atom_id1 == atom_id2))
{
myligand->bonds [atom_id1][atom_id2] = 1;
myligand->bonds [atom_id2][atom_id1] = 1;
}
else
{
myligand->bonds [atom_id1][atom_id2] = 0;
myligand->bonds [atom_id2][atom_id1] = 0;
}
bondtype_id1 = bondtype_id[atom_nameid1];
bondtype_id2 = bondtype_id[atom_nameid2];
if (((temp_dist >= mindist [bondtype_id1][bondtype_id2]) && (temp_dist <= maxdist [bondtype_id1][bondtype_id2])) || (atom_id1 == atom_id2))
{
myligand->bonds [atom_id1][atom_id2] = 1;
myligand->bonds [atom_id2][atom_id1] = 1;
}
else
{
myligand->bonds [atom_id1][atom_id2] = 0;
myligand->bonds [atom_id2][atom_id1] = 0;
}
}
return 0;
return 0;
}
int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD4_coeff_hb)
......@@ -462,64 +508,72 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
char atom_names [ATYPE_NUM][3];
//Sum of vdW radii of two like atoms (A)
double reqm [ATYPE_NUM] = {2.00, 2.00, 2.00, 4.00, 4.00,
3.50, 3.50, 3.50, 3.20, 3.20,
3.09, 1.30, 4.20, 4.00, 4.00,
4.09, 1.98, 1.30, 1.30, 1.48,
4.33, 4.72};
double reqm [ATYPE_NUM] = {
2.00, 2.00, 2.00, 4.00, 4.00,
3.50, 3.50, 3.50, 3.20, 3.20,
3.09, 1.30, 4.20, 4.00, 4.00,
4.09, 1.98, 1.30, 1.30, 1.48,
4.33, 4.72
};
//cdW well depth (kcal/mol)
double eps [ATYPE_NUM] = {0.020, 0.020, 0.020, 0.150, 0.150,
0.160, 0.160, 0.160, 0.200, 0.200,
0.080, 0.875, 0.200, 0.200, 0.200,
0.276, 0.550, 0.875, 0.010, 0.550,
0.389, 0.550};
double eps [ATYPE_NUM] = {
0.020, 0.020, 0.020, 0.150, 0.150,
0.160, 0.160, 0.160, 0.200, 0.200,
0.080, 0.875, 0.200, 0.200, 0.200,
0.276, 0.550, 0.875, 0.010, 0.550,
0.389, 0.550
};
//Sum of vdW radii of two like atoms (A) in case of hydrogen bond
double reqm_hbond [ATYPE_NUM] = {0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 1.9, 1.9, 1.9, 1.9,
0.0, 0.0, 0.0, 2.5, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0};
double reqm_hbond [ATYPE_NUM] = {
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 1.9, 1.9, 1.9, 1.9,
0.0, 0.0, 0.0, 2.5, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0
};
//cdW well depth (kcal/mol) in case of hydrogen bond
double eps_hbond [ATYPE_NUM] = {0.0, 1.0, 1.0, 0.0, 0.0, //HD and HS value is 1 so that it is not necessary to decide which atom_typeid
0.0, 5.0, 5.0, 5.0, 5.0, //corresponds to the hydrogen when reading eps_hbond...
0.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0};
double eps_hbond [ATYPE_NUM] = {
0.0, 1.0, 1.0, 0.0, 0.0, //HD and HS value is 1 so that it is not necessary to decide which atom_typeid
0.0, 5.0, 5.0, 5.0, 5.0, //corresponds to the hydrogen when reading eps_hbond...
0.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0
};
//volume of atoms
double volume [ATYPE_NUM] = {0.0000, 0.0000, 0.0000, 33.5103, 33.5103,
22.4493, 22.4493, 22.4493, 17.1573, 17.1573,
15.4480, 1.5600, 38.7924, 33.5103, 33.5103,
35.8235, 2.7700, 2.1400, 1.8400, 1.7000,
42.5661, 55.0585};
double volume [ATYPE_NUM] = {
0.0000, 0.0000, 0.0000, 33.5103, 33.5103,
22.4493, 22.4493, 22.4493, 17.1573, 17.1573,
15.4480, 1.5600, 38.7924, 33.5103, 33.5103,
35.8235, 2.7700, 2.1400, 1.8400, 1.7000,
42.5661, 55.0585
};
//atomic solvation parameters
double solpar [ATYPE_NUM] = {0.00051, 0.00051, 0.00051, -0.00143, -0.00052,
-0.00162, -0.00162, -0.00162, -0.00251, -0.00251,
-0.00110, -0.00110, -0.00110, -0.00214, -0.00214,
-0.00110, -0.00110, -0.00110, -0.00110, -0.00110,
-0.00110, -0.00110};
double solpar [ATYPE_NUM] = {
0.00051, 0.00051, 0.00051, -0.00143, -0.00052,
-0.00162, -0.00162, -0.00162, -0.00251, -0.00251,
-0.00110, -0.00110, -0.00110, -0.00214, -0.00214,
-0.00110, -0.00110, -0.00110, -0.00110, -0.00110,
-0.00110, -0.00110
};
int atom_typeid1, atom_typeid2, VWid_atype1, VWid_atype2, i;
double eps12, reqm12;
strcpy(atom_names [0], "H");
strcpy(atom_names [1], "HD");
strcpy(atom_names [2], "HS");
strcpy(atom_names [3], "C");
strcpy(atom_names [4], "A");
strcpy(atom_names [5], "N");
strcpy(atom_names [6], "NA");
strcpy(atom_names [7], "NS");
strcpy(atom_names [8], "OA");
strcpy(atom_names [9], "OS");
strcpy(atom_names [0], "H");
strcpy(atom_names [1], "HD");
strcpy(atom_names [2], "HS");
strcpy(atom_names [3], "C");
strcpy(atom_names [4], "A");
strcpy(atom_names [5], "N");
strcpy(atom_names [6], "NA");
strcpy(atom_names [7], "NS");
strcpy(atom_names [8], "OA");
strcpy(atom_names [9], "OS");
strcpy(atom_names [10], "F");
strcpy(atom_names [11], "MG");
strcpy(atom_names [12], "P");
......@@ -540,30 +594,29 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
VWid_atype2 = ATYPE_NUM;
//identifying atom types
for (i=0; i<ATYPE_NUM; i++)
/*
// OCLADock
for (i=0; i<ATYPE_NUM; i++) {
/*
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++)
// OCLADock
/*
for (i=0; i<ATYPE_NUM; i++) {
/*
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)
{
......@@ -581,7 +634,7 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
if (is_H_bond(myligand->atom_types [atom_typeid1], myligand->atom_types [atom_typeid2]) != 0)
{
eps12 = AD4_coeff_hb * eps_hbond [VWid_atype1] * eps_hbond [VWid_atype2]; //The hydrogen's eps is 1, doesn't change the value...
reqm12 = reqm_hbond [VWid_atype1] + reqm_hbond [VWid_atype2]; //The hydrogen's is 0, doesn't change the value...
reqm12 = reqm_hbond [VWid_atype1] + reqm_hbond [VWid_atype2]; //The hydrogen's is 0, doesn't change the value...
myligand->VWpars_C [atom_typeid1][atom_typeid2] = 5*eps12*pow(reqm12, 12);
myligand->VWpars_D [atom_typeid1][atom_typeid2] = 6*eps12*pow(reqm12, 10);
myligand->VWpars_A [atom_typeid1][atom_typeid2] = 0;
......@@ -596,11 +649,10 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
myligand->VWpars_C [atom_typeid1][atom_typeid2] = 0;
myligand->VWpars_D [atom_typeid1][atom_typeid2] = 0;
/*
/*
// ----------------------------------
// ocladock test, smoothing
// remove after successful test
eps12 = AD4_coeff_vdW * sqrt(eps [3]*eps [8]); //weighting with coefficient for van der Waals term
// Smoothing test
eps12 = AD4_coeff_vdW * sqrt(eps [3]*eps [8]); //weighting with coefficient for van der Waals term
reqm12 = 0.5*(reqm [3]+reqm [8]);
printf("epsii (C): %f\n", eps [3]);
......@@ -609,10 +661,8 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
printf("rij: %f\n", reqm12);
printf("C12=%f\n", eps12*pow(reqm12, 12));
printf("C6=%f\n", 2*eps12*pow(reqm12, 6));
// ----------------------------------
*/
*/
}
}
......@@ -627,7 +677,6 @@ int get_VWpars(Liganddata* myligand, const double AD4_coeff_vdW, const double AD
//identifying atom type
for (i=0; i<ATYPE_NUM; i++)
// 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;
......@@ -788,14 +837,6 @@ int get_liganddata(const char* ligfilename, Liganddata* myligand, const double A
myligand->atom_rigid_structures [atom_counter] = current_rigid_struct_id; //using the id of the current rigid structure
atom_counter++;
#if 0
// include last atom
if (atom_counter == myligand->num_of_atoms) {
for (i=0; i<branch_counter; i++) //for all branches found until now
if (branches [i][2] == 1) //if it is open, the atom has to be rotated
atom_rotbonds_temp [atom_counter][i] = 1; //modifying atom_rotbonds_temp
}
#endif
}
if (strcmp(tempstr, "BRANCH") == 0) //if new branch, stroing atom indexes into branches [][]
......@@ -826,27 +867,7 @@ int get_liganddata(const char* ligfilename, Liganddata* myligand, const double A
fscanf(fp, "%d", &(myligand->rotbonds [endbranch_counter][1])); //of endbranches
(myligand->rotbonds [endbranch_counter][0])--;
(myligand->rotbonds [endbranch_counter][1])--;
#if 0
// include last atom before ENDBRANCH
//if (atom_counter == myligand->num_of_atoms) {
for (i=0; i<branch_counter; i++) //for all branches found until now
if (branches [i][2] == 1) //if it is open, the atom has to be rotated
atom_rotbonds_temp [atom_counter][i] = 1; //modifying atom_rotbonds_temp
// ---------------------------
/*
// print torsions
printf("%s", "\n");
for (int a=0;a<atom_counter+2;a++) {
printf("%-3u: ", a);
for (i=0;i<branch_counter;i++) {
printf("%u", atom_rotbonds_temp[a][i]);
}
printf("%s", "\n");
}
*/
// ---------------------------
#endif
for (i=0; i<branch_counter; i++) //the branch have to be closed
if ((branches [i][0] == myligand->rotbonds [endbranch_counter][0]) &&
(branches [i][1] == myligand->rotbonds [endbranch_counter][1]))
......@@ -854,11 +875,6 @@ int get_liganddata(const char* ligfilename, Liganddata* myligand, const double A
endbranch_counter++;
current_rigid_struct_id--; //probably unnecessary since there is a new branch after every endbranch...
}
}
......@@ -1078,14 +1094,14 @@ int is_H_bond(const char* atype1, const char* atype2)
//otherwise it returns 0.
{
if ( //H-bond
(((strcmp(atype1, "HD") == 0) || (strcmp(atype1, "HS") == 0)) && //HD or HS
(((strcmp(atype1, "HD") == 0) || (strcmp(atype1, "HS") == 0)) && //HD or HS
( (strcmp(atype2, "NA") == 0) ||
(strcmp(atype2, "NS") == 0) ||
(strcmp(atype2, "OA") == 0) ||
(strcmp(atype2, "OS") == 0) ||
(strcmp(atype2, "SA") == 0) )) //NA NS OA OS or SA
||
(((strcmp(atype2, "HD") == 0) || (strcmp(atype2, "HS") == 0)) && //HD or HS
(((strcmp(atype2, "HD") == 0) || (strcmp(atype2, "HS") == 0)) && //HD or HS
( (strcmp(atype1, "NA") == 0) ||
(strcmp(atype1, "NS") == 0) ||
(strcmp(atype1, "OA") == 0) ||
......@@ -1124,13 +1140,13 @@ void print_ref_lig_energies_f(Liganddata myligand,
}
#endif
void print_ref_lig_energies_f(Liganddata myligand,
const float smooth,
Gridinfo mygrid,
void print_ref_lig_energies_f(Liganddata myligand,
const float smooth,
Gridinfo mygrid,
const float* fgrids,
const float scaled_AD4_coeff_elec,
const float AD4_coeff_desolv,
const float qasp)
const float scaled_AD4_coeff_elec,
const float AD4_coeff_desolv,
const float qasp)
//The function calculates the energies of the ligand given in the first parameter,