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
& iatsc_s,iatsc_e,iatel_s,iatel_e,iatel_s_vdw,iatel_e_vdw,
& iatscp_s,iatscp_e,ispp,iscp
C 3/26/20 Interaction lists
- integer newcontlisti(200*maxres),newcontlistj(200*maxres),
- & newcontlistppi(200*maxres),newcontlistppj(200*maxres),
- & newcontlistpp_vdwi(200*maxres),newcontlistpp_vdwj(200*maxres),
- & newcontlistscpi(200*maxres),newcontlistscpj(200*maxres),
+ integer newcontlisti(2000*maxres),newcontlistj(2000*maxres),
+ & newcontlistppi(2000*maxres),newcontlistppj(2000*maxres),
+ & newcontlistpp_vdwi(2000*maxres),newcontlistpp_vdwj(2000*maxres),
+ & newcontlistscpi(2000*maxres),newcontlistscpj(2000*maxres),
& g_listscsc_start,g_listscsc_end,g_listpp_start,g_listpp_end,
& g_listpp_vdw_start,g_listpp_vdw_end,g_listscp_start,g_listscp_end
common /interact_list/newcontlisti,newcontlistj,g_listscsc_start,
parameter (max_cg_procs=maxprocs)
C Max. number of AA residues
integer maxres
- parameter (maxres=3300)
+ parameter (maxres=5000)
C Max. number of AA residues per chain
integer maxres_chain
parameter (maxres_chain=1200)
C Max. number of derivatives of virtual-bond and side-chain vectors in theta
C or phi.
integer maxdim
- parameter (maxdim=(maxres_chain-1)*(maxres_chain-2)/2)
+c parameter (maxdim=(maxres_chain-1)*(maxres_chain-2)/2)
+ parameter (maxdim=(maxres-1)*(maxres-2)/2)
C Max. number of SC contacts
integer maxcont
parameter (maxcont=12*maxres)
cycle
endif
endif
-#ifdef SEARCHSC
if (me.eq.king.or..not.out1file) then
write (iout,*) "Energies after removing overlaps"
call etotal(energia(0))
call enerprint(energia(0))
endif
+#ifdef SEARCHSC
! Search for better SC rotamers if requested
if (searchsc) then
call sc_move(2,nres-1,10,1d10,nft_sc,etot)
iranconf=1
goto 122
endif
+ else
+! Remove SC overlaps if requested
+ if (overlapsc) then
+ write (iout,*) 'Calling OVERLAP_SC'
+ call overlap_sc(fail)
+ if (fail) then
+ write (iout,*)
+ & "Failed to remove overlap"
+ endif
+ endif
+ if (me.eq.king.or..not.out1file) then
+ write (iout,*) "Energies after removing overlaps"
+ call etotal(energia(0))
+ call enerprint(energia(0))
+ endif
endif
C 8/22/17 AL Minimize initial structure
if (dccart) then
FC = ftn
-#OPT = -O3 -ip -mcmodel=medium -shared-intel -dynamic
-OPT = -g -CA -CB -mcmodel=medium -shared-intel -dynamic
+OPT = -O3 -ip -mcmodel=medium -shared-intel -dynamic
+#OPT = -g -CA -CB -mcmodel=medium -shared-intel -dynamic
OPT2 = -g -O0 -mcmodel=medium -shared-intel -dynamic
-#OPTE = -c -O3 -ipo -mcmodel=medium -shared-intel -dynamic
-OPTE = ${OPT} -c
+OPTE = -c -O3 -ipo -mcmodel=medium -shared-intel -dynamic
+#OPTE = ${OPT} -c
FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include
#FFLAGS1 = -c -g -CA -CB -I$(INSTALL_DIR)/include
${FC} ${FFLAGS} cinfo.f
${FC} ${OPT} ${object} dfa.o cinfo.o ${LIBS} -o ${BIN}
+E0LL2Y5D: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DAMD64 -DUNRES -DISNAN -DMP -DMPI \
+ -DSPLITELE -DLANG0 -DFIVEDIAG
+E0LL2Y5D: BIN = ~/bin/unres_ifort_MPICH-okeanos_E0LL2Y-HCD5.exe
+E0LL2Y5D: ${object} xdrf/libxdrf.a
+ gcc -o compinfo compinfo.c
+ ./compinfo | true
+ ${FC} ${FFLAGS} cinfo.f
+ ${FC} ${OPT} ${object} cinfo.o ${LIBS} -o ${BIN}
+
+E0LL2Y5D_DFA: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DAMD64 -DUNRES -DISNAN -DMP -DMPI \
+ -DSPLITELE -DLANG0 -DFIVEDIAG -DDFA
+E0LL2Y5D_DFA: BIN = ~/bin/unres_ifort_MPICH-okeanos_E0LL2Y-HCD5-DFA.exe
+E0LL2Y5D_DFA: ${object} dfa.o xdrf/libxdrf.a
+ gcc -o compinfo compinfo.c
+ ./compinfo | true
+ ${FC} ${FFLAGS} cinfo.f
+ ${FC} ${OPT} ${object} dfa.o cinfo.o ${LIBS} -o ${BIN}
+
NEWCORR: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DAMD64 -DUNRES -DISNAN -DMP -DMPI \
-DSPLITELE -DLANG0 -DNEWCORR -DCORRCD #-DFOURBODY #-DMYGAUSS #-DTIMING
NEWCORR: BIN = ~/bin/unres_ifort_MPICH-okeanos_SC-HCD.exe
enddo
100 format (//' alpha-carbon coordinates ',
& ' centroid coordinates'/
- 1 ' ', 6X,'X',11X,'Y',11X,'Z',
+ 1 ' ', 7X,'X',11X,'Y',11X,'Z',
& 10X,'X',11X,'Y',11X,'Z')
- 110 format (a,'(',i3,')',6f12.5)
+ 110 format (a,'(',i4,')',6f12.5)
return
end
i2=icont(2,i)
it1=itype(i1)
it2=itype(i2)
- write (iout,'(i3,2x,a,i4,2x,a,i4)')
+ write (iout,'(i5,2x,a,i5,2x,a,i4)')
& i,restyp(it1),i1,restyp(it2),i2
enddo
endif
i2=icont(2,i)
it1=itype(i1)
it2=itype(i2)
- write (iout,'(i3,2x,a,i4,2x,a,i4)')
+ write (iout,'(i5,2x,a,i5,2x,a,i4)')
& i,restyp(it1),i1,restyp(it2),i2
enddo
endif
ii1=iharp(3,i)
jj1=iharp(4,i)
write (iout,*)
- write (iout,'(20(a,i3,1x))') (restyp(itype(k)),k,k=i1,ii1)
- write (iout,'(20(a,i3,1x))') (restyp(itype(k)),k,k=j1,jj1,-1)
+ write (iout,'(20(a,i5,1x))') (restyp(itype(k)),k,k=i1,ii1)
+ write (iout,'(20(a,i5,1x))') (restyp(itype(k)),k,k=j1,jj1,-1)
c do k=jj1,j1,-1
c write (iout,'(a,i3,$)') restyp(itype(k)),k
c enddo
sigsq=1.0D0/sigsq
sig=sig0ij*dsqrt(sigsq)
rij_shift=1.0D0/rij-sig+sig0ij
+c if (energy_dec)
+c & write (iout,*) "rij",1.0d0/rij," rij_shift",rij_shift,
+c & " sig",sig," sig0ij",sig0ij
c for diagnostics; uncomment
c rij_shift=1.2*sig0ij
C I hate to put IF's in the loops, but here don't have another choice!!!!
cd write (iout,'(2(a3,i3,2x),17(0pf7.3))')
cd & restyp(itypi),i,restyp(itypj),j,
cd & rij_shift,1.0D0/rij,sig,sig0ij,sigsq,1-dsqrt(sigsq)
- return
+c return
endif
sigder=-sig*sigsq
c---------------------------------------------------------------
& evdwij
endif
- if (energy_dec) write (iout,'(a,2i5,3f10.5)')
+ if (energy_dec) write (iout,'(a,2i5,2f10.5,e15.5)')
& 'r sss evdw',i,j,1.0d0/rij,sss,evdwij
C Calculate gradient components.
call overlap_sc_list(ioverlap,ioverlap_last)
if (ioverlap_last.gt.0) then
write (iout,*) '#OVERLAPing residues ',ioverlap_last
- write (iout,'(20i4)') (ioverlap(k),k=1,ioverlap_last)
+ write (iout,'(18i5)') (ioverlap(k),k=1,ioverlap_last)
had_overlaps=.true.
endif
integer ioverlap(maxres),ioverlap_last
data redfac /0.5D0/
-c write (iout,*) "overlap_sc_list"
+ write (iout,*) "overlap_sc_list"
+c write(iout,*) "iatsc_s",iatsc_s," iatsc_e",iatsc_e
+ write(iout,*) "nnt",nnt," nct",nct
ioverlap_last=0
C Check for SC-SC overlaps and mark residues
c print *,'>>overlap_sc nnt=',nnt,' nct=',nct
ind=0
-c write(iout,*) "iatsc_s",iatsc_s," iatsc_e",iatsc_e
- do i=iatsc_s,iatsc_e
+c do i=iatsc_s,iatsc_e
+ do i=nnt,nct
itypi=iabs(itype(i))
itypi1=iabs(itype(i+1))
if (itypi.eq.ntyp1) cycle
dzi=dc_norm(3,nres+i)
dsci_inv=dsc_inv(itypi)
c
- do iint=1,nint_gr(i)
- do j=istart(i,iint),iend(i,iint)
+c do iint=1,nint_gr(i)
+c do j=istart(i,iint),iend(i,iint)
+ do j=i+1,nct
ind=ind+1
itypj=iabs(itype(j))
if (itypj.eq.ntyp1) cycle
-c write (iout,*) "i,j",i,j," itypi,itypj",itypi,itypj
+c write (iout,*) "i,j",i,j," itypi,itypj",itypi,itypj
dscj_inv=dsc_inv(itypj)
sig0ij=sigma(itypi,itypj)
chi1=chi(itypi,itypj)
alf1=alp(itypi)
alf2=alp(itypj)
alf12=0.5D0*(alf1+alf2)
- if (j.gt.i+1) then
- rcomp=sigmaii(itypi,itypj)
- else
- rcomp=sigma(itypi,itypj)
- endif
-c write (iout,'(2(a3,2i3),a3,2f10.5)'),
-c & ' i=',i,iti,' j=',j,itj,' d=',dist(nres+i,nres+j)
+ if (j.gt.i+1) then
+ rcomp=sigmaii(itypi,itypj)
+ else
+ rcomp=sigma(itypi,itypj)
+ endif
+c write (iout,'(2(a3,2i5),a3,2f10.5)'),
+c & ' i=',i,itypi,' j=',j,itypj,' d=',dist(nres+i,nres+j)
c & ,rcomp
xj=c(1,nres+j)-xi
yj=c(2,nres+j)-yi
sigsq=1.0D0/sigsq
sig=sig0ij*dsqrt(sigsq)
rij_shift=1.0D0/rij-sig+sig0ij
-c write (iout,*) "rij_shift",rij_shift
-c if ( 1.0/rij .lt. redfac*rcomp .or.
-c & rij_shift.le.0.0D0 ) then
-c write (iout,'(a,i3,a,i3,a,f10.5,a,3f10.5)')
-c & 'overlap SC-SC: i=',i,' j=',j,
-c & ' dist=',dist(nres+i,nres+j),' rcomp=',
-c & rcomp,1.0/rij,rij_shift
- if ( rij_shift.le.0.0D0 ) then
-c write (iout,*) "overlap",i,j
- ioverlap_last=ioverlap_last+1
- ioverlap(ioverlap_last)=i
- do k=1,ioverlap_last-1
- if (ioverlap(k).eq.i) ioverlap_last=ioverlap_last-1
+c write (iout,*) "rij",1.0d0/rij," rij_shift",rij_shift,
+c & " sig",sig," sig0ij",sig0ij
+c if ( rij_shift.le.0.0D0 ) then
+ if ( rij_shift/sig0ij.le.0.1D0 ) then
+c write (iout,*) "overlap",i,j
+ write (iout,'(a,i5,a,i5,a,f10.5,a,3f10.5)')
+ & 'overlap SC-SC: i=',i,' j=',j,
+ & ' dist=',dist(nres+i,nres+j),' rcomp=',
+ & rcomp,1.0/rij,rij_shift
+ ioverlap_last=ioverlap_last+1
+ ioverlap(ioverlap_last)=i
+ do k=1,ioverlap_last-1
+ if (ioverlap(k).eq.i) ioverlap_last=ioverlap_last-1
+ enddo
+ ioverlap_last=ioverlap_last+1
+ ioverlap(ioverlap_last)=j
+ do k=1,ioverlap_last-1
+ if (ioverlap(k).eq.j) ioverlap_last=ioverlap_last-1
+ enddo
+ endif
enddo
- ioverlap_last=ioverlap_last+1
- ioverlap(ioverlap_last)=j
- do k=1,ioverlap_last-1
- if (ioverlap(k).eq.j) ioverlap_last=ioverlap_last-1
- enddo
- endif
- enddo
- enddo
+c enddo
enddo
return
end
include 'COMMON.TORSION'
integer i,iti
write (iout,'(/a)') 'Geometry of the virtual chain.'
- write (iout,'(7a)') ' Res ',' d',' Theta',
+ write (iout,'(7a)') ' Res ',' d',' Theta',
& ' Phi',' Dsc',' Alpha',' Omega'
do i=1,nres
iti=itype(i)
- write (iout,'(a3,i4,6f10.3)') restyp(iti),i,vbld(i),
+ write (iout,'(a3,i5,6f10.3)') restyp(iti),i,vbld(i),
& rad2deg*theta(i),rad2deg*phi(i),vbld(nres+i),rad2deg*alph(i),
& rad2deg*omeg(i)
enddo
integer i,j,ires,nscat
double precision sccor(3,50)
double precision sccmj
- write (2,*) "sccenter",ires,nscat
- call flush(2)
+c write (2,*) "sccenter",ires,nscat
+c call flush(2)
do j=1,3
sccmj=0.0D0
do i=1,nscat
double precision xi,yi,zi,xj,yj,zj,xj_safe,yj_safe,zj_safe,
& xj_temp,yj_temp,zj_temp
double precision dist_init, dist_temp,r_buff_list
- integer contlisti(200*maxres),contlistj(200*maxres)
+ integer contlisti(2000*maxres),contlistj(2000*maxres)
! integer :: newcontlisti(200*nres),newcontlistj(200*nres)
integer i,j,itypi,itypj,subchap,xshift,yshift,zshift,iint,
& ilist_sc,g_ilist_sc
double precision xi,yi,zi,xj,yj,zj,xj_safe,yj_safe,zj_safe,
& xj_temp,yj_temp,zj_temp
double precision dist_init, dist_temp,r_buff_list
- integer contlistscpi(200*maxres),contlistscpj(200*maxres)
+ integer contlistscpi(2000*maxres),contlistscpj(2000*maxres)
! integer :: newcontlistscpi(200*nres),newcontlistscpj(200*nres)
integer i,j,itypi,itypj,subchap,xshift,yshift,zshift,iint,
& ilist_scp,g_ilist_scp
integer displ(0:max_fg_procs),i_ilist_scp(0:max_fg_procs),ierr
- integer contlistscpi_f(200*maxres),contlistscpj_f(200*maxres)
+ integer contlistscpi_f(2000*maxres),contlistscpj_f(2000*maxres)
integer ilist_scp_first,ifirstrun,g_ilist_sc
! print *,"START make_SC"
#ifdef DEBUG
& xmedi,ymedi,zmedi
double precision dx_normi,dy_normi,dz_normi,dxj,dyj,dzj,
& dx_normj,dy_normj,dz_normj
- integer contlistpp_vdwi(200*maxres),contlistpp_vdwj(200*maxres)
+ integer contlistpp_vdwi(2000*maxres),contlistpp_vdwj(2000*maxres)
! integer :: newcontlistppi(200*nres),newcontlistppj(200*nres)
integer i,j,itypi,itypj,subchap,xshift,yshift,zshift,iint,
& ilist_pp_vdw,g_ilist_pp_vdw
& xmedi,ymedi,zmedi
double precision dx_normi,dy_normi,dz_normi,dxj,dyj,dzj,
& dx_normj,dy_normj,dz_normj
- integer contlistppi(200*maxres),contlistppj(200*maxres)
+ integer contlistppi(2000*maxres),contlistppj(2000*maxres)
! integer :: newcontlistppi(200*nres),newcontlistppj(200*nres)
integer i,j,itypi,itypj,subchap,xshift,yshift,zshift,iint,
& ilist_pp,g_ilist_pp
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
write (iout,'(/a)')
& "Cartesian coordinates of the reference structure"
write (iout,'(a,3(3x,a5),5x,3(3x,a5))')
- & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
+ & "Residue ","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
do ires=1,nres
- write (iout,'(a3,1x,i3,3f8.3,5x,3f8.3)')
+ write (iout,'(a3,1x,i4,3f8.3,5x,3f8.3)')
& 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
enddo
100 format (//' alpha-carbon coordinates ',
& ' centroid coordinates'/
- 1 ' ', 6X,'X',11X,'Y',11X,'Z',
+ 1 ' ', 7X,'X',11X,'Y',11X,'Z',
& 10X,'X',11X,'Y',11X,'Z')
- 110 format (a,'(',i3,')',6f12.5)
+ 110 format (a,'(',i4,')',6f12.5)
cc enddiag
do j=1,nbfrag
do i=1,4
write (iout,'(/a)')
& "Cartesian coordinates of the reference structure"
write (iout,'(a,3(3x,a5),5x,3(3x,a5))')
- & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
+ & "Residue ","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
do ires=1,nres
- write (iout,'(a3,1x,i3,3f8.3,5x,3f8.3)')
+ write (iout,'(a3,1x,i4,3f8.3,5x,3f8.3)')
& restyp(itype(ires)),ires,(c(j,ires),j=1,3),
& (c(j,ires+nres),j=1,3)
enddo
write (iout,'(/a)')
& "Cartesian coordinates of the reference structure"
write (iout,'(a,3(3x,a5),5x,3(3x,a5))')
- & "Residue","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
+ & "Residue ","X(CA)","Y(CA)","Z(CA)","X(SC)","Y(SC)","Z(SC)"
do ires=1,nres
- write (iout,'(a3,1x,i3,3f8.3,5x,3f8.3)')
+ write (iout,'(a3,1x,i4,3f8.3,5x,3f8.3)')
& restyp(itype(ires)),ires,(c(j,ires),j=1,3),
& (c(j,ires+nres),j=1,3)
enddo
enddo
lim_odl=ii
endif
+c write (iout,*) "Distance restraints set"
+c call flush(iout)
c
c Theta, dihedral and SC retraints
c
enddo
lim_dih=nct-nnt-2
endif
+c write (iout,*) "Dihedral angle restraints set"
+c call flush(iout)
if (waga_theta.gt.0.0d0) then
c open (ientin,file=tpl_k_sigma_theta,status='old')
c sigma_theta(k,i)=sigma_theta(k,i)*sigma_theta(k,i)
enddo
endif
+c write (iout,*) "Angle restraints set"
+c call flush(iout)
if (waga_d.gt.0.0d0) then
c open (ientin,file=tpl_k_sigma_d,status='old')
enddo
endif
enddo
+c write (iout,*) "SC restraints set"
+c call flush(iout)
c
c remove distance restraints not used in any model from the list
c shift data in all arrays
c
+c write (iout,*) "waga_dist",waga_dist," nnt",nnt," nct",nct
if (waga_dist.ne.0.0d0) then
ii=0
liiflag=.true.
do i=nnt,nct-2
do j=i+2,nct
ii=ii+1
+c if (idomain(k,i).eq.idomain(k,j).and.idomain(k,i).ne.0
+c & .and. distal.le.dist2_cut ) then
+c write (iout,*) "i",i," j",j," ii",ii
+c call flush(iout)
if (ii_in_use(ii).eq.0.and.liiflag) then
liiflag=.false.
iistart=ii
enddo
ii=ii-iishift
lim_odl=lim_odl-iishift
+c endif
endif
enddo
enddo
endif
-
+c write (iout,*) "Removing distances completed"
+c call flush(iout)
endif ! .not. klapaucjusz
if (constr_homology.gt.0) call homology_partition
+c write (iout,*) "After homology_partition"
+c call flush(iout)
if (constr_homology.gt.0) call init_int_table
-c write (iout,*) "ithet_start =",ithet_start,"ithet_end =",ithet_end
-c write (iout,*) "loc_start =",loc_start,"loc_end =",loc_end
+c write (iout,*) "After init_int_table"
+c call flush(iout)
+c write (iout,*) "ithet_start =",ithet_start,"ithet_end =",ithet_end
+c write (iout,*) "loc_start =",loc_start,"loc_end =",loc_end
c
c Print restraints
c
include 'COMMON.IOUNITS'
#ifdef FIVEDIAG
integer iposc,ichain,n,innt,inct
- double precision v_work(3,maxres2),vvec(maxres2_chain),rs(maxres2)
+ double precision v_work(3,maxres2),vvec(maxres2),rs(maxres2)
#else
double precision gamvec(MAXRES6)
common /syfek/ gamvec
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