minor correction to angle class2

This commit is contained in:
Steve Plimpton
2021-12-20 10:33:05 -07:00
parent b3fcda3214
commit 97b5651633
2 changed files with 29 additions and 14 deletions

View File

@ -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;
}