Merge branch 'UCGM' of mmka.chem.univ.gda.pl:unres4 into UCGM
[unres4.git] / source / unres / MREMD.F90
index 66c2e89..f8e88e8 100644 (file)
@@ -85,7 +85,7 @@
 
       real(kind=8) :: remd_t_bath(Nprocs) !(maxprocs)
       integer :: iremd_iset(Nprocs) !(maxprocs)
-      integer(kind=2) :: i_index(Nprocs/2,Nprocs/2,Nprocs/10,Nprocs/10)
+      integer(kind=2) :: i_index(Nprocs,Nprocs/2,Nprocs/10,Nprocs/10)
 ! (maxprocs/4,maxprocs/20,maxprocs/200,maxprocs/200)
       real(kind=8) :: remd_ene(0:n_ene+4,Nprocs) !(0:n_ene+4,maxprocs)
       integer :: iremd_acc(Nprocs),iremd_tot(Nprocs) !(maxprocs)
            do i=nnt,nct-1
              mnum=(molnum(i))
              stdforcp(i)=stdfp(mnum)*dsqrt(gamp(mnum))
+!             write(iout,*) "stdforcp=",stdforcp(i),itype(i,mnum),i
            enddo
            do i=nnt,nct
             mnum=molnum(i)
              if (itype(i,mnum).ne.ntyp1) stdforcsc(i)=stdfsc(iabs(itype(i,mnum)),mnum)&
                         *dsqrt(gamsc(iabs(itype(i,mnum)),mnum))
+!              write(iout,*) "stdforcsc=",stdforcsc(i),itype(i,mnum),i
            enddo
          endif
        call rescale_weights(t_bath)
         itime_mat=itime
         if(ntwe.ne.0) then
           if (mod(itime,ntwe).eq.0) then
+!              energy_dec=.true.
+!              write(iout,*) "before returnbox"
+!              call etotal(potEcomp)
+!              call enerprint(potEcomp)
+              call returnbox
+!              write(iout,*) "after returnbox"
               call statout(itime)
+!              call etotal(potEcomp)
+!              energy_dec=.false.
               call enerprint(potEcomp)
           endif
         endif
              call secondary2(.true.)
              call pdbout(potE,tytul,ipdb)
           else 
+              call returnbox
              call cartout(totT)
           endif
         endif