Commit db288690 by Jonathan King Committed by GitHub

Add forcefield arg to addMissingHydrogens. (#262)

Also remove trailing whitespace.
parent 92f73ccc
......@@ -1017,13 +1017,15 @@ class PDBFixer(object):
self.topology = modeller.topology
self.positions = modeller.positions
def addMissingHydrogens(self, pH=7.0):
def addMissingHydrogens(self, pH=7.0, forcefield=None):
"""Add missing hydrogen atoms to the structure.
Parameters
----------
pH : float, optional, default=7.0
The pH based on which to select hydrogens.
forcefield : ForceField, optional, default=None
The forcefield used when adding and minimizing hydrogens. If None, a default forcefield is used.
Notes
-----
......@@ -1042,7 +1044,7 @@ class PDBFixer(object):
"""
modeller = app.Modeller(self.topology, self.positions)
modeller.addHydrogens(pH=pH)
modeller.addHydrogens(pH=pH, forcefield=forcefield)
self.topology = modeller.topology
self.positions = modeller.positions
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment