customGBChainRule.cl 454 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
    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
}