energi calculation working (no weights!)
[unres4.git] / source / unres / io_base.f90
index 303927a..22545fe 100644 (file)
        if (itype(iss(i),1).ne.1) then
          if (me.eq.king.or..not.out1file) write (iout,'(2a,i3,a)') &
          'Do you REALLY think that the residue ',&
-          restyp(itype(iss(i),1)),i,&
+          restyp(itype(iss(i),1),1),i,&
          ' can form a disulfide bridge?!!!'
          write (*,'(2a,i3,a)') &
          'Do you REALLY think that the residue ',&
-          restyp(itype(iss(i),1)),i,&
+          restyp(itype(iss(i),1),1),i,&
          ' can form a disulfide bridge?!!!'
 #ifdef MPI
         call MPI_Finalize(MPI_COMM_WORLD,ierror)
         if (j.lt.10) then
            write (iunit,'(a5,i5,1x,a1,i1,2x,a3,i7,2x,a3,i7,i3,t76,i5)') &
                  'HELIX',j,'H',j,&
-                 restyp(iti),hfrag(1,j)-1,&
-                 restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j)
+                 restyp(iti,1),hfrag(1,j)-1,&
+                 restyp(itj,1),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j)
         else
              write (iunit,'(a5,i5,1x,a1,i2,1x,a3,i7,2x,a3,i7,i3)') &
                  'HELIX',j,'H',j,&
-                 restyp(iti),hfrag(1,j)-1,&
-                 restyp(itj),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j)
+                 restyp(iti,1),hfrag(1,j)-1,&
+                 restyp(itj,1),hfrag(2,j)-1,1,hfrag(2,j)-hfrag(1,j)
         endif
        enddo
       endif
 
         write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3)') &
                  'SHEET',1,'B',j,2,&
-                 restyp(iti),bfrag(1,j)-1,&
-                 restyp(itj),bfrag(2,j)-2,0
+                 restyp(iti,1),bfrag(1,j)-1,&
+                 restyp(itj,1),bfrag(2,j)-2,0
 
         if (bfrag(3,j).gt.bfrag(4,j)) then
 
 
          write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3,2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)') &
                  'SHEET',2,'B',j,2,&
-                 restyp(itl),bfrag(4,j),&
-                 restyp(itk),bfrag(3,j)-1,-1,&
-                 "N",restyp(itk),bfrag(3,j)-1,&
-                 "O",restyp(iti),bfrag(1,j)-1
+                 restyp(itl,1),bfrag(4,j),&
+                 restyp(itk,1),bfrag(3,j)-1,-1,&
+                 "N",restyp(itk,1),bfrag(3,j)-1,&
+                 "O",restyp(iti,1),bfrag(1,j)-1
 
         else
 
 
         write (iunit,'(a5,i5,1x,a1,i1,i3,1x,a3,i6,2x,a3,i6,i3,2x,a1,2x,a3,i6,3x,a1,2x,a3,i6)') &
                  'SHEET',2,'B',j,2,&
-                 restyp(itk),bfrag(3,j)-1,&
-                 restyp(itl),bfrag(4,j)-2,1,&
-                 "N",restyp(itk),bfrag(3,j)-1,&
-                 "O",restyp(iti),bfrag(1,j)-1
+                 restyp(itk,1),bfrag(3,j)-1,&
+                 restyp(itl,1),bfrag(4,j)-2,1,&
+                 "N",restyp(itk,1),bfrag(3,j)-1,&
+                 "O",restyp(iti,1),bfrag(1,j)-1
 
 
 
         ires=ires+1
         iatom=iatom+1
         ica(i)=iatom
-        write (iunit,10) iatom,restyp(iti),chainid(ichain),&
+        write (iunit,10) iatom,restyp(iti,1),chainid(ichain),&
            ires,(c(j,i),j=1,3),vtot(i)
         if (iti.ne.10) then
           iatom=iatom+1
-          write (iunit,20) iatom,restyp(iti),chainid(ichain),&
+          write (iunit,20) iatom,restyp(iti,1),chainid(ichain),&
             ires,(c(j,nres+i),j=1,3),&
             vtot(i+nres)
         endif
       write (imol2,'(a)') '\@<TRIPOS>ATOM' 
       do i=nnt,nct
         write (zahl,'(i3)') i
-        pom=ucase(restyp(itype(i,1)))
+        pom=ucase(restyp(itype(i,1),1))
         res_num = pom(:3)//zahl(2:)
         write (imol2,10) i,(c(j,i),j=1,3),i,res_num,0.0
       enddo
       write (imol2,'(a)') '\@<TRIPOS>SUBSTRUCTURE'
       do i=nnt,nct
         write (zahl,'(i3)') i
-        pom = ucase(restyp(itype(i,1)))
+        pom = ucase(restyp(itype(i,1),1))
         res_num = pom(:3)//zahl(2:)
         write (imol2,30) i-nnt+1,res_num,i-nnt+1,0
       enddo
        '       Phi','       Dsc','     Alpha','      Omega'
       do i=1,nres
        iti=itype(i,1)
-        write (iout,'(a3,i4,6f10.3)') restyp(iti),i,vbld(i),&
+        write (iout,'(a3,i4,6f10.3)') restyp(iti,1),i,vbld(i),&
            rad2deg*theta(i),rad2deg*phi(i),vbld(nres+i),rad2deg*alph(i),&
            rad2deg*omeg(i)
       enddo