customGBChainRule.cl 443 Bytes
Newer Older
1
#ifdef USE_CUTOFF
2
if (atom1 < NUM_ATOMS && atom2 < NUM_ATOMS && atom1 != atom2 && r2 < CUTOFF_SQUARED) {
3
#else
4
if (atom1 < NUM_ATOMS && atom2 < NUM_ATOMS && atom1 != atom2) {
5
#endif
6
#ifdef USE_SYMMETRIC
7
    real tempForce = 0.0f;
8
#else
9
10
    real4 tempForce1 = (real4) 0;
    real4 tempForce2 = (real4) 0;
11
#endif
12
    COMPUTE_FORCE
13
#ifdef USE_SYMMETRIC
14
    dEdR += tempForce*invR;
15
16
17
18
#else
    dEdR1 += tempForce1;
    dEdR2 += tempForce2;
#endif
19
}