openmm / pdbfixer

PDBFixer fixes problems in PDB files
Other
461 stars 115 forks source link

findMissingResidues() does not work on files that have been through pdbfixer already #138

Open rafwiewiora opened 8 years ago

rafwiewiora commented 8 years ago

This is my work sequence: take 2BQZ, delete half of chains with pdbfixer, save, add H's with REDUCE (http://kinemage.biochem.duke.edu/software/reduce.php - but not important here), then I wanted to re-use pdbfixer and mutate a non-standard methyl-lysine to lysine. At this point, however, findMissingResidues() no longer identifies the methyl-lysine (MLZ) as a non-standard residue.

This does not appear to have anything to do with my adding H's in a different software. A test case:

In [4]: fixer = pdbfixer.PDBFixer(filename='pdb2bqz.ent')

In [5]: PDBFile.writeFile(fixer.topology, fixer.positions, open('test.pdb', 'w'))

In [6]: fixer.findNonstandardResidues()

In [7]: fixer.nonstandardResidues
Out[7]: 
[(<Residue 164 (MLZ) of chain 1>, 'LYS'),
 (<Residue 335 (MLZ) of chain 3>, 'LYS')]

In [8]: fixer2 = pdbfixer.PDBFixer(filename='test.pdb')

In [9]: fixer2.findNonstandardResidues()

In [11]: fixer2.nonstandardResidues
Out[11]: []

simple pass through the pdbfixer makes findNonstandardResidues() not work on the second go.

peastman commented 8 years ago

Can you post the PDB file where it doesn't recognize the residue as nonstandard?

rafwiewiora commented 8 years ago

Here! https://gist.github.com/rafwiewiora/41ebf2022e14836063dda156891c3c68 (the test case above - test.pdb)

And here the pdb which was of interest to me (described in the first paragraph above): https://gist.github.com/rafwiewiora/f73f22eca5708408652f0bd4972d579e