rescore=0.2 rescore2=1.0 mdpdb append
[unres.git] / source / unres / src_MD-M / MD_A-MTS.F
index 070476d..d75964a 100644 (file)
@@ -36,6 +36,7 @@ c------------------------------------------------
       common /gucio/ cm
       integer itime
       logical ovrtim
+      integer nharp,iharp(4,maxres/3)
 c
 #ifdef MPI
       if (ilen(tmpdir).gt.0)
@@ -51,6 +52,33 @@ c
       t_enegrad=0.0d0
       t_sdsetup=0.0d0
       write (iout,'(20(1h=),a20,20(1h=))') "MD calculation started"
+      write (iout,'(/a)')
+     &  "Cartesian coordinates of the initial structure"
+      write (iout,'(a,3(3x,a5),5x,3(3x,a5))')
+     & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
+      do ires=1,nres
+        write (iout,'(a3,1x,i3,3f8.3,5x,3f8.3)')
+     &    restyp(itype(ires)),ires,(c(j,ires),j=1,3),
+     &    (c(j,ires+nres),j=1,3)
+      enddo
+      write (iout,'(/a)') 
+     &  "Initial dC vectors of the chain"
+      write (iout,'(a,3(3x,a5),5x,3(3x,a5))') 
+     & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
+      do ires=1,nres
+        write (iout,'(a3,1x,i3,3f8.3,5x,3f8.3)') 
+     &    restyp(itype(ires)),ires,(dc(j,ires),j=1,3),
+     &    (dc(j,ires+nres),j=1,3)
+      enddo
+      write (iout,'(/a)') 
+     &  "Initial dC_norm vectors of the chain"
+      write (iout,'(a,3(3x,a5),5x,3(3x,a5))') 
+     & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
+      do ires=1,nres
+        write (iout,'(a3,1x,i3,3f8.3,5x,3f8.3)') 
+     &    restyp(itype(ires)),ires,(dc_norm(j,ires),j=1,3),
+     &    (dc_norm(j,ires+nres),j=1,3)
+      enddo
 #ifdef MPI
       tt0=MPI_Wtime()
 #else
@@ -1443,7 +1471,7 @@ c  Set up the initial conditions of a MD simulation
       include 'COMMON.NAMES'
       include 'COMMON.REMD'
       real*8 energia_long(0:n_ene),
-     &  energia_short(0:n_ene),vcm(3),incr(3)
+     &  energia_short(0:n_ene),energia(0:n_ene),vcm(3),incr(3)
       double precision cm(3),L(3),xv,sigv,lowb,highb
       double precision varia(maxvar)
       character*256 qstr
@@ -1471,9 +1499,15 @@ c Open the pdb file for snapshotshots
         if (ilen(tmpdir).gt.0) 
      &    call copy_to_tmp(pref_orig(:ilen(pref_orig))//"_MD"//
      &      liczba(:ilen(liczba))//".pdb")
+#if defined(AIX) || defined(PGI)
         open(ipdb,
      &  file=prefix(:ilen(prefix))//"_MD"//liczba(:ilen(liczba))
-     &  //".pdb")
+     &  //".pdb", position='append')
+#else
+        open(ipdb,
+     &  file=prefix(:ilen(prefix))//"_MD"//liczba(:ilen(liczba))
+     &  //".pdb", access='append')
+#endif
       else
 #ifdef NOXDR
         if (ilen(tmpdir).gt.0 .and. (me.eq.king .or. .not.traj1file)) 
@@ -1632,10 +1666,13 @@ c Removing the velocity of the center of mass
              dc_norm(j,i+nres)=dc(j,i+nres)*vbld_inv(i+nres)
             enddo
           enddo
+          call etotal(energia(0))
          endif
 c         call chainbuild_cart
+         write (iout,*) "Initial energies"
+         call enerprint(energia(0))
          write (iout,*) "PREMINIM ",preminim
-         if(iranconf.eq.0 .and. preminim) then
+         if(iranconf.ne.0 .or. preminim) then
           if (overlapsc) then 
            write (iout,*) 'Calling OVERLAP_SC'
            call overlap_sc(fail)