small changes
[unres.git] / source / unres / src_MD-M / unres.F
index b1ddb28..59c6b64 100644 (file)
@@ -56,7 +56,6 @@ c      call memmon_print_usage()
       if (me.eq.king) call cinfo
 C Read force field parameters and job setup data
       call readrtns
-      call flush(iout)
 C
       if (me.eq.king .or. .not. out1file) then
        write (iout,'(2a/)') 
@@ -137,9 +136,15 @@ c--------------------------------------------------------------------------
       include 'COMMON.SETUP'
       include 'COMMON.CONTROL'
       include 'COMMON.IOUNITS'
-      if (me.eq.king .or. .not. out1file)
-     &   write (iout,*) "Calling chainbuild"
-      call chainbuild
+c      if (me.eq.king .or. .not. out1file) then
+c        write (iout,*) "Calling chainbuild"
+c        call flush(iout)
+c      endif
+!      call chainbuild
+      if (me.eq.king .or. .not. out1file) then
+        write (iout,*) "Calling MD"
+        call flush(iout)
+      endif
       call MD
       return
       end
@@ -154,9 +159,9 @@ c---------------------------------------------------------------------------
       include 'COMMON.CONTROL'
       include 'COMMON.IOUNITS'
       include 'COMMON.REMD'
-      if (me.eq.king .or. .not. out1file)
-     &   write (iout,*) "Calling chainbuild"
-      call chainbuild
+!      if (me.eq.king .or. .not. out1file)
+!     &   write (iout,*) "Calling chainbuild"
+!      call chainbuild
       if (me.eq.king .or. .not. out1file)
      &   write (iout,*) "Calling REMD"
       if (remd_mlist) then 
@@ -196,13 +201,20 @@ c---------------------------------------------------------------------------
       double precision energy(0:n_ene)
       double precision energy_long(0:n_ene),energy_short(0:n_ene)
       double precision varia(maxvar)
-      if (indpdb.eq.0) call chainbuild
+      if (indpdb.eq.0)     call chainbuild
+      print *,'dc',c(1,1)
+      if (indpdb.ne.0) then
+      dc(1,0)=c(1,1)
+      dc(2,0)=c(2,1)
+      dc(3,0)=c(3,1)
+      endif
 #ifdef MPI
       time00=MPI_Wtime()
 #else
       time00=tcpu()
 #endif
       call chainbuild_cart
+      print *,'dc',dc(1,0),dc(2,0),dc(3,0)
       if (split_ene) then
        print *,"Processor",myrank," after chainbuild"
        icall=1
@@ -231,7 +243,9 @@ c---------------------------------------------------------------------------
       etot =etota
       call enerprint(energy(0))
       call hairpin(.true.,nharp,iharp)
+        print *,'after hairpin'
       call secondary2(.true.)
+        print *,'after secondary'
       if (minim) then
 crc overlap test
         if (overlapsc) then 
@@ -275,8 +289,10 @@ crc overlap test
 #endif
         print *,'# eval/s',evals
         print *,'refstr=',refstr
-        call hairpin(.true.,nharp,iharp)
+        call hairpin(.false.,nharp,iharp)
+        print *,'after hairpin'
         call secondary2(.true.)
+        print *,'after secondary'
         call etotal(energy(0))
         etot = energy(0)
         call enerprint(energy(0))
@@ -698,6 +714,7 @@ c---------------------------------------------------------------------------
       include 'COMMON.SBRIDGE'
       common /srutu/ icall
       double precision energy(0:max_ene)
+      print *,"A TU?"
 c      do i=2,nres
 c        vbld(i)=vbld(i)+ran_number(-0.1d0,0.1d0)
 c        if (itype(i).ne.10) 
@@ -723,10 +740,14 @@ c      enddo
       totT=1.d0
       eq_time=0.0d0
       call read_fragments
+      print *, "AFTER read fragments"
       call chainbuild_cart
+      print *,"chainbuild_cart"
       call cartprint
+      print *,"After cartprint"
       call intout
       icall=1
+      print *,"before ETOT"
       call etotal(energy(0))
       etot = energy(0)
       call enerprint(energy(0))
@@ -734,6 +755,7 @@ c      enddo
       print *,'icheckgrad=',icheckgrad
       goto (10,20,30) icheckgrad
   10  call check_ecartint
+      call check_ecartint
       return
   20  call check_cartgrad
       return