-C 5/21/07 (AL) Read coefficients of the backbone-local sidechain-local
-C correlation energies.
-C
- read (isccor,*,end=119,err=119) nterm_sccor
- do i=1,20
- do j=1,20
- read (isccor,'(a)')
- do k=1,nterm_sccor
- read (isccor,*,end=119,err=119) kk,v1sccor(k,i,j),
- & v2sccor(k,i,j)
+ read (isccor,*,end=1113,err=1113) nsccortyp
+ read (isccor,*,end=1113,err=1113) (isccortyp(i),i=1,ntyp)
+c write (iout,*) 'ntortyp',ntortyp
+ maxinter=3
+cc maxinter is maximum interaction sites
+ do l=1,maxinter
+ do i=1,nsccortyp
+ do j=1,nsccortyp
+ read (isccor,*,end=1113,err=1113) nterm_sccor(i,j),
+ & nlor_sccor(i,j)
+ v0ijsccor=0.0d0
+ si=-1.0d0
+
+ do k=1,nterm_sccor(i,j)
+ read (isccor,*,end=1113,err=1113) kk,v1sccor(k,l,i,j)
+ & ,v2sccor(k,l,i,j)
+ v0ijsccor=v0ijsccor+si*v1sccor(k,l,i,j)
+ si=-si
+ enddo
+ do k=1,nlor_sccor(i,j)
+ read (isccor,*,end=1113,err=1113) kk,vlor1sccor(k,i,j),
+ & vlor2sccor(k,i,j),vlor3sccor(k,i,j)
+ v0ijsccor=v0ijsccor+vlor1sccor(k,i,j)/
+ &(1+vlor3sccor(k,i,j)**2)