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