From: Adam Liwo Date: Thu, 9 Jul 2015 18:40:46 +0000 (+0200) Subject: Fixed the "***" issue in PDB output format by shifting the center of each molecule... X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=3a334283df7e6ba60b11f1475278af4cee5bedbc;p=unres.git Fixed the "***" issue in PDB output format by shifting the center of each molecule to 0 --- diff --git a/bin/xdrfpdb/xdrf2pdb b/bin/xdrfpdb/xdrf2pdb index 8b2f50a..2d2cb08 100755 Binary files a/bin/xdrfpdb/xdrf2pdb and b/bin/xdrfpdb/xdrf2pdb differ diff --git a/source/xdrfpdb/src/xdrf2pdb.F b/source/xdrfpdb/src/xdrf2pdb.F index c33490b..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 @@ -150,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)