Skip to content

Commit

Permalink
Fix #235
Browse files Browse the repository at this point in the history
Fixed a longstanding bug affecting EXTENDED_LAGRANGIAN and
METAD with ADAPT=DIFF when having arguments with periodicity
such as (min,max) with min+max!=0
  • Loading branch information
GiovanniBussi committed May 19, 2017
1 parent d6d1b33 commit 565ca8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Value.h
Expand Up @@ -292,7 +292,7 @@ double Value::difference(double d1,double d2)const {

inline
double Value::bringBackInPbc(double d1)const {
return difference(min+max_minus_min/2., d1);
return min+max_minus_min/2.+difference(min+max_minus_min/2., d1);
}

inline
Expand Down

0 comments on commit 565ca8b

Please sign in to comment.