Skip to content

Commit

Permalink
Merge pull request #302 from OpenBioSim/fix_zero_dummy_torsions
Browse files Browse the repository at this point in the history
Expose torsion modification kwargs
  • Loading branch information
lohedges committed Jun 18, 2024
2 parents 6b23473 + 7de4c4e commit b5a8209
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion python/BioSimSpace/Process/_somd.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ def __init__(
else:
raise IOError("SOMD executable doesn't exist: '%s'" % exe)

# Validate torsion modification kwargs.
self._zero_dummy_dihedrals = kwargs.get("zero_dummy_dihedrals", False)
if not isinstance(self._zero_dummy_dihedrals, bool):
self._zero_dummy_dihedrals = False
self._zero_dummy_impropers = kwargs.get("zero_dummy_impropers", False)
if not isinstance(self._zero_dummy_impropers, bool):
self._zero_dummy_impropers = False

# The names of the input files.
self._rst_file = _os.path.join(str(self._work_dir), f"{name}.rst7")
self._top_file = _os.path.join(str(self._work_dir), f"{name}.prm7")
Expand Down Expand Up @@ -322,7 +330,9 @@ def _setup(self):
# to the lambda = 0 state.
pert_mol = _to_pert_file(
pert_mol,
self._pert_file,
filename=self._pert_file,
zero_dummy_dihedrals=self._zero_dummy_dihedrals,
zero_dummy_impropers=self._zero_dummy_impropers,
property_map=self._property_map,
perturbation_type=self._protocol.getPerturbationType(),
)
Expand Down

0 comments on commit b5a8209

Please sign in to comment.