From b4e5828a6085dcc4f54d7595b914ba6e14224d7d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Tue, 8 May 2018 15:36:32 -0400 Subject: [PATCH] Update fix_restrain.cpp --- src/fix_restrain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 4c0d3e4a29..6ad229fea7 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -279,7 +279,7 @@ void FixRestrain::restrain_bond(int m) else fbond = 0.0; ebond += rk*dr; - energy += ebond; + energy += rk*dr; // apply force to each of 2 atoms @@ -387,7 +387,7 @@ void FixRestrain::restrain_angle(int m) tk = k * dtheta; eangle += tk*dtheta; - energy += eangle; + energy += tk*dtheta; a = -2.0 * tk * s; a11 = a*c / rsq1; @@ -568,7 +568,7 @@ void FixRestrain::restrain_dihedral(int m) p += 1.0; edihed += k * p; - energy += edihed; + energy += k * p; fg = vb1x*vb2xm + vb1y*vb2ym + vb1z*vb2zm; hg = vb3x*vb2xm + vb3y*vb2ym + vb3z*vb2zm; -- GitLab