include 'COMMON.NAMES'
include 'COMMON.CONTROL'
integer i,j,ibeg,ishift1,ires,iii,ires_old,ishift,ity
- logical lprn /.false./,fail
+ logical lprn /.false./,fail,sccalc
double precision e1(3),e2(3),e3(3)
double precision dcj,efree_temp
character*3 seq,res
ires=0
ires_old=0
iii=0
+ sccalc=.false.
lsecondary=.false.
nhfrag=0
nbfrag=0
call sccenter(ires,iii,sccor)
endif
iii=0
+ sccalc=.true.
endif
! Read free energy
if (index(card,"FREE ENERGY").gt.0) read(card(35:),*) efree_temp
! Fish out the ATOM cards.
if (index(card(1:4),'ATOM').gt.0) then
+ sccalc=.false.
read (card(12:16),*) atom
c write (2,'(a)') card
! write (iout,*) "! ",atom," !",ires
call sccenter(ires_old,iii,sccor)
endif
iii=0
+ sccalc=.true.
endif
! Start new residue.
if (res.eq.'Cl-' .or. res.eq.'Na+') then
endif !itype.eq.ntyp1
enddo
C Calculate the CM of the last side chain.
- call sccenter(ires,iii,sccor)
+ if (.not.sccalc) call sccenter(ires,iii,sccor)
nsup=nres
nstart_sup=1
if (itype(nres).ne.10) then
double precision sccor(3,50)
double precision e1(3),e2(3),e3(3)
integer rescode,iterter(maxres),cou
- logical fail
+ logical fail,sccalc
integer i,j,iii,ires,ires_old,ishift,ishift1,ibeg
double precision dcj,efree_temp
bfac=0.0d0
nhfrag=0
nbfrag=0
iii=0
+ sccalc=.false.
do
read (ipdbin,'(a80)',end=10) card
c write (iout,'(a)') card
call sccenter(ires,iii,sccor)
endif
iii=0
+ sccalc=.true.
endif
! Read free energy
if (index(card,"FREE ENERGY").gt.0) read(card(35:),*) efree_temp
! Fish out the ATOM cards.
if (index(card(1:4),'ATOM').gt.0) then
+ sccalc=.false.
read (card(12:16),*) atom
c write (2,'(a)') card
c write (iout,*) "ibeg",ibeg
call sccenter(ires_old,iii,sccor)
endif
iii=0
+ sccalc=.true.
endif
! Start new residue.
if (res.eq.'Cl-' .or. res.eq.'Na+') then
if (dcj.eq.0) dcj=1.23591524223
c(j,i)=c(j,i-1)+dcj
c(j,nres+i)=c(j,i)
+ dC(j,i)=c(j,i)
enddo
endif !unres_pdb
else !itype(i+1).eq.ntyp1
if (dcj.eq.0) dcj=1.23591524223
c(j,i)=c(j,i+1)-dcj
c(j,nres+i)=c(j,i)
+ dC(j,i)=c(j,i)
enddo
endif !unres_pdb
endif !itype(i+1).eq.ntyp1
enddo
write (iout,*) "After loop in readpbd"
C Calculate the CM of the last side chain.
+ if (.not. sccalc) then
if (unres_pdb) then
do j=1,3
dc(j,ires)=sccor(j,iii)
c write (iout,*) "Calling sccenter iii",iii
call sccenter(ires,iii,sccor)
endif
+ endif
nsup=nres
nstart_sup=1
if (itype(nres).ne.10) then
& restyp(itype(ires)),ires,(c(j,ires),j=1,3),
& (c(j,ires+nres),j=1,3)
enddo
- endif
call flush(iout)
+ endif
c write(iout,*)"before int_from_cart nres",nres
call int_from_cart(.true.,.false.)
do i=1,nres
integer i,j,iii,ibeg,ishift,ishift1,ity,ires,ires_old
double precision dcj
integer rescode,kkk,lll,icha,cou,kupa,iprzes
- logical lsecondary
+ logical lsecondary,sccalc
integer iterter(maxres)
double precision efree_temp
iii=0
ibeg=1
ishift1=0
+ sccalc=.false.
do
read (ipdbin,'(a80)',end=10) card
! write (iout,'(a)') card
call sccenter(ires,iii,sccor)
endif
iii=0
+ sccalc=.true.
endif
! Read free energy
if (index(card,"FREE ENERGY").gt.0) read(card(35:),*) efree_temp
! Fish out the ATOM cards.
if (index(card(1:4),'ATOM').gt.0) then
+ sccalc=.false.
read (card(12:16),*) atom
c write (2,'(a)') card
! write (iout,*) "! ",atom," !",ires
call sccenter(ires_old,iii,sccor)
endif
iii=0
+ sccalc=.true.
endif
! Start new residue.
if (res.eq.'Cl-' .or. res.eq.'Na+') then
endif !itype.eq.ntyp1
enddo
C Calculate the CM of the last side chain.
- call sccenter(ires,iii,sccor)
+ if (.not. sccalc) call sccenter(ires,iii,sccor)
nsup=nres
nstart_sup=1
if (itype(nres).ne.10) then