openmm / pdbfixer

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

Fixed bug in added bonds to heterogens #298

Closed peastman closed 1 month ago

peastman commented 1 month ago

Fixes #297. It fixes a problem in a new feature introduced in #296.

sukritsingh commented 1 month ago

Cross posting from #297 for posterity - but this fix addresses the issue seen with SER -> SEP mutations 🎉

Running the following commands yields a Serine to Phosphoserine mutation:

from pdbfixer import PDBFixer
from openmm.app import PDBFile
fixer = PDBFixer(filename='../sep-testing/test-ser-noPhos.pdb')
fixer.downloadTemplate('SEP')
fixer.applyMutations(["SER-173-SEP"], "A")
fixer.findMissingResidues()
fixer.findMissingAtoms()
fixer.addMissingAtoms()
PDBFile.writeFile(fixer.topology, fixer.positions, open('../sep-testing/test-sep-output.pdb', 'w'))

I also tested this on a tyrosine to phosphotyrosine mutation, which previously worked, it still functions correctly, indicating no new issues! Thanks!