Commit 93199dc1 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

correction torsion-tsri

parent 87affbaf
......@@ -3,13 +3,28 @@
#define STRINGIFY_H
const char *calcenergy_ocl =
"/*\n"
" * (C) 2013. Evopro Innovation Kft.\n"
" *\n"
" * defines.h\n"
" *\n"
" * Created on: 2009.05.29.\n"
" * Author: pechan.imre\n"
" */\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"#ifndef DEFINES_H_\n"
"#define DEFINES_H_\n"
......@@ -22,15 +37,17 @@ const char *calcenergy_ocl =
" #define NUM_OF_THREADS_PER_BLOCK 64\n"
"#elif defined (N128WI)\n"
" #define NUM_OF_THREADS_PER_BLOCK 128\n"
"#elif defined (N256WI)\n"
" #define NUM_OF_THREADS_PER_BLOCK 256\n"
"#else\n"
" #define NUM_OF_THREADS_PER_BLOCK 64\n"
"#endif\n"
"\n"
"#define MAX_NUM_OF_ATOMS 90\n"
"#define MAX_NUM_OF_ATOMS 256\n"
"#define MAX_NUM_OF_ATYPES 14\n"
"#define MAX_INTRAE_CONTRIBUTORS 8128\n"
"#define MAX_NUM_OF_ROTATIONS 4096\n"
"#define MAX_NUM_OF_ROTBONDS 32\n"
"#define MAX_INTRAE_CONTRIBUTORS MAX_NUM_OF_ATOMS * MAX_NUM_OF_ATOMS\n"
"#define MAX_NUM_OF_ROTATIONS MAX_NUM_OF_ATOMS * MAX_NUM_OF_ROTBONDS\n"
"#define MAX_POPSIZE 2048\n"
"#define MAX_NUM_OF_RUNS 1000\n"
"\n"
......@@ -49,6 +66,30 @@ const char *calcenergy_ocl =
"#define MAPPED_COPY\n"
"\n"
"#endif /* DEFINES_H_ */\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"#ifndef CALCENERGY_BASIC_H_\n"
"#define CALCENERGY_BASIC_H_\n"
"\n"
......@@ -84,6 +125,30 @@ const char *calcenergy_ocl =
" cube[0][1][1]*weights[0][1][1] +cube[1][1][1]*weights[1][1][1])\n"
"\n"
"#endif /* CALCENERGY_BASIC_H_ */\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"\n"
"// All related pragmas are in defines.h (accesible by host and device code)\n"
"\n"
......@@ -107,7 +172,7 @@ const char *calcenergy_ocl =
" __local float* genotype,\n"
" __local float* energy,\n"
" __local int* run_id,\n"
" \n"
"\n"
" // Some OpenCL compilers don't allow local var outside kernels\n"
" // so this local vars are passed from a kernel\n"
" __local float* calc_coords_x,\n"
......@@ -137,7 +202,7 @@ const char *calcenergy_ocl =
"//determines which reference orientation should be used.\n"
"{\n"
" int contributor_counter;\n"
" char atom1_id, atom2_id, atom1_typeid, atom2_typeid;\n"
" /*char*/uint atom1_id, atom2_id, atom1_typeid, atom2_typeid;\n"
"\n"
" // Name changed to distance_leo to avoid\n"
" // errors as \"distance\" is the name of OpenCL function\n"
......@@ -677,6 +742,30 @@ const char *calcenergy_ocl =
" }\n"
"}\n"
"\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"__kernel void __attribute__ ((reqd_work_group_size(NUM_OF_THREADS_PER_BLOCK,1,1)))\n"
"gpu_calc_initpop( char dockpars_num_of_atoms,\n"
" char dockpars_num_of_atypes,\n"
......@@ -788,6 +877,30 @@ const char *calcenergy_ocl =
" dockpars_evals_of_new_entities[get_group_id(0)] = 1;\n"
" }\n"
"}\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"__kernel void __attribute__ ((reqd_work_group_size(NUM_OF_THREADS_PER_BLOCK,1,1)))\n"
"gpu_sum_evals(/*unsigned long pop_size,*/\n"
" unsigned int pop_size,\n"
......@@ -844,6 +957,30 @@ const char *calcenergy_ocl =
" evals_of_runs[get_group_id(0)] += sum_evals;\n"
" }\n"
"}\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"// -------------------------------------------------------\n"
"//\n"
"// -------------------------------------------------------\n"
......@@ -1032,6 +1169,30 @@ const char *calcenergy_ocl =
" //dockpars_conformations_next[GENOTYPE_LENGTH_IN_GLOBMEM*get_group_id(0)+gene_counter] = dockpars_conformations_current[GENOTYPE_LENGTH_IN_GLOBMEM*get_group_id(0)+GENOTYPE_LENGTH_IN_GLOBMEM*best_ID+gene_counter];\n"
" dockpars_conformations_next[GENOTYPE_LENGTH_IN_GLOBMEM*get_group_id(0)+gene_counter] = dockpars_conformations_current[GENOTYPE_LENGTH_IN_GLOBMEM*get_group_id(0)+GENOTYPE_LENGTH_IN_GLOBMEM*best_ID[0]+gene_counter];\n"
"}\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"__kernel void __attribute__ ((reqd_work_group_size(NUM_OF_THREADS_PER_BLOCK,1,1)))\n"
"perform_LS( char dockpars_num_of_atoms,\n"
" char dockpars_num_of_atypes,\n"
......@@ -1400,6 +1561,30 @@ const char *calcenergy_ocl =
" dockpars_conformations_next[(run_id*dockpars_pop_size+entity_id)*GENOTYPE_LENGTH_IN_GLOBMEM+gene_counter] = offspring_genotype[gene_counter];\n"
"#endif\n"
"}\n"
"/*\n"
"\n"
"OCLADock, an OpenCL implementation of AutoDock 4.2 running a Lamarckian Genetic Algorithm\n"
"Copyright (C) 2017 TU Darmstadt, Embedded Systems and Applications Group, Germany. All rights reserved.\n"
"\n"
"AutoDock is a Trade Mark of the Scripps Research Institute.\n"
"\n"
"This program is free software; you can redistribute it and/or\n"
"modify it under the terms of the GNU General Public License\n"
"as published by the Free Software Foundation; either version 2\n"
"of the License, or (at your option) any later version.\n"
"\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n"
"\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program; if not, write to the Free Software\n"
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n"
"\n"
"*/\n"
"\n"
"\n"
"__kernel void __attribute__ ((reqd_work_group_size(NUM_OF_THREADS_PER_BLOCK,1,1)))\n"
"gpu_gen_and_eval_newpops(char dockpars_num_of_atoms,\n"
" char dockpars_num_of_atypes,\n"
......
......@@ -755,13 +755,14 @@ 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 [][]
......@@ -792,7 +793,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
......@@ -812,7 +813,7 @@ int get_liganddata(const char* ligfilename, Liganddata* myligand, const double A
}
*/
// ---------------------------
#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]))
......
Supports Markdown
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