zabezpieczenie przedczarkowe
[unres.git] / source / unres / src_MD-M / parmread.F
index 154fcf4..9db9b60 100644 (file)
@@ -388,13 +388,15 @@ C
       enddo
       call flush(iout)
       endif
-      write (2,*) "Start reading THETA_PDB"
+      write (2,*) "Start reading THETA_PDB",ithep_pdb
       do i=1,ntyp
-        read (ithep,*,err=111,end=111) a0thet(i),(athet(j,i,1,1),j=1,2),
+c      write (2,*) 'i=',i
+        read (ithep_pdb,*,err=111,end=111)
+     &     a0thet(i),(athet(j,i,1,1),j=1,2),
      &    (bthet(j,i,1,1),j=1,2)
-        read (ithep,*,err=111,end=111) (polthet(j,i),j=0,3)
-        read (ithep,*,err=111,end=111) (gthet(j,i),j=1,3)
-        read (ithep,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
+        read (ithep_pdb,*,err=111,end=111) (polthet(j,i),j=0,3)
+        read (ithep_pdb,*,err=111,end=111) (gthet(j,i),j=1,3)
+        read (ithep_pdb,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
         sigc0(i)=sigc0(i)**2
       enddo
       do i=1,ntyp
@@ -539,6 +541,7 @@ C
 C Read the parameters of the probability distribution/energy expression
 C of the side chains.
 C
+      write (2,*) "Start reading ROTAM_PDB"
       do i=1,ntyp
         read (irotam_pdb,'(3x,i3,f8.3)',end=112,err=112) nlob(i),dsc(i)
         if (i.eq.10) then
@@ -577,6 +580,7 @@ C
         endif
       enddo
       close (irotam_pdb)
+      write (2,*) "End reading ROTAM_PDB"
 #endif
       close(irotam)
 
@@ -903,29 +907,37 @@ C
         write (iout,*) "Coefficients of the cumulants"
       endif
       read (ifourier,*) nloctyp
+
       do i=0,nloctyp-1
         read (ifourier,*,end=115,err=115)
         read (ifourier,*,end=115,err=115) (b(ii),ii=1,13)
+#ifdef NEWCORR
+        read (ifourier,*,end=115,err=115) (bnew1(ii,1,i),ii=1,3)
+        read (ifourier,*,end=115,err=115) (bnew2(ii,1,i),ii=1,3)
+        read (ifourier,*,end=115,err=115) (bnew1(ii,2,i),ii=1,1)
+        read (ifourier,*,end=115,err=115) (bnew2(ii,2,i),ii=1,1)
+        read (ifourier,*,end=115,err=115) (eenew(ii,i),ii=1,1)
+#endif 
         if (lprint) then
         write (iout,*) 'Type',i
         write (iout,'(a,i2,a,f10.5)') ('b(',ii,')=',b(ii),ii=1,13)
         endif
-        B1(1,i)  = b(3)
-        B1(2,i)  = b(5)
-        B1(1,-i) = b(3)
-        B1(2,-i) = -b(5)
+c        B1(1,i)  = b(3)
+c        B1(2,i)  = b(5)
+c        B1(1,-i) = b(3)
+c        B1(2,-i) = -b(5)
 c        b1(1,i)=0.0d0
 c        b1(2,i)=0.0d0
-        B1tilde(1,i) = b(3)
-        B1tilde(2,i) =-b(5)
-        B1tilde(1,-i) =-b(3)
-        B1tilde(2,-i) =b(5)
+c        B1tilde(1,i) = b(3)
+c        B1tilde(2,i) =-b(5)
+c        B1tilde(1,-i) =-b(3)
+c        B1tilde(2,-i) =b(5)
 c        b1tilde(1,i)=0.0d0
 c        b1tilde(2,i)=0.0d0
-        B2(1,i)  = b(2)
-        B2(2,i)  = b(4)
-        B2(1,-i)  =b(2)
-        B2(2,-i)  =-b(4)
+c        B2(1,i)  = b(2)
+c        B2(2,i)  = b(4)
+c        B2(1,-i)  =b(2)
+c        B2(2,-i)  =-b(4)
 
 c        b2(1,i)=0.0d0
 c        b2(2,i)=0.0d0