"wrappers/vscode:/vscode.git/clone" did not exist on "d30460490a698f1babe9c612c5362e6db6aaafa0"
Commit 039bb3fb authored by Peter Eastman's avatar Peter Eastman
Browse files

Very minor code simplification

parent 70ff98db
#if USE_EWALD
bool needCorrection = hasExclusions && isExcluded && atom1 != atom2 && atom1 < NUM_ATOMS && atom2 < NUM_ATOMS;
if (!isExcluded || needCorrection) {
if (r2 < CUTOFF_SQUARED || needCorrection) {
if ((!isExcluded && r2 < CUTOFF_SQUARED) || needCorrection) {
const real alphaR = EWALD_ALPHA*r;
const real expAlphaRSqr = EXP(-alphaR*alphaR);
const real prefactor = 138.935456f*posq1.w*posq2.w*invR;
......@@ -52,7 +51,6 @@ if (!isExcluded || needCorrection) {
#endif
}
dEdR += tempForce*invR*invR;
}
}
#else
{
......
#if USE_EWALD
bool needCorrection = hasExclusions && isExcluded && atom1 != atom2 && atom1 < NUM_ATOMS && atom2 < NUM_ATOMS;
if (!isExcluded || needCorrection) {
if (r2 < CUTOFF_SQUARED || needCorrection) {
if ((!isExcluded && r2 < CUTOFF_SQUARED) || needCorrection) {
const real alphaR = EWALD_ALPHA*r;
const real expAlphaRSqr = EXP(-alphaR*alphaR);
const real prefactor = 138.935456f*posq1.w*posq2.w*invR;
......@@ -52,7 +51,6 @@ if (!isExcluded || needCorrection) {
#endif
}
dEdR += tempForce*invR*invR;
}
}
#else
{
......
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