multichain cleaning output
[unres.git] / source / unres / src_MD-M / MD_A-MTS.F
index 7a9e307..ae11faf 100644 (file)
@@ -1609,7 +1609,31 @@ c Removing the velocity of the center of mass
        write (iout,*) (vcm(j),j=1,3) 
       endif
       if (.not.rest) then              
-         call chainbuild
+         if (start_from_model) then
+          i_model=iran_num(1,constr_homology)
+          write (iout,*) 'starting from model ',i_model
+          do i=1,2*nres
+           do j=1,3
+            c(j,i)=chomo(j,i,i_model)
+           enddo
+          enddo
+
+          call int_from_cart(.true.,.false.)
+          call sc_loc_geom(.false.)
+          do i=1,nres-1
+            do j=1,3
+             dc(j,i)=c(j,i+1)-c(j,i)
+             dc_norm(j,i)=dc(j,i)*vbld_inv(i+1)
+            enddo
+          enddo
+          do i=2,nres-1
+            do j=1,3
+             dc(j,i+nres)=c(j,i+nres)-c(j,i)
+             dc_norm(j,i+nres)=dc(j,i+nres)*vbld_inv(i+nres)
+            enddo
+          enddo
+         endif
+c         call chainbuild_cart
          write (iout,*) "PREMINIM ",preminim
          if(iranconf.ne.0 .or. preminim) then
           if (overlapsc) then 
@@ -1676,11 +1700,11 @@ c Removing the velocity of the center of mass
      &   "Time step reduced to",d_time,
      &   " because of too large initial acceleration."
       endif
-C      if(me.eq.king.or..not.out1file)then 
-C       write(iout,*) "Potential energy and its components"
-C       call enerprint(potEcomp)
+      if(me.eq.king.or..not.out1file)then 
+       write(iout,*) "Potential energy and its components"
+       call enerprint(potEcomp)
 c       write(iout,*) (potEcomp(i),i=0,n_ene)
-C      endif
+      endif
       potE=potEcomp(0)-potEcomp(20)
       totE=EK+potE
       itime=0