zmiana w parmread
authorAdam Sieradzan <adasko@mmka.chem.univ.gda.pl>
Fri, 23 Nov 2012 09:23:03 +0000 (10:23 +0100)
committerAdam Sieradzan <adasko@mmka.chem.univ.gda.pl>
Fri, 23 Nov 2012 09:23:03 +0000 (10:23 +0100)
source/unres/src_MD/parmread.F

index e15c7ae..d6dbc07 100644 (file)
@@ -314,13 +314,47 @@ C
       endif
       write (2,*) "Start reading THETA_PDB"
       do i=1,ntyp
-        read (ithep_pdb,*,err=111,end=111) a0thet(i),(athet(j,i),j=1,2),
-     &    (bthet(j,i),j=1,2)
-        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)
+        read (ithep,*,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)
        sigc0(i)=sigc0(i)**2
       enddo
+      do i=1,ntyp
+      athet(1,i,1,-1)=athet(1,i,1,1)
+      athet(2,i,1,-1)=athet(2,i,1,1)
+      bthet(1,i,1,-1)=-bthet(1,i,1,1)
+      bthet(2,i,1,-1)=-bthet(2,i,1,1)
+      athet(1,i,-1,1)=-athet(1,i,1,1)
+      athet(2,i,-1,1)=-athet(2,i,1,1)
+      bthet(1,i,-1,1)=bthet(1,i,1,1)
+      bthet(2,i,-1,1)=bthet(2,i,1,1)
+      enddo
+      do i=-ntyp,-1
+      a0thet(i)=a0thet(-i)
+      athet(1,i,-1,-1)=athet(1,-i,1,1)
+      athet(2,i,-1,-1)=-athet(2,-i,1,1)
+      bthet(1,i,-1,-1)=bthet(1,-i,1,1)
+      bthet(2,i,-1,-1)=-bthet(2,-i,1,1)
+      athet(1,i,-1,1)=athet(1,-i,1,1)
+      athet(2,i,-1,1)=-athet(2,-i,1,1)
+      bthet(1,i,-1,1)=-bthet(1,-i,1,1)
+      bthet(2,i,-1,1)=bthet(2,-i,1,1)
+      athet(1,i,1,-1)=-athet(1,-i,1,1)
+      athet(2,i,1,-1)=athet(2,-i,1,1)
+      bthet(1,i,1,-1)=bthet(1,-i,1,1)
+      bthet(2,i,1,-1)=-bthet(2,-i,1,1)
+      theta0(i)=theta0(-i)
+      sig0(i)=sig0(-i)
+      sigc0(i)=sigc0(-i)
+       do j=0,3
+        polthet(j,i)=polthet(j,-i)
+       enddo
+       do j=1,3
+         gthet(j,i)=gthet(j,-i)
+       enddo
+      enddo
       write (2,*) "End reading THETA_PDB"
       close (ithep_pdb)
 #endif