29 #ifdef MEM_OPT_VERSION 30 NAMD_die(
"Should not be called in GromacsPairElem::getMoleculePointers in memory optimized version!");
33 *byatom = mol->gromacsPairByAtom;
34 *structarray = mol->gromacsPair;
41 *v=
p->gromacsPair_array;
49 for (
int ituple=0; ituple<ntuple; ++ituple ) {
71 if ( r12_len == 0 )
continue;
90 energy = (pairC12*ri12) - (pairC6*ri6);
96 diff = ((12*pairC12*ri14) - (6*pairC6*ri8));
103 const Force f12 = diff * r12;
111 DebugM(3,
"::computeForce() -- ending with delta energy " << energy << std::endl);
113 reduction[virialIndex_XX] += f12.
x * r12.x;
114 reduction[virialIndex_XY] += f12.
x * r12.y;
115 reduction[virialIndex_XZ] += f12.
x * r12.z;
116 reduction[virialIndex_YX] += f12.
y * r12.x;
117 reduction[virialIndex_YY] += f12.
y * r12.y;
118 reduction[virialIndex_YZ] += f12.
y * r12.z;
119 reduction[virialIndex_ZX] += f12.
z * r12.x;
120 reduction[virialIndex_ZY] += f12.
z * r12.y;
121 reduction[virialIndex_ZZ] += f12.
z * r12.z;
123 if (pressureProfileData) {
136 f12.
x * r12.x, f12.
y * r12.y, f12.
z * r12.z,
137 pressureProfileData);
147 ADD_TENSOR(reduction,REDUCTION_VIRIAL_NBOND,data,virialIndex);
static void getParameterPointers(Parameters *, const GromacsPairValue **)
static int pressureProfileSlabs
const GromacsPairValue * value
static void computeForce(GromacsPairElem *, int, BigReal *, BigReal *)
#define ADD_TENSOR(R, RL, D, DL)
void pp_reduction(int nslabs, int n1, int n2, int atype1, int atype2, int numtypes, BigReal vxx, BigReal vyy, BigReal vzz, BigReal *reduction)
SimParameters * simParameters
Molecule stores the structural information for the system.
static void submitReductionData(BigReal *, SubmitReduction *)
void pp_clamp(int &n, int nslabs)
NAMD_HOST_DEVICE BigReal length2(void) const
void NAMD_die(const char *err_msg)
static int pressureProfileAtomTypes
static void getMoleculePointers(Molecule *, int *, int32 ***, GromacsPair **)
static BigReal pressureProfileThickness
static BigReal pressureProfileMin
NAMD_HOST_DEVICE Vector delta(const Position &pos1, const Position &pos2) const