X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2Freadpdb.F;h=48e0abdfbd8b810c536afda590bff09b60c2a8be;hb=498ca45141dbd80fcebdde113c49e95824055b7c;hp=97e9aa86235e41efc2d97c1ee3a00c341144c6d7;hpb=7c7a70f2ce1dad42c4ab384e11fa29ce2530f58e;p=unres.git diff --git a/source/unres/src_MD/readpdb.F b/source/unres/src_MD/readpdb.F index 97e9aa8..48e0abd 100644 --- a/source/unres/src_MD/readpdb.F +++ b/source/unres/src_MD/readpdb.F @@ -16,6 +16,8 @@ C geometry. character*3 seq,atom,res character*80 card dimension sccor(3,20) + double precision e1(3),e2(3),e3(3) + logical fail integer rescode ibeg=1 lsecondary=.false. @@ -104,9 +106,16 @@ C Calculate the CM of the last side chain. nres=nres+1 itype(nres)=21 if (unres_pdb) then - c(1,nres)=c(1,nres-1)+3.8d0 - c(2,nres)=c(2,nres-1) - c(3,nres)=c(3,nres-1) +C 2/15/2013 by Adam: corrected insertion of the last dummy residue + call refsys(nres-3,nres-2,nres-1,e1,e2,e3,fail) + if (fail) then + e2(1)=0.0d0 + e2(2)=1.0d0 + e2(3)=0.0d0 + endif + do j=1,3 + c(j,nres)=c(j,nres-1)-3.8d0*e2(j) + enddo else do j=1,3 dcj=c(j,nres-2)-c(j,nres-3) @@ -128,9 +137,16 @@ C Calculate the CM of the last side chain. nsup=nsup-1 nstart_sup=2 if (unres_pdb) then - c(1,1)=c(1,2)-3.8d0 - c(2,1)=c(2,2) - c(3,1)=c(3,2) +C 2/15/2013 by Adam: corrected insertion of the first dummy residue + call refsys(2,3,4,e1,e2,e3,fail) + if (fail) then + e2(1)=0.0d0 + e2(2)=1.0d0 + e2(3)=0.0d0 + endif + do j=1,3 + c(j,1)=c(j,2)-3.8d0*e2(j) + enddo else do j=1,3 dcj=c(j,4)-c(j,3) @@ -414,4 +430,3 @@ c print *,vbld(i+1),vbld(i+1+nres) enddo return end -