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