saxs and adam's corrections to multichain
[unres.git] / source / unres / src_MD-M / parmread.F
index a8f75a7..bbfcabb 100644 (file)
@@ -358,6 +358,7 @@ C Control printout of the coefficients of virtual-bond-angle potentials
 C
       if (lprint) then
         write (iout,'(//a)') 'Parameter of virtual-bond-angle potential'
+        do iblock=1,2
         do i=1,nthetyp+1
           do j=1,nthetyp+1
             do k=1,nthetyp+1
@@ -392,6 +393,7 @@ C
           enddo
         enddo
       enddo
+      enddo
       call flush(iout)
       endif
 c      write (2,*) "Start reading THETA_PDB",ithep_pdb
@@ -658,6 +660,7 @@ c      &v2(k,-i,-j,iblock),v2(k,i,j,iblock)
       close (itorp)
       if (lprint) then
         write (iout,'(/a/)') 'Torsional constants:'
+        do iblock=1,2
         do i=1,ntortyp
           do j=1,ntortyp
             write (iout,*) 'ityp',i,' jtyp',j
@@ -673,6 +676,7 @@ c      &v2(k,-i,-j,iblock),v2(k,i,j,iblock)
             enddo
           enddo
         enddo
+        enddo
       endif
 
 C
@@ -879,7 +883,7 @@ cc maxinter is maximum interaction sites
             v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
      &(1+vlor3sccor(k,i,j)**2)
           enddo
-          v0sccor(i,j,iblock)=v0ijsccor
+           v0sccor(l,i,j)=v0ijsccor
         enddo
       enddo
       enddo
@@ -888,6 +892,7 @@ cc maxinter is maximum interaction sites
 #endif      
       if (lprint) then
         write (iout,'(/a/)') 'Torsional constants:'
+        do l=1,maxinter
         do i=1,nsccortyp
           do j=1,nsccortyp
             write (iout,*) 'ityp',i,' jtyp',j
@@ -902,6 +907,7 @@ cc maxinter is maximum interaction sites
             enddo
           enddo
         enddo
+        enddo
       endif
 
 C