unres_package_Oct_2016 from emilial
[unres4.git] / source / unres / MD.f90
index a436a93..c509ee1 100644 (file)
        d_t_work_new,d_af_work,d_as_work,kinetic_force !(MAXRES6)
       real(kind=8),dimension(:,:),allocatable :: d_t_new,&
        d_a_old,d_a_short!,d_a !(3,0:MAXRES2)
+!      real(kind=8),dimension(:),allocatable :: d_a_work !(6*MAXRES)
+!      real(kind=8),dimension(:,:),allocatable :: Gmat,Ginv,A,&
+!       Gsqrp,Gsqrm,Gvec !(maxres2,maxres2)
+!      real(kind=8),dimension(:),allocatable :: Geigen !(maxres2)
+!      integer :: dimen,dimen1,dimen3
+!      integer :: lang,count_reset_moment,count_reset_vel
+!      logical :: reset_moment,reset_vel,rattle,RESPA
 !      common /inertia/
 !      common /langevin/
+!      real(kind=8) :: rwat,etawat,stdfp,cPoise
+!      real(kind=8),dimension(:),allocatable :: gamsc !(ntyp1)
+!      real(kind=8),dimension(:),allocatable :: stdfsc !(ntyp)
       real(kind=8),dimension(:),allocatable :: stdforcp,stdforcsc !(MAXRES)
 !-----------------------------------------------------------------------------
 ! 'sizes.i'
       use control, only: tcpu
       use control_data
       use energy_data
+!      use io_conf, only:cartprint
 !      include 'DIMENSIONS'
 #ifdef MPI
       include 'mpif.h'
 !  The driver for molecular dynamics subroutines
 !------------------------------------------------
       use comm_gucio
+!     use MPI
       use control, only:tcpu,ovrtim
+!      use io_comm, only:ilen
       use control_data
       use compare, only:secondary2,hairpin
       use io, only:cartout,statout
 !      include 'DIMENSIONS'
       use comm_gucio
       use comm_cipiszcze
+!     use MPI
       use control, only:tcpu
       use control_data
+!      use io_conf, only:cartprint
 #ifdef MPI
       include 'mpif.h'
       integer :: IERROR,ERRCODE
          endif
       endif      
       call chainbuild_cart
-write(iout,*) "przed kinetic, EK=",EK
       call kinetic(EK)
       if (tbf) then
         call verlet_bath
       endif     
-write(iout,*) "dimen3",dimen3,"Rb",Rb,"EK",EK 
       kinetic_T=2.0d0/(dimen3*Rb)*EK
-write(iout,*) "kinetic_T",kinetic_T
       if(me.eq.king.or..not.out1file)then
        call cartprint
        call intout
@@ -2431,9 +2443,7 @@ write(iout,*) "kinetic_T",kinetic_T
 #endif
       potE=potEcomp(0)
       call cartgrad
-write(iout,*) "kinetic_T if large",kinetic_T
       call lagrangian
-write(iout,*) "kinetic_T if large",kinetic_T
       call max_accel
       if (amax*d_time .gt. dvmax) then
         d_time=d_time*dvmax/amax
@@ -2504,9 +2514,7 @@ write(iout,*) "kinetic_T if large",kinetic_T
 #endif
 #endif
         call cartgrad
-write(iout,*) "przed lagrangian"
         call lagrangian
-write(iout,*) "po lagrangian"
         if(.not.out1file .and. large) then
           write (iout,*) "energia_long",energia_long(0),&
            " energia_short",energia_short(0),&
@@ -2539,9 +2547,7 @@ write(iout,*) "po lagrangian"
 #endif
 #endif
         call cartgrad
-write(iout,*) "przed lagrangian2"
         call lagrangian
-write(iout,*) "po lagrangian2"
         if(.not.out1file .and. large) then
           write (iout,*) "energia_long",energia_long(0)
           write (iout,*) "Initial slow-force accelerations"
@@ -2556,7 +2562,6 @@ write(iout,*) "po lagrangian2"
         t_enegrad=t_enegrad+tcpu()-tt0
 #endif
       endif
-write(iout,*) "end init MD"
       return
       end subroutine init_MD
 !-----------------------------------------------------------------------------
@@ -4562,6 +4567,7 @@ write(iout,*) "end init MD"
 !-----------------------------------------------------------------------------
       subroutine setup_fricmat
 
+!     use MPI
       use energy_data
       use control_data, only:time_Bcast
       use control, only:tcpu
@@ -4774,12 +4780,10 @@ write(iout,*) "end init MD"
 #else
         time00=tcpu()
 #endif
-write(iout,*)"przed MPI_Scatterv in fricmat"
 ! Scatter the friction matrix
         call MPI_Scatterv(fricmat(1,1),nginv_counts(0),&
           nginv_start(0),MPI_DOUBLE_PRECISION,fcopy(1,1),&
           myginv_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERROR)
-write(iout,*)"po MPI_Scatterv in fricmat"
 #ifdef TIMING
 #ifdef MPI
         time_scatter=time_scatter+MPI_Wtime()-time00
@@ -4789,13 +4793,11 @@ write(iout,*)"po MPI_Scatterv in fricmat"
         time_scatter_fmat=time_scatter_fmat+tcpu()-time00
 #endif
 #endif
-write(iout,*)"po MPI_Scatterv in fricmat"
         do i=1,dimen
           do j=1,2*my_ng_count
             fricmat(j,i)=fcopy(i,j)
           enddo
         enddo
-write(iout,*)"po MPI_Scatterv in fricmat"
 !        write (iout,*) "My chunk of fricmat"
 !        call MATOUT2(my_ng_count,dimen,maxres2,maxres2,fcopy)
       endif
@@ -5645,6 +5647,14 @@ write(iout,*)"po MPI_Scatterv in fricmat"
       if(.not.allocated(nginv_start)) allocate(nginv_start(0:nfgtasks)) !(0:MaxProcs)
 !----------------------
 ! common.muca in read_muca
+!      common /double_muca/
+!      real(kind=8) :: elow,ehigh,factor,hbin,factor_min
+!      real(kind=8),dimension(:),allocatable :: emuca,nemuca,&
+!       nemuca2,hist !(4*maxres)
+!      common /integer_muca/
+!      integer :: nmuca,imtime,muca_smooth
+!      common /mucarem/
+!      real(kind=8),dimension(:),allocatable :: elowi,ehighi !(maxprocs)
 !----------------------
 ! common.MD
 !      common /mdgrad/ in module.energy