Commit 9e73872c authored by Francois Gygi's avatar Francois Gygi
Browse files

Merge branch 'hotfix24'

Showing with 5 additions and 1 deletion
+5 -1
......@@ -348,7 +348,11 @@ double TorsionConstraint::sigma(D3vector a, D3vector b,
D3vector c, D3vector d) const
{
// compute the constraint function
return torsion_angle(a,b,c,d) - angle_;
double delta = torsion_angle(a,b,c,d) - angle_;
// account for discontinuity at +/- 180 deg
if ( delta > 180.0 ) delta -= 360.0;
if ( delta < -180.0 ) delta += 360.0;
return delta;
}
////////////////////////////////////////////////////////////////////////////////
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment