Skip to content

Commit

Permalink
Compatibility changes in ligands.py module
Browse files Browse the repository at this point in the history
Adds compatibility changes based on comments for the tautomer addition
to protons in commit 008b3a3.
  • Loading branch information
Bas Rustenburg committed Apr 3, 2019
1 parent eba0ded commit 2db0b3f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions protons/app/ligands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ def prepare_calibration_systems(
output_basename: str,
ffxml: str = None,
hxml: str = None,
delete_old_H: bool = True,
delete_old_H: bool = False,
minimize: bool = True,
box_size: app.modeller.Vec3 = None,
):
Expand Down Expand Up @@ -2076,11 +2076,8 @@ def prepare_calibration_systems(
app.Modeller.loadHydrogenDefinitions(hxml)
if ffxml is not None:
forcefield = app.ForceField(
"amber10.xml", "gaff.xml", ffxml, "tip3p.xml", "ions_tip3p.xml"
"amber10-constph.xml", "gaff.xml", ffxml, "tip3p.xml", "ions_tip3p.xml"
)
# forcefield = app.ForceField(
# "amber10-constph.xml", "gaff.xml", ffxml, "tip3p.xml", "ions_tip3p.xml"
# )
else:
forcefield = app.ForceField(
"amber10-constph.xml", "gaff.xml", "tip3p.xml", "ions_tip3p.xml"
Expand All @@ -2099,11 +2096,11 @@ def prepare_calibration_systems(

# The system will likely have different hydrogen names.
# In this case its easiest to just delete and re-add with the right names based on hydrogen files
# if delete_old_H:
# to_delete = [
# atom for atom in modeller.topology.atoms() if atom.element.symbol in ["H"]
# ]
# modeller.delete(to_delete)
if delete_old_H:
to_delete = [
atom for atom in modeller.topology.atoms() if atom.element.symbol in ["H"]
]
modeller.delete(to_delete)

modeller.addHydrogens(forcefield=forcefield)

Expand Down

0 comments on commit 2db0b3f

Please sign in to comment.