Commit d83d530e authored by Leonardo Solis's avatar Leonardo Solis
Browse files

added intramolecular gradients

parent f79a7104
......@@ -198,7 +198,7 @@ odock: check-env-all stringify $(SRC)
# Example
PDB := 3ce3
NRUN := 200
NRUN := 100
POPSIZE := 2048
TESTNAME:= test
......
......@@ -27,19 +27,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "defines.h"
#define RLIST_ATOMID_MASK 0x000000FF
#define RLIST_RBONDID_MASK 0x0000FF00
#define RLIST_RBONDID_SHIFT 8
#define RLIST_FIRSTROT_MASK 0x00010000
#define RLIST_GENROT_MASK 0x00020000
#define RLIST_DUMMY_MASK 0x00040000
#define DEG_TO_RAD 0.0174533f
#define RLIST_ATOMID_MASK 0x000000FF
#define RLIST_RBONDID_MASK 0x0000FF00
#define RLIST_RBONDID_SHIFT 8
#define RLIST_FIRSTROT_MASK 0x00010000
#define RLIST_GENROT_MASK 0x00020000
#define RLIST_DUMMY_MASK 0x00040000
#define DEG_TO_RAD 0.0174533f
// LCG: linear congruential generator constants
#define RAND_A 1103515245u
#define RAND_C 12345u
#define RAND_A 1103515245u
#define RAND_C 12345u
// WARNING: it is supposed that unsigned int is 32 bit long
#define MAX_UINT 4294967296.0f
#define MAX_UINT 4294967296.0f
// Macro for capturing grid values
// Original
......@@ -57,6 +57,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
cube[0][0][1]*weights[0][0][1] +cube[1][0][1]*weights[1][0][1] + \
cube[0][1][1]*weights[0][1][1] +cube[1][1][1]*weights[1][1][1])
// Constants for dielelectric term of the intramolecular energy/gradient
#define DIEL_A -8.5525f
#define DIEL_WAT 78.4f
#define DIEL_B (DIEL_WAT - DIEL_A)
#define DIEL_LAMBDA 0.003627f
#define DIEL_H DIEL_LAMBDA
#define DIEL_K 7.7839f
// Used for Shoemake to quternion transformation
#define PI_TIMES_2 (float)(2.0f*M_PI)
......
......@@ -39,7 +39,7 @@ 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 256
#define MAX_NUM_OF_ATOMS 100 // TODO: optimize local arrays in gradient calc to increase this constant up to 256
#define MAX_NUM_OF_ATYPES 14
#define MAX_NUM_OF_ROTBONDS 32
#define MAX_INTRAE_CONTRIBUTORS (MAX_NUM_OF_ATOMS * MAX_NUM_OF_ATOMS)
......
This diff is collapsed.
......@@ -160,6 +160,15 @@ gradient_minimizer(
__local float gradient_inter_x[MAX_NUM_OF_ATOMS];
__local float gradient_inter_y[MAX_NUM_OF_ATOMS];
__local float gradient_inter_z[MAX_NUM_OF_ATOMS];
// Variables to store gradient of
// the intramolecular energy per each ligand atom
__local float gradient_intra_x[MAX_NUM_OF_ATOMS];
__local float gradient_intra_y[MAX_NUM_OF_ATOMS];
__local float gradient_intra_z[MAX_NUM_OF_ATOMS];
__local float gradient_per_intracontributor[MAX_INTRAE_CONTRIBUTORS];
// -------------------------------------------------------------------
// Variables to store partial energies
......@@ -231,6 +240,10 @@ gradient_minimizer(
gradient_inter_x,
gradient_inter_y,
gradient_inter_z,
gradient_intra_x,
gradient_intra_y,
gradient_intra_z,
gradient_per_intracontributor,
local_gradient
);
// =============================================================
......
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