zmiany w galezi multichain
[unres.git] / source / unres / src_MD-M / geomout.F
index f12d33a..4673c4e 100644 (file)
@@ -91,7 +91,7 @@ cmodel      write (iunit,'(a5,i6)') 'MODEL',1
       ires=0
       do i=nnt,nct
         iti=itype(i)
-        if (iti.eq.ntyp1) then
+        if ((iti.eq.ntyp1).and.((itype(i+1)).eq.ntyp1)) then
           ichain=ichain+1
           ires=0
           write (iunit,'(a)') 'TER'
@@ -99,6 +99,7 @@ cmodel      write (iunit,'(a5,i6)') 'MODEL',1
         ires=ires+1
         iatom=iatom+1
         ica(i)=iatom
+        if (iti.ne.ntyp1) then
         write (iunit,10) iatom,restyp(iti),chainid(ichain),
      &     ires,(c(j,i),j=1,3),vtot(i)
         if (iti.ne.10) then
@@ -106,6 +107,7 @@ cmodel      write (iunit,'(a5,i6)') 'MODEL',1
           write (iunit,20) iatom,restyp(iti),chainid(ichain),
      &      ires,(c(j,nres+i),j=1,3),
      &      vtot(i+nres)
+         endif
         endif
         endif
       enddo
@@ -200,6 +202,7 @@ c------------------------------------------------------------------------
       include 'COMMON.INTERACT'
       include 'COMMON.NAMES'
       include 'COMMON.GEO'
+      include 'COMMON.TORSION'
       write (iout,'(/a)') 'Geometry of the virtual chain.'
       write (iout,'(7a)') '  Res  ','         d','     Theta',
      & '       Phi','       Dsc','     Alpha','      Omega'