Merge branch 'devel' into feature-ga
[unres.git] / source / unres / src_MD / src / md-diff / md / respa_step.f
diff --git a/source/unres/src_MD/src/md-diff/md/respa_step.f b/source/unres/src_MD/src/md-diff/md/respa_step.f
deleted file mode 100644 (file)
index 7b48266..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-c-------------------------------------------------------------------------------
-      subroutine RESPA_step(itime)
-c-------------------------------------------------------------------------------
-c  Perform a single RESPA step.
-c-------------------------------------------------------------------------------
-      implicit real*8 (a-h,o-z)
-      include 'DIMENSIONS'
-      include 'COMMON.CONTROL'
-      include 'COMMON.VAR'
-      include 'COMMON.MD'
-      include 'COMMON.LANGEVIN'
-      include 'COMMON.CHAIN'
-      include 'COMMON.DERIV'
-      include 'COMMON.GEO'
-      include 'COMMON.LOCAL'
-      include 'COMMON.INTERACT'
-      include 'COMMON.IOUNITS'
-      include 'COMMON.NAMES'
-      include 'COMMON.TIME1'
-      double precision energia(0:n_ene),energia_short(0:n_ene),
-     & energia_long(0:n_ene)
-      double precision cm(3),L(3),vcm(3),incr(3)
-      integer ilen,count,rstcount
-      external ilen
-      character*50 tytul
-      integer maxcount_scale /10/
-      common /gucio/ cm
-      double precision stochforcvec(MAXRES6)
-      common /stochcalc/ stochforcvec
-      integer itime
-      logical scale
-      if (large.and. mod(itime,ntwe).eq.0) then
-        write (iout,*) "***************** RESPA itime",itime
-        write (iout,*) "Cartesian and internal coordinates: step 0"
-        call cartprint
-        call intout
-        write (iout,*) "Accelerations"
-        do i=0,nres
-          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_a(j,i),j=1,3),
-     &      (d_a(j,i+nres),j=1,3)
-        enddo
-        write (iout,*) "Velocities, step 0"
-        do i=0,nres
-          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
-     &      (d_t(j,i+nres),j=1,3)
-        enddo
-      endif
-c
-c Perform the initial RESPA step (increment velocities)
-c      write (iout,*) "*********************** RESPA ini"
-      call RESPA_vel
-      if (mod(itime,ntwe).eq.0 .and. large) then
-        write (iout,*) "Velocities, end"
-        do i=0,nres
-          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
-     &      (d_t(j,i+nres),j=1,3)
-        enddo
-      endif
-c Compute the short-range forces
-      call zerograd
-      call etotal_short(energia_short)
-      call cartgrad
-      call lagrangian
-      do i=0,2*nres
-        do j=1,3
-          dc_old(j,i)=dc(j,i)
-          d_t_old(j,i)=d_t(j,i)
-          d_a_old(j,i)=d_a(j,i)
-        enddo
-      enddo 
-      d_time0=d_time
-c Split the time step
-      d_time=d_time/ntime_split 
-c Perform the short-range RESPSA steps (velocity Verlet increments of
-c positions and velocities using short-range forces)
-c      write (iout,*) "*********************** RESPA split"
-      do itsplit=1,ntime_split
-        if (lang.eq.1) then
-          call sddir_precalc
-        else if (lang.eq.2 .or. lang.eq.3) then
-          call stochastic_force(stochforcvec)
-        endif
-c First step of the velocity Verlet algorithm
-        if (lang.eq.2) then
-          call sd_verlet1
-        else if (lang.eq.3) then
-          call sd_verlet1_ciccotti
-        else if (lang.eq.1) then
-          call sddir_verlet1
-        else
-          call verlet1
-        endif    
-c Build the chain from the newly calculated coordinates        
-        call chainbuild_cart
-        if (rattle) call rattle1
-        if (large.and. mod(itime,ntwe).eq.0) then
-          write (iout,*) "Cartesian and internal coordinates: step 1"
-          call cartprint
-          call intout
-          write (iout,*) "Accelerations"
-          do i=0,nres
-            write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_a(j,i),j=1,3),
-     &        (d_a(j,i+nres),j=1,3)
-          enddo
-          write (iout,*) "Velocities, step 1"
-          do i=0,nres
-            write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
-     &        (d_t(j,i+nres),j=1,3)
-          enddo
-        endif
-        tt0 = tcpu()
-c Calculate energy and forces
-        call zerograd
-        call etotal_short(energia_short)
-        call cartgrad
-c Get the new accelerations
-        call lagrangian
-        t_enegrad=t_enegrad+tcpu()-tt0
-c Second step of the velocity Verlet algorithm
-        if (lang.eq.2) then    
-          call sd_verlet2
-        else if (lang.eq.3) then
-          call sd_verlet2_ciccotti
-        else if (lang.eq.1) then
-          call sddir_verlet2
-        else
-          call verlet2
-        endif              
-        if (rattle) call rattle2
-c Backup the coordinates, velocities, and accelerations
-        do i=0,2*nres
-          do j=1,3
-            dc_old(j,i)=dc(j,i)
-            d_t_old(j,i)=d_t(j,i)
-            d_a_old(j,i)=d_a(j,i)
-          enddo
-        enddo 
-      enddo
-c Restore the time step
-      d_time=d_time0
-c Compute long-range forces
-      call zerograd
-      call etotal_long(energia_long)
-      call cartgrad
-c Compute accelerations from long-range forces
-      call lagrangian
-      if (large.and. mod(itime,ntwe).eq.0) then
-        write (iout,*) "Cartesian and internal coordinates: step 2"
-        call cartprint
-        call intout
-        write (iout,*) "Accelerations"
-        do i=0,nres
-          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_a(j,i),j=1,3),
-     &      (d_a(j,i+nres),j=1,3)
-        enddo
-        write (iout,*) "Velocities, step 2"
-        do i=0,nres
-          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
-     &      (d_t(j,i+nres),j=1,3)
-        enddo
-      endif
-c Compute the final RESPA step (increment velocities)
-c      write (iout,*) "*********************** RESPA fin"
-      call RESPA_vel
-c Compute the complete potential energy
-      potE=energia_short(0)+energia_long(0)
-      totT=totT+d_time
-c Calculate the kinetic and the total energy and the kinetic temperature
-      call kinetic(EK)
-      totE=EK+potE
-c Couple the system to Berendsen bath if needed
-      if (tbf .and. lang.eq.0) then
-        call verlet_bath
-      endif
-      kinetic_T=2.0d0/(dimen*Rb)*EK
-c Backup the coordinates, velocities, and accelerations
-      if (mod(itime,ntwe).eq.0 .and. large) then
-        write (iout,*) "Velocities, end"
-        do i=0,nres
-          write (iout,'(i3,3f10.5,3x,3f10.5)') i,(d_t(j,i),j=1,3),
-     &      (d_t(j,i+nres),j=1,3)
-        enddo
-      endif
-      return
-      end