From 69737071d5701a052fb6bb156752047e9849d269 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 17 Jun 2024 13:42:55 +0100 Subject: [PATCH] Expose dummy torsion modification options for SOMD. --- python/BioSimSpace/Process/_somd.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/python/BioSimSpace/Process/_somd.py b/python/BioSimSpace/Process/_somd.py index 982d11d86..2d1c5e508 100644 --- a/python/BioSimSpace/Process/_somd.py +++ b/python/BioSimSpace/Process/_somd.py @@ -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") @@ -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(), )