update HCD-5D
[unres.git] / source / xdrfpdb / src-M / xdrf2pdb-m.F
index ec14da2..d2d7d9c 100644 (file)
@@ -85,9 +85,9 @@
 c      print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj
       open(9,file=pdbfile)
       nnt = 1
-      if (itype(1).eq.21) nnt = 2
+      if (itype(1).eq.ntyp1) nnt = 2
       nct=nres
-      if (itype(nres).eq.21) nct = nres-1
+      if (itype(nres).eq.ntyp1) nct = nres-1
       print *,"nnt",nnt," nct",nct
       call xdrfopen(ixdrf,arg, "r", iret)
       kk = 0
@@ -97,9 +97,9 @@ c      print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj
        kk = kk + 1
        call xdrffloat(ixdrf, potE, iret)
        call xdrffloat(ixdrf, uconst, iret)
-#ifdef NEWUNRES
-       call xdrffloat(ixdrf, uconst_back, iret)
-#endif
+c#ifdef NEWUNRES
+c       call xdrffloat(ixdrf, uconst_back, iret)
+c#endif
        call xdrffloat(ixdrf, t_bath, iret)
        call xdrfint(ixdrf, nss, iret) 
        do j=1,nss
@@ -107,11 +107,12 @@ c      print *,"ifreq",ifreq," ntraj",ntraj," itraj",itraj
         call xdrfint(ixdrf, jhpb(j), iret)
        enddo
        call xdrfint(ixdrf, nfrag, iret)
+       call xdrfint(ixdrf, iset, iret)
        do i=1,nfrag
         call xdrffloat(ixdrf, qfrag(i), iret)
        enddo
        prec=10000.0
-
+c       print *,'nss=',nss,'nfrag=',nfrag,'iset=',iset
        isize=0
        call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
 
@@ -137,7 +138,8 @@ c       write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
            enddo
          enddo
          etot=potE
-         write (tytul,'(a,i6)') "Structure",kk
+         write (tytul,'(a1,i6,a8,f6.1,a6,f10.1)') "#",kk," t_bath ",
+     &             t_bath, " time ",time
          call pdbout(etot,tytul,9)
        endif
       enddo