evdw_t=0.0d0
do i=iatsc_s,iatsc_e
itypi=iabs(itype(i))
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
cd & 'iend=',iend(i,iint)
do j=istart(i,iint),iend(i,iint)
itypj=iabs(itype(j))
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
evdw_t=0.0d0
do i=iatsc_s,iatsc_e
itypi=iabs(itype(i))
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
do iint=1,nint_gr(i)
do j=istart(i,iint),iend(i,iint)
itypj=iabs(itype(j))
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
zj=c(3,nres+j)-zi
ind=0
do i=iatsc_s,iatsc_e
itypi=iabs(itype(i))
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=iabs(itype(j))
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
chi1=chi(itypi,itypj)
chi2=chi(itypj,itypi)
ind=0
do i=iatsc_s,iatsc_e
itypi=iabs(itype(i))
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=iabs(itype(j))
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
ind=0
do i=iatsc_s,iatsc_e
itypi=iabs(itype(i))
- if (itypi.eq.21) cycle
+ if (itypi.eq.ntyp1) cycle
itypi1=iabs(itype(i+1))
xi=c(1,nres+i)
yi=c(2,nres+i)
do j=istart(i,iint),iend(i,iint)
ind=ind+1
itypj=iabs(itype(j))
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
dscj_inv=vbld_inv(j+nres)
sig0ij=sigma(itypi,itypj)
r0ij=r0(itypi,itypj)
gcorr_loc(i)=0.0d0
enddo
do i=iatel_s,iatel_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
if (itel(i).eq.0) goto 1215
dxi=dc(1,i)
dyi=dc(2,i)
num_conti=0
c write (iout,*) 'i',i,' ielstart',ielstart(i),' ielend',ielend(i)
do j=ielstart(i),ielend(i)
- if (itype(j).eq.21 .or. itype(j+1).eq.21) cycle
+ if (itype(j).eq.ntyp1 .or. itype(j+1).eq.ntyp1) cycle
if (itel(j).eq.0) goto 1216
ind=ind+1
iteli=itel(i)
& +0.5d0*(pizda(1,1)+pizda(2,2))
enddo
endif
- else if (j.eq.i+3 .and. itype(i+2).ne.21) then
+ else if (j.eq.i+3 .and. itype(i+2).ne.ntyp1) then
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
C Fourth-order contributions
c write (iout,*) 'iatscp_s=',iatscp_s,' iatscp_e=',iatscp_e,
c & ' scal14',scal14
do i=iatscp_s,iatscp_e
- if (itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
iteli=itel(i)
c write (iout,*) "i",i," iteli",iteli," nscp_gr",nscp_gr(i),
c & " iscp",(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
do j=iscpstart(i,iint),iscpend(i,iint)
itypj=iabs(itype(j))
- if (itypj.eq.21) cycle
+ if (itypj.eq.ntyp1) cycle
C Uncomment following three lines for SC-p interactions
c xj=c(1,nres+j)-xi
c yj=c(2,nres+j)-yi
estr1=0.0d0
write (iout,*) "distchainmax",distchainmax
do i=nnt+1,nct
- if (itype(i-1).eq.21 .or. itype(i).eq.21) then
+ if (itype(i-1).eq.ntyp1 .or. itype(i).eq.ntyp1) then
estr1=estr1+gnmr1(vbld(i),-1.0d0,distchainmax)
do j=1,3
gradb(j,i-1)=gnmr1prim(vbld(i),-1.0d0,distchainmax)
c
do i=nnt,nct
iti=iabs(itype(i))
- if (iti.ne.10 .and. iti.ne.21) then
+ if (iti.ne.10 .and. iti.ne.ntyp1) then
nbi=nbondterm(iti)
if (nbi.eq.1) then
diff=vbld(i+nres)-vbldsc0(1,iti)
c write (*,'(a,i2)') 'EBEND ICG=',icg
c write (iout,*) ithet_start,ithet_end
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
C Zero the energy function and its derivative at 0 or pi.
call splinthet(theta(i),0.5d0*delta,ss,ssd)
it=itype(i-1)
ichir22=isign(1,itype(i))
endif
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
icrc=0
y(1)=0.0D0
y(2)=0.0D0
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
icrc=0
etheta=0.0D0
c write (iout,*) "ithetyp",(ithetyp(i),i=1,ntyp1)
do i=ithet_start,ithet_end
- if (itype(i-1).eq.21) cycle
+ if (itype(i-1).eq.ntyp1) cycle
dethetai=0.0d0
dephii=0.0d0
dephii1=0.0d0
coskt(k)=dcos(k*theti2)
sinkt(k)=dsin(k*theti2)
enddo
- if (i.gt.3 .and. itype(i-2).ne.21) then
+ if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
#ifdef OSF
phii=phi(i)
if (phii.ne.phii) phii=150.0
sinph1(k)=0.0d0
enddo
endif
- if (i.lt.nres .and. itype(i).ne.21) then
+ if (i.lt.nres .and. itype(i).ne.ntyp1) then
#ifdef OSF
phii1=phi(i+1)
if (phii1.ne.phii1) phii1=150.0
c write (iout,'(a)') 'ESC'
do i=loc_start,loc_end
it=itype(i)
- if (it.eq.21) cycle
+ if (it.eq.ntyp1) cycle
if (it.eq.10) goto 1
nlobit=nlob(iabs(it))
c print *,'i=',i,' it=',it,' nlobit=',nlobit
delta=0.02d0*pi
escloc=0.0D0
do i=loc_start,loc_end
- if (itype(i).eq.21) cycle
+ if (itype(i).eq.ntyp1) cycle
costtab(i+1) =dcos(theta(i+1))
sinttab(i+1) =dsqrt(1-costtab(i+1)*costtab(i+1))
cost2tab(i+1)=dsqrt(0.5d0*(1.0d0+costtab(i+1)))
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
itori=itortyp(itype(i-2))
itori1=itortyp(itype(i-1))
phii=phi(i)
c lprn=.true.
etors=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1) cycle
if (itel(i-2).eq.0 .or. itel(i-1).eq.0) goto 1215
if (iabs(itype(i)).eq.20) then
iblock=2
c lprn=.true.
etors_d=0.0D0
do i=iphi_start,iphi_end-1
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21
- & .or. itype(i).eq.21 .or. itype(i+1).eq.21) cycle
+ if (itype(i-2).eq.ntyp1.or. itype(i-1).eq.ntyp1
+ & .or. itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) cycle
if (itel(i-2).eq.0 .or. itel(i-1).eq.0 .or. itel(i).eq.0)
& goto 1215
itori=itortyp(itype(i-2))
c write (iout,*) "EBACK_SC_COR",iphi_start,iphi_end,nterm_sccor
esccor=0.0D0
do i=iphi_start,iphi_end
- if (itype(i-2).eq.21 .or. itype(i-1).eq.21) cycle
+ if (itype(i-2).eq.ntyp1 .or. itype(i-1).eq.ntyp1) cycle
esccor_ii=0.0D0
itori=iabs(itype(i-2))
itori1=iabs(itype(i-1))
else if (card(:3).eq.'TER') then
C End current chain
ires_old=ires+1
- itype(ires_old)=21
+ itype(ires_old)=ntyp1
ibeg=2
c write (iout,*) "Chain ended",ires,ishift,ires_old
call sccenter(ires,iii,sccor)
ishift=ires-1
if (res.ne.'GLY' .and. res.ne. 'ACE') then
ishift=ishift-1
- itype(1)=21
+ itype(1)=ntyp1
endif
c write (iout,*) "ires",ires," ibeg",ibeg," ishift",ishift
ibeg=0
nres=ires
do i=2,nres-1
c write (iout,*) i,itype(i)
- if (itype(i).eq.21) then
+ if (itype(i).eq.ntyp1) then
c write (iout,*) "dummy",i,itype(i)
do j=1,3
c(j,i)=((c(j,i-1)+c(j,i+1))/2+2*c(j,i-1)-c(j,i-2))/2
nstart_sup=1
if (itype(nres).ne.10) then
nres=nres+1
- itype(nres)=21
+ itype(nres)=ntyp1
do j=1,3
dcj=c(j,nres-2)-c(j,nres-3)
c(j,nres)=c(j,nres-1)+dcj
c(j,nres+1)=c(j,1)
c(j,2*nres)=c(j,nres)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
nsup=nsup-1
nstart_sup=2
do j=1,3
lll=lll+1
cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
if (i.gt.1) then
- if (itype(i-1).eq.21) then
+ if (itype(i-1).eq.ntyp1) then
chain_length=lll-1
kkk=kkk+1
c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3)
do i=2,nres
iti=itype(i)
write (iout,*) i,i-1,(c(j,i),j=1,3),(c(j,i-1),j=1,3),dist(i,i-1)
- if (itype(i-1).ne.21 .and. itype(i).ne.21 .and.
+ if (itype(i-1).ne.ntyp1 .and. itype(i).ne.ntyp1 .and.
& (dist(i,i-1).lt.2.0D0 .or. dist(i,i-1).gt.5.0D0)) then
write (iout,'(a,i4)') 'Bad Cartesians for residue',i
stop
theta(i+1)=alpha(i-1,i,i+1)
if (i.gt.2) phi(i+1)=beta(i-2,i-1,i,i+1)
enddo
- if (itype(1).eq.21) then
+ if (itype(1).eq.ntyp1) then
do j=1,3
c(j,1)=c(j,2)+(c(j,3)-c(j,4))
enddo
endif
- if (itype(nres).eq.21) then
+ if (itype(nres).eq.ntyp1) then
do j=1,3
c(j,nres)=c(j,nres-1)+(c(j,nres-2)-c(j,nres-3))
enddo