Definition at line 40 of file ComputeBonds.C.
References SimParameters::alchOn, atomID, bondEnergyIndex, bondEnergyIndex_f, bondEnergyIndex_ti_1, bondEnergyIndex_ti_2, DebugM, Lattice::delta(), SimParameters::drudeBondConst, SimParameters::drudeBondLen, SimParameters::drudeHardWallOn, SimParameters::drudeOn, TuplePatchElem::f, Patch::flags, Molecule::get_fep_bonded_type(), SimParameters::getBondLambda(), SimParameters::getCurrentLambda(), SimParameters::getCurrentLambda2(), BondValue::k, Patch::lattice, Vector::length(), Vector::length2(), localIndex, Node::molecule, Node::Object(), p, TuplePatchElem::p, CompAtom::partition, CompAtom::position, pp_clamp(), pp_reduction(), pressureProfileAtomTypes, pressureProfileMin, pressureProfileSlabs, pressureProfileThickness, scale, Node::simParameters, simParams, SimParameters::singleTopology, size, Flags::step, value, TuplePatchElem::x, Vector::x, x, BondValue::x0, BondValue::x1, Vector::y, and Vector::z.
57 for (
int ituple=0; ituple<ntuple; ++ituple ) {
58 const BondElem &tup = tuples[ituple];
70 if (0. ==
value->
k)
continue;
96 if ( drudeBondConst > 0 && r2 > drudeBondLen*drudeBondLen ) {
99 BigReal diff = r - drudeBondLen;
102 scal += -4*drudeBondConst * diff2 * diff / r;
103 energy += drudeBondConst * diff2 * diff2;
114 diff = (r > x1 ? r - x1 : (r > x0 ? 0 : diff));
118 energy = k*diff*diff;
134 energy *= bond_lambda_1;
135 scal *= bond_lambda_1;
140 energy *= bond_lambda_2;
141 scal *= bond_lambda_2;
146 const Force f12 = scal * r12;
153 DebugM(3,
"::computeForce() -- ending with delta energy " << energy << std::endl);
155 reduction[virialIndex_XX] += f12.
x * r12.x;
156 reduction[virialIndex_XY] += f12.
x * r12.y;
157 reduction[virialIndex_XZ] += f12.
x * r12.z;
158 reduction[virialIndex_YX] += f12.
y * r12.x;
159 reduction[virialIndex_YY] += f12.
y * r12.y;
160 reduction[virialIndex_YZ] += f12.
y * r12.z;
161 reduction[virialIndex_ZX] += f12.
z * r12.x;
162 reduction[virialIndex_ZY] += f12.
z * r12.y;
163 reduction[virialIndex_ZZ] += f12.
z * r12.z;
165 if (pressureProfileData) {
178 f12.
x * r12.x, f12.
y * r12.y, f12.
z * r12.z,
179 pressureProfileData);
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
static int pressureProfileAtomTypes
int get_fep_bonded_type(const int *atomID, unsigned int order) const
BigReal length(void) const
static BigReal pressureProfileMin
static BigReal pressureProfileThickness
void pp_clamp(int &n, int nslabs)
BigReal getBondLambda(const BigReal)
BigReal getCurrentLambda2(const int)
Vector delta(const Position &pos1, const Position &pos2) const
static int pressureProfileSlabs
BigReal length2(void) const
BigReal getCurrentLambda(const int)