Commit bf98fbb6 authored by Leonardo Solis's avatar Leonardo Solis

minor cleans

parent 0f5ff60c
......@@ -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,
......@@ -230,7 +229,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)
......@@ -576,7 +574,6 @@ void get_commandpars(const int* argc,
}
if (arg_recognized != 1)
printf("Warning: unknown argument '%s'.\n", argv [i]);
}
//validating some settings
......
......@@ -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, ".");
......
......@@ -54,11 +54,9 @@ void arrange_result(float* final_population, float* energies, const int pop_size
void write_basic_info(FILE* fp, const Liganddata* ligand_ref, const Dockpars* mypars, const Gridinfo* mygrid, const int* argc, char** argv)
//The function writes basic information (such as docking parameters) to the file whose file pointer is the first parameter of the function.
{
char temp_filename [128];
int i;
fprintf(fp, "***********************************\n");
fprintf(fp, "** OCLADOCK REPORT FILE **\n");
fprintf(fp, "***********************************\n\n\n");
......@@ -110,7 +108,6 @@ void write_basic_info(FILE* fp, const Liganddata* ligand_ref, const Dockpars* my
fprintf(fp, "%s ", argv [i]);
fprintf(fp, "\n\n\n");
//Writing out receptor parameters
fprintf(fp, " RECEPTOR PARAMETERS \n");
......@@ -122,7 +119,6 @@ void write_basic_info(FILE* fp, const Liganddata* ligand_ref, const Dockpars* my
fprintf(fp, "Grid spacing: %lfA\n", mygrid->spacing);
fprintf(fp, "\n\n");
//Writing out ligand parameters
strncpy(temp_filename, mypars->ligandfile, strlen(mypars->ligandfile) - 6);
......@@ -141,17 +137,14 @@ void write_basic_info(FILE* fp, const Liganddata* ligand_ref, const Dockpars* my
fprintf(fp, "Number of rotation cycles: %d\n", ligand_ref->num_of_rotcyc);
fprintf(fp, "\n\n");
}
void write_basic_info_dlg(FILE* fp, const Liganddata* ligand_ref, const Dockpars* mypars, const Gridinfo* mygrid, const int* argc, char** argv)
//The function writes basic information (such as docking parameters) to the file whose file pointer is the first parameter of the function.
{
char temp_filename [128];
int i;
fprintf(fp, "**********************************************************\n");
fprintf(fp, "** OCLADOCK AUTODOCKTOOLS-COMPATIBLE DLG FILE **\n");
fprintf(fp, "**********************************************************\n\n\n");
......@@ -195,7 +188,6 @@ void write_basic_info_dlg(FILE* fp, const Liganddata* ligand_ref, const Dockpars
fprintf(fp, "%s ", argv [i]);
fprintf(fp, "\n\n\n");
//Writing out receptor parameters
fprintf(fp, " GRID PARAMETERS\n");
......@@ -257,13 +249,10 @@ void make_resfiles(float* final_population, float* energies, const Liganddata* l
int pop_size = mypars->pop_size;
sprintf(temp_filename, "final_population_run%d.txt", run_cnt+1);
if (mypars->gen_finalpop != 0) //if final population files are not required, no file will be opened.
{
fp = fopen(temp_filename, "w");
write_basic_info(fp, ligand_ref, mypars, mygrid, argc, argv); //Write basic information about docking and molecule parameters to file
......@@ -273,7 +262,6 @@ void make_resfiles(float* final_population, float* energies, const Liganddata* l
fprintf(fp, "Number of energy evaluations performed: %ld\n", evals_performed);
fprintf(fp, "Number of generations used: %ld\n", generations_used);
fprintf(fp, "\n\n");
}
//Writing out state of final population
......@@ -307,7 +295,7 @@ void make_resfiles(float* final_population, float* energies, const Liganddata* l
#endif
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
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
//copying best result to output parameter
......
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