correction in returnbox
[unres4.git] / source / unres / MD.f90
index edbd810..32e48f8 100644 (file)
 #endif
         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)
 #endif
         endif
         if (mod(itime,ntwx).eq.0) then
+          call returnbox
           write (tytul,'("time",f8.2)') totT
           if(mdpdb) then
              call hairpin(.true.,nharp,iharp)