X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fwham%2Fsrc-HCD%2Freadpdb.F;h=83c63abcede45c2f7544f0ee1ddf1dcda2712735;hb=df61eb1a0ad598d7c6c5b4037dee4bec200d5bc2;hp=855d7545243e0f1bf49137db99c603fcb68b0015;hpb=fd10e81284102e5a8466e05c87f0202979a2f00b;p=unres.git diff --git a/source/wham/src-HCD/readpdb.F b/source/wham/src-HCD/readpdb.F index 855d754..83c63ab 100644 --- a/source/wham/src-HCD/readpdb.F +++ b/source/wham/src-HCD/readpdb.F @@ -20,15 +20,17 @@ C geometry. 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. + ires=0 do read (ipdbin,'(a80)',end=10) card -! write (iout,'(a)') card +c write (iout,'(a)') card if (card(:5).eq.'HELIX') then nhfrag=nhfrag+1 lsecondary=.true. @@ -57,7 +59,7 @@ C geometry. iterter(ires_old)=1 ishift1=ishift1+1 ibeg=2 -! write (iout,*) "Chain ended",ires,ishift,ires_old + write (iout,*) "Chain ended",ires,ishift,ires_old if (unres_pdb) then do j=1,3 dc(j,ires)=sccor(j,iii) @@ -66,11 +68,13 @@ C geometry. 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 @@ -94,6 +98,7 @@ c write (2,'(a)') card call sccenter(ires_old,iii,sccor) endif iii=0 + sccalc=.true. endif ! Start new residue. if (res.eq.'Cl-' .or. res.eq.'Na+') then @@ -115,7 +120,7 @@ c write (iout,*) "BEG ires",ires ! Start a new chain ishift=-ires_old+ires-1 !!!!! ishift1=ishift1-1 !!!!! -! write (iout,*) "New chain started",ires,ishift,ishift1,"!" + write (iout,*) "New chain started",ires,ishift,ishift1,"!" ires=ires-ishift+ishift1 ires_old=ires ibeg=0 @@ -214,7 +219,7 @@ C endif !unres_pdb 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