sinkt(k)=dsin(k*theti2)
enddo
C if (i.gt.3) then
- if (i.gt.3 .and. itype(imax0(i-3,1)).ne.ntyp1) then
+ if (i.gt.3 .and. itype(max0(i-3,1)).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
if (phii.ne.phii) phii=150.0
esccor=0.0D0
do i=itau_start,itau_end
C do i=42,42
- esccor_ii=0.0D0
+
if ((itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)) cycle
isccori=isccortyp(itype(i-2))
isccori1=isccortyp(itype(i-1))
c(see comment below)
C print *,i,tauangle(1,i)
-c do intertyp=1,3 !intertyp
- do intertyp=2,2 !intertyp
+ do intertyp=1,3 !intertyp
+ esccor_ii=0.0D0
cc Added 09 May 2012 (Adasko)
cc Intertyp means interaction type of backbone mainchain correlation:
c 1 = SC...Ca...Ca...Ca
v2ij=v2sccor(j,intertyp,isccori,isccori1)
cosphi=dcos(j*tauangle(intertyp,i))
sinphi=dsin(j*tauangle(intertyp,i))
+ if (energy_dec) esccor_ii=esccor_ii+v1ij*cosphi+v2ij*sinphi
esccor=esccor+v1ij*cosphi+v2ij*sinphi
gloci=gloci+j*(v2ij*cosphi-v1ij*sinphi)
enddo
+ if (energy_dec) write (iout,'(a6,i5,i2,0pf7.3)')
+ & 'esccor',i,intertyp,esccor_ii
C print *,i,tauangle(1,i),gloci
gloc_sc(intertyp,i-3,icg)=gloc_sc(intertyp,i-3,icg)+wsccor*gloci
c write (iout,*) "WTF",intertyp,i,itype(i),v1ij*cosphi+v2ij*sinphi