X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Fxdrfpdb%2Fsrc%2Fxdrf2pdb.F;h=592d552974487796ab38fcdf916b547476518a54;hb=3a334283df7e6ba60b11f1475278af4cee5bedbc;hp=c87e9ffa9312bdd02eb23b8cfd0f06662a9f67af;hpb=478a9d9a1c99eb3f4bc4ca676ff3162bdd01d633;p=unres.git diff --git a/source/xdrfpdb/src/xdrf2pdb.F b/source/xdrfpdb/src/xdrf2pdb.F index c87e9ff..592d552 100644 --- a/source/xdrfpdb/src/xdrf2pdb.F +++ b/source/xdrfpdb/src/xdrf2pdb.F @@ -17,6 +17,7 @@ external rescode logical iblnk external iblnk + double precision cm(3) ifreq=1 is=1 @@ -108,8 +109,8 @@ print *,"potE",potE," uconst",uconst #ifdef NEWUNRES call xdrffloat(ixdrf, uconst_back, iret) -#endif print *,"uconst_back",uconst_back +#endif call xdrffloat(ixdrf, t_bath, iret) print *,"t_bath",t_bath call xdrfint(ixdrf, nss, iret) @@ -118,6 +119,7 @@ call xdrfint(ixdrf, jhpb(j), iret) enddo print *,"nss",nss + print *," ",(ihpb(j),"-",jhpb(j),j=1,nss) call xdrfint(ixdrf, nfrag, iret) do i=1,nfrag call xdrffloat(ixdrf, qfrag(i), iret) @@ -149,6 +151,20 @@ c write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize) c(j,i+nres)=coord(j,ii+nres) enddo enddo +c Calculate the CM + do j=1,3 + cm(j)=0.0d0 + do i=1,nres + cm(j)=cm(j)+c(j,i) + enddo + cm(j)=cm(j)/nres + enddo + do i=1,nres + do j=1,3 + c(j,i)=c(j,i)-cm(j) + c(j,i+nres)=c(j,i+nres)-cm(j) + enddo + enddo etot=potE write (tytul,'(a,i6)') "Structure",kk call pdbout(etot,tytul,9)