Commit 13cf53f5 authored by lvs's avatar lvs
Browse files

solved #10

parent bcf40428
......@@ -37,11 +37,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define NUM_OF_THREADS_PER_BLOCK 64
#endif
#define MAX_NUM_OF_ATOMS 90
#define MAX_NUM_OF_ATOMS 256
#define MAX_NUM_OF_ATYPES 14
#define MAX_INTRAE_CONTRIBUTORS 8128
#define MAX_NUM_OF_ROTATIONS 4096
#define MAX_NUM_OF_ROTBONDS 32
#define MAX_INTRAE_CONTRIBUTORS MAX_NUM_OF_ATOMS * MAX_NUM_OF_ATOMS
#define MAX_NUM_OF_ROTATIONS MAX_NUM_OF_ATOMS * MAX_NUM_OF_ROTBONDS
#define MAX_POPSIZE 2048
#define MAX_NUM_OF_RUNS 1000
......
......@@ -46,7 +46,7 @@ void gpu_calc_energy( int dockpars_rotbondlist_length,
__local float* genotype,
__local float* energy,
__local int* run_id,
// Some OpenCL compilers don't allow local var outside kernels
// so this local vars are passed from a kernel
__local float* calc_coords_x,
......@@ -76,7 +76,7 @@ void gpu_calc_energy( int dockpars_rotbondlist_length,
//determines which reference orientation should be used.
{
int contributor_counter;
char atom1_id, atom2_id, atom1_typeid, atom2_typeid;
/*char*/uint atom1_id, atom2_id, atom1_typeid, atom2_typeid;
// Name changed to distance_leo to avoid
// errors as "distance" is the name of OpenCL function
......
......@@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// http://ask.systutorials.com/681/get-the-directory-path-and-file-name-from-absolute-path-linux
#endif
#include "defines.h"
#include "miscellaneous.h"
#define getvalue_4Darr(mempoi, grinf, t, z, y, x) *(mempoi + (grinf).size_xyz[0] * (y + (grinf).size_xyz[1] * (z + (grinf).size_xyz[2]*t)) + x)
......@@ -63,7 +64,7 @@ typedef struct
int size_xyz [3];
double spacing;
double size_xyz_angstr [3];
char grid_types [16][3];
char grid_types [MAX_NUM_OF_ATYPES+2][3]; // The additional two are the electrostatic and the desolvation types
int num_of_atypes;
double origo_real_xyz [3];
} Gridinfo;
......
......@@ -85,24 +85,24 @@ typedef struct
int num_of_atoms;
int num_of_atypes;
int num_of_rotbonds;
char atom_types [14][3]; //in the case of arrays, the first index is called row index,
double atom_idxyzq [256][5]; //the second is called column index
int rotbonds [32][2];
char atom_rotbonds [256][32];
int atom_rigid_structures [256];
char bonds [256][256];
char intraE_contributors [256][256];
double VWpars_A [14][14];
double VWpars_B [14][14];
double VWpars_C [14][14];
double VWpars_D [14][14];
double volume [14];
double solpar [14];
char atom_types [MAX_NUM_OF_ATYPES][3]; //in the case of arrays, the first index is called row index,
double atom_idxyzq [MAX_NUM_OF_ATOMS][5]; //the second is called column index
int rotbonds [MAX_NUM_OF_ROTBONDS][2];
char atom_rotbonds [MAX_NUM_OF_ATOMS][MAX_NUM_OF_ROTBONDS];
int atom_rigid_structures [MAX_NUM_OF_ATOMS];
char bonds [MAX_NUM_OF_ATOMS][MAX_NUM_OF_ATOMS];
char intraE_contributors [MAX_NUM_OF_ATOMS][MAX_NUM_OF_ATOMS];
double VWpars_A [MAX_NUM_OF_ATYPES][MAX_NUM_OF_ATYPES];
double VWpars_B [MAX_NUM_OF_ATYPES][MAX_NUM_OF_ATYPES];
double VWpars_C [MAX_NUM_OF_ATYPES][MAX_NUM_OF_ATYPES];
double VWpars_D [MAX_NUM_OF_ATYPES][MAX_NUM_OF_ATYPES];
double volume [MAX_NUM_OF_ATYPES];
double solpar [MAX_NUM_OF_ATYPES];
int num_of_rotations_required;
int num_of_intraE_contributors;
int num_of_rotcyc;
double rotbonds_moving_vectors [32][3];
double rotbonds_unit_vectors [32][3];
double rotbonds_moving_vectors [MAX_NUM_OF_ROTBONDS][3];
double rotbonds_unit_vectors [MAX_NUM_OF_ROTBONDS][3];
} Liganddata;
int init_liganddata(const char*, Liganddata*, Gridinfo*);
......
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