correction in MD returnbox
[unres.git] / source / unres / src_MD-M / MD.F
index a28d660..0f12f9b 100644 (file)
@@ -176,7 +176,10 @@ c Variable time step algorithm.
           call brown_step(itime)
         endif
         if (ntwe.ne.0) then
-         if (mod(itime,ntwe).eq.0) call statout(itime)
+         if (mod(itime,ntwe).eq.0) then
+           call statout(itime)
+           call returnbox
+          endif
 #ifdef VOUT
         do j=1,3
           v_work(j)=d_t(j,0)
@@ -1628,7 +1631,7 @@ c if the friction coefficients do not depend on surface area
           stdforcp(i)=stdfp*dsqrt(gamp)
         enddo
         do i=nnt,nct
-          stdforcsc(i)=stdfsc(itype(i))*dsqrt(gamsc(itype(i)))
+          stdforcsc(i)=stdfsc(itype(i))*dsqrt(gamsc(iabs(itype(i))))
         enddo
       endif
 c Open the pdb file for snapshotshots