-
Notifications
You must be signed in to change notification settings - Fork 128
Description
I've noticed the following weird behaviors with pdbfixer upon mutating to a Tyrosine. The first one is on the latest stable release, the other is on the latest dev build:
First issue:
If I take an input PDB file and then run the following commands on a stable installation:
from pdbfixer import PDBFixer
from openmm.app import PDBFile
fixer = PDBFixer(filename='test-ser-noPhos.pdb')
fixer.applyMutations(["SER-173-TYR"], "A")
fixer.findMissingResidues()
fixer.findMissingAtoms()
fixer.addMissingAtoms()
fixer.addMissingHydrogens(7.0)
PDBFile.writeFile(fixer.topology, fixer.positions, open('test-tyr-output.pdb', 'w'))
The commands run, but the coordinates for TYR173 look absolutely wrong. The extra bonds are probably just artifacts from pymol but it's putting the coordinates of the ring much closer together than normal. Screenshot below of "output tyrosine":

Second issue: Weirdly, upon running the above code block from issue 1 with the latest dev version (Basically, since non-standard residue mutations were added), the above command block fails at fixer.addMissingHydrogens(7.0), giving the following stack trace:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[6], line 1
----> 1 fixer.addMissingHydrogens(7.0)
File ~/miniconda3/envs/dev-pdbfixer/lib/python3.9/site-packages/pdbfixer-1.9.0-py3.9.egg/pdbfixer/pdbfixer.py:1233, in PDBFixer.addMissingHydrogens(self, pH, forcefield)
1210 def addMissingHydrogens(self, pH=7.0, forcefield=None):
1211 """Add missing hydrogen atoms to the structure.
1212
1213 Parameters
(...)
1231 >>> fixer.addMissingHydrogens(pH=8.0)
1232 """
-> 1233 extraDefinitions = self._downloadNonstandardDefinitions()
1234 variants = [self._describeVariant(res, extraDefinitions) for res in self.topology.residues()]
1235 modeller = app.Modeller(self.topology, self.positions)
File ~/miniconda3/envs/dev-pdbfixer/lib/python3.9/site-packages/pdbfixer-1.9.0-py3.9.egg/pdbfixer/pdbfixer.py:1244, in PDBFixer._downloadNonstandardDefinitions(self)
1240 def _downloadNonstandardDefinitions(self):
1241 """If the file contains any nonstandard residues, download their definitions and build
1242 the information needed to add hydrogens to them.
1243 """
-> 1244 app.Modeller._loadStandardHydrogenDefinitions()
1245 resnames = set(residue.name for residue in self.topology.residues())
1246 definitions = {}
AttributeError: type object 'Modeller' has no attribute '_loadStandardHydrogenDefinitions'
I also appear to be getting this issue as well on Tryptophans. Any insight as to what might be going on?