From 2718dcf64848553b38a42a9495393c79012f3a0f Mon Sep 17 00:00:00 2001
From: Chris Maffeo <cmaffeo2@illinois.edu>
Date: Tue, 1 Sep 2020 08:09:52 -0500
Subject: [PATCH] Fixed bug in product potential's apply_dihedral_force

---
 src/TabulatedPotential.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/TabulatedPotential.h b/src/TabulatedPotential.h
index 0aa73a0..bebe922 100644
--- a/src/TabulatedPotential.h
+++ b/src/TabulatedPotential.h
@@ -440,11 +440,11 @@ public:
 	f3 = -distbc * crossBCD.rLength2() * crossBCD;
 	f2 = -(ab.dot(bc) * bc.rLength2()) * f1 - (bc.dot(cd) * bc.rLength2()) * f3;
 
-	energy_deriv = (ab.length2()*bc.length2()*crossABC.rLength2() > 100.0f || bc.length2()*cd.length2()*crossBCD.rLength2() > 100.0f) ? 0.0f : energy_deriv;
-	if ( energy_deriv > 1000.0f )
-	    energy_deriv = 1000.0f;
-	if ( energy_deriv < -1000.0f )
-	    energy_deriv = -1000.0f;
+	// energy_deriv = (ab.length2()*bc.length2()*crossABC.rLength2() > 100.0f || bc.length2()*cd.length2()*crossBCD.rLength2() > 100.0f) ? 0.0f : energy_deriv;
+	/* if ( energy_deriv > 1000.0f ) */
+	/*     energy_deriv = 1000.0f; */
+	/* if ( energy_deriv < -1000.0f ) */
+	/*     energy_deriv = -1000.0f; */
 
 	f1 *= energy_deriv;
 	f2 *= energy_deriv;
-- 
GitLab