X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fcluster%2Fwham%2Fsrc-HCD-5D%2Freadpdb.F;h=58c63e4208e96b269850edc0953a8c71327e0bc2;hb=79fd686e9d9aaa23e4fda802ee16379470e961d3;hp=a7bb52bfbd5bc493fd051db5cff8c71ece0a3d68;hpb=7cb2846e682af69c598f6b109dff15a8ea147a1f;p=unres.git diff --git a/source/cluster/wham/src-HCD-5D/readpdb.F b/source/cluster/wham/src-HCD-5D/readpdb.F index a7bb52b..58c63e4 100644 --- a/source/cluster/wham/src-HCD-5D/readpdb.F +++ b/source/cluster/wham/src-HCD-5D/readpdb.F @@ -98,7 +98,7 @@ c write (2,'(a)') card ! write (iout,*) "Calculating sidechain center iii",iii if (unres_pdb) then do j=1,3 - dc(j,ires+nres)=sccor(j,iii) + dc(j,ires_old)=sccor(j,iii) enddo else call sccenter(ires_old,iii,sccor) @@ -347,17 +347,20 @@ c character*5 atom & ' Gamma' endif endif - do i=1,nres-1 + do i=2,nres iti=itype(i) - if (dist(i,i+1).lt.2.0D0 .or. dist(i,i+1).gt.5.0D0) then +c 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.ntyp1 .and. itype(i).ne.ntyp1 .and. + & (dist(i,i-1).lt.1.0D0 .or. dist(i,i-1).gt.6.0D0)) then write (iout,'(a,i4)') 'Bad Cartesians for residue',i -ctest stop +c stop endif - vbld(i+1)=dist(i,i+1) - vbld_inv(i+1)=1.0d0/vbld(i+1) - if (i.gt.1) theta(i+1)=alpha(i-1,i,i+1) + vbld(i)=dist(i-1,i) + vbld_inv(i)=1.0d0/vbld(i) + 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 + c if (unres_pdb) then c if (itype(1).eq.ntyp1) then c theta(3)=90.0d0*deg2rad @@ -806,7 +809,7 @@ C 2/15/2013 by Adam: corrected insertion of the first dummy residue endif endif C Calculate internal coordinates. - if (lprn) then + if (out_template_coord) then write (iout,'(/a)') & "Cartesian coordinates of the reference structure" write (iout,'(a,3(3x,a5),5x,3(3x,a5))') @@ -818,6 +821,7 @@ C Calculate internal coordinates. enddo endif C Calculate internal coordinates. +#ifdef DEBUG write (iout,'(a)') & "Backbone and SC coordinates as read from the PDB" do ires=1,nres @@ -825,7 +829,8 @@ C Calculate internal coordinates. & ires,itype(ires),restyp(itype(ires)),(c(j,ires),j=1,3), & (c(j,nres+ires),j=1,3) enddo - call int_from_cart(.true.,.false.) +#endif + call int_from_cart(.true.,out_template_coord) call sc_loc_geom(.false.) do i=1,nres thetaref(i)=theta(i)