bug fix in energy src_MD-M
[unres.git] / source / unres / src_MD-M / energy_p_new_barrier.F
index 6078e06..f7ff34c 100644 (file)
@@ -3636,6 +3636,7 @@ c        if ((zmedi.gt.((0.5d0)*boxzsize)).or.
 c     &       (zmedi.lt.((-0.5d0)*boxzsize))) then
 c        go to 196
 c        endif
+          xmedi=mod(xmedi,boxxsize)
           if (xmedi.lt.0) xmedi=xmedi+boxxsize
           ymedi=mod(ymedi,boxysize)
           if (ymedi.lt.0) ymedi=ymedi+boxysize