X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD-M%2Freadpdb.F;h=71daf6f61d28d75727a56878a9ee7a74efe6deec;hb=75c81b9dbe2f7e18e73a9d61ee02980790335164;hp=f66a5188a4c5b21fd75e36e0a40adfa3a522df84;hpb=e853e7c7e7922e73411b5b215ad733489e8aede5;p=unres.git diff --git a/source/unres/src_MD-M/readpdb.F b/source/unres/src_MD-M/readpdb.F index f66a518..71daf6f 100644 --- a/source/unres/src_MD-M/readpdb.F +++ b/source/unres/src_MD-M/readpdb.F @@ -16,7 +16,9 @@ C geometry. character*3 seq,atom,res character*80 card dimension sccor(3,20) + double precision e1(3),e2(3),e3(3) integer rescode + logical fail ibeg=1 lsecondary=.false. nhfrag=0 @@ -140,9 +142,16 @@ C Calculate the CM of the last side chain. nres=nres+1 itype(nres)=ntyp1 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) @@ -164,9 +173,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) @@ -183,6 +199,7 @@ C Calculate internal coordinates. & (c(j,nres+ires),j=1,3) enddo endif +C print *,"before int_from_cart" call int_from_cart(.true.,.false.) call sc_loc_geom(.true.) do i=1,nres @@ -213,7 +230,7 @@ C Splits to single chain if occurs lll=lll+1 cc write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) if (i.gt.1) then - if ((itype(i-1).eq.ntyp1)) then + if ((itype(i-1).eq.ntyp1).and.(i.gt.2)) then chain_length=lll-1 kkk=kkk+1 c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) @@ -229,6 +246,8 @@ c write (iout,*) "spraw lancuchy",(c(j,i),j=1,3) endif enddo enddo + write (iout,*) chain_length + if (chain_length.eq.0) chain_length=nres do j=1,3 chain_rep(j,chain_length,symetr)=chain_rep(j,chain_length,1) chain_rep(j,chain_length+nres,symetr) @@ -372,6 +391,7 @@ c vbld(nres)=3.8d0 c vbld_inv(nres)=1.0d0/vbld(2) c endif c endif + print *,"A TU2" if (lside) then do i=2,nres-1 do j=1,3