rmsd icon indicating copy to clipboard operation
rmsd copied to clipboard

.pdb coordinate reader can be improved

Open nabraham47 opened this issue 6 years ago • 2 comments
trafficstars

The get_coordinates_pdb function in calculate_rmsd.py would benefit from the inclusion of 'HETATM' when reading in coordinates and atoms.

https://github.com/charnley/rmsd/blob/cd8af499fb63529a1b5b1f880fdb2dab2731544a/rmsd/calculate_rmsd.py#L688

I was able to change line 688 to: if line.startswith("ATOM") or line.startswith("HETATM"):

This allowed the program to also read in .pdb's formatted with HETATM

nabraham47 avatar May 29 '19 22:05 nabraham47

Hi @nabraham47 ,

I am very rarely a .pdb format user but there seems to be one or more issues with the PDB reader. (like #57 ) If you open up a pullrequest with the changes I will accept the changes.

charnley avatar Jun 07 '19 07:06 charnley

Hi @nabraham47 ,

your very valuable suggestion contributed to widen the potential scope of the script, because openbabel, widely used to convert between chemistry relevant files, equally uses HETATOM as a line instruction.

nbehrnd avatar Jun 11 '19 12:06 nbehrnd