minor correction to angle class2
This commit is contained in:
@ -169,6 +169,8 @@ void AngleClass2::compute(int eflag, int vflag)
|
||||
|
||||
// force & energy for bond-angle term
|
||||
|
||||
dr1 = r1 - ba_r1[type];
|
||||
dr2 = r2 - ba_r2[type];
|
||||
aa1 = s * dr1 * ba_k1[type];
|
||||
aa2 = s * dr2 * ba_k2[type];
|
||||
|
||||
@ -459,6 +461,9 @@ double AngleClass2::single(int type, int i1, int i2, int i3)
|
||||
double dr2 = r2 - bb_r2[type];
|
||||
energy += bb_k[type]*dr1*dr2;
|
||||
|
||||
dr1 = r1 - ba_r1[type];
|
||||
dr2 = r2 - ba_r2[type];
|
||||
energy += ba_k1[type]*dr1*dtheta + ba_k2[type]*dr2*dtheta;
|
||||
|
||||
return energy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user