28 #ifdef MEM_OPT_VERSION
29 NAMD_die(
"Should not be called in ExclElem::getMoleculePointers in memory optimized version!");
32 *byatom = mol->exclusionsByAtom;
33 *structarray = mol->exclusions;
50 for (
int ituple=0; ituple<ntuple; ++ituple ) {
51 const ExclElem &tup = tuples[ituple];
68 if (
modified && r2 < 1.0 ) r2 = 1.0;
72 union {
double f;
int64 i; } r2i;
75 int table_i = (r2i.i >> (32+14)) + r2_delta_expc;
82 BigReal slow_a, slow_b, slow_c, slow_d;
93 BigReal vdw_d = A * table_four_i[0] - B * table_four_i[4];
94 BigReal vdw_c = A * table_four_i[1] - B * table_four_i[5];
95 BigReal vdw_b = A * table_four_i[2] - B * table_four_i[6];
96 BigReal vdw_a = A * table_four_i[3] - B * table_four_i[7];
108 slow_b = 2. * kqq * slow_table[4*table_i+2];
109 slow_c = 4. * kqq * slow_table[4*table_i+1];
110 slow_d = 6. * kqq * slow_table[4*table_i+0];
115 ( ( diffa * (1./6.)*vdw_d + 0.25*
vdw_c ) * diffa
116 + 0.5*vdw_b ) * diffa +
vdw_a;
118 ( ( diffa * (1./6.)*fast_d + 0.25*
fast_c ) * diffa
122 ( ( diffa * (1./6.)*slow_d + 0.25*slow_c ) * diffa
123 + 0.5*slow_b ) * diffa + slow_a;
132 }
else if ( doFull ) {
137 slow_d = kqq * ( table_four_i[8] - table_four_i[12] );
138 slow_c = kqq * ( table_four_i[9] - table_four_i[13] );
139 slow_b = kqq * ( table_four_i[10] - table_four_i[14] );
140 slow_a = kqq * ( table_four_i[11] - table_four_i[15] );
144 ( ( diffa * (1./6.)*slow_d + 0.25*slow_c ) * diffa
145 + 0.5*slow_b ) * diffa + slow_a;
152 const Force f12 = fast_dir * r12;
159 reduction[virialIndex_XX] += f12.
x * r12.x;
160 reduction[virialIndex_XY] += f12.
x * r12.y;
161 reduction[virialIndex_XZ] += f12.
x * r12.z;
162 reduction[virialIndex_YX] += f12.
y * r12.x;
163 reduction[virialIndex_YY] += f12.
y * r12.y;
164 reduction[virialIndex_YZ] += f12.
y * r12.z;
165 reduction[virialIndex_ZX] += f12.
z * r12.x;
166 reduction[virialIndex_ZY] += f12.
z * r12.y;
167 reduction[virialIndex_ZZ] += f12.
z * r12.z;
171 (diffa * slow_d + slow_c) * diffa + slow_b;
173 const Force slow_f12 = slow_dir * r12;
179 reduction[slowVirialIndex_XX] += slow_f12.
x * r12.x;
180 reduction[slowVirialIndex_XY] += slow_f12.
x * r12.y;
181 reduction[slowVirialIndex_XZ] += slow_f12.
x * r12.z;
182 reduction[slowVirialIndex_YX] += slow_f12.
y * r12.x;
183 reduction[slowVirialIndex_YY] += slow_f12.
y * r12.y;
184 reduction[slowVirialIndex_YZ] += slow_f12.
y * r12.z;
185 reduction[slowVirialIndex_ZX] += slow_f12.
z * r12.x;
186 reduction[slowVirialIndex_ZY] += slow_f12.
z * r12.y;
187 reduction[slowVirialIndex_ZZ] += slow_f12.
z * r12.z;
198 ADD_TENSOR(reduction,REDUCTION_VIRIAL_NBOND,data,virialIndex);
199 ADD_TENSOR(reduction,REDUCTION_VIRIAL_SLOW,data,slowVirialIndex);
static BigReal * fast_table
static int pressureProfileAtomTypes
register BigReal fast_dir
static BigReal dielectric_1
#define ADD_TENSOR(R, RL, D, DL)
static void submitReductionData(BigReal *, SubmitReduction *)
static void computeForce(ExclElem *, int, BigReal *, BigReal *)
if(ComputeNonbondedUtil::goMethod==2)
static void getParameterPointers(Parameters *, const int **)
static BigReal * r2_table
static BigReal * table_noshort
Vector delta(const Position &pos1, const Position &pos2) const
void NAMD_die(const char *err_msg)
static int pressureProfileSlabs
static BigReal * slow_table
BigReal length2(void) const
static const LJTable * ljTable
static BigReal pressureProfileThickness
static BigReal pressureProfileMin
const TableEntry * table_row(unsigned int i) const
static void getMoleculePointers(Molecule *, int *, int32 ***, Exclusion **)