From 9405a6bf84d9e7fdea4422a4d4d8377477aa94bd Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 3 Jun 2024 16:24:25 +0100 Subject: [PATCH 1/3] Update the name of the map option. [ci skip] --- src/somd2/runner/_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/somd2/runner/_runner.py b/src/somd2/runner/_runner.py index 8adf5a1..d0d9924 100644 --- a/src/somd2/runner/_runner.py +++ b/src/somd2/runner/_runner.py @@ -159,7 +159,7 @@ def __init__(self, system, config): self._config._extra_args["check_for_h_by_mass"] = False self._config._extra_args["check_for_h_by_element"] = False self._config._extra_args["check_for_h_by_ambertype"] = False - self._config._extra_args["fix_ghost_sigmas"] = True + self._config._extra_args["fix_perturbable_zero_sigmas"] = True # Check for a periodic space. self._check_space() From 9326a91c9b5ecaa9d2e9db3f6b38ca9ba5aa431a Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 3 Jun 2024 20:07:34 +0100 Subject: [PATCH 2/3] Remove redundant variables. [ci skip] --- src/somd2/runner/_somd1.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/somd2/runner/_somd1.py b/src/somd2/runner/_somd1.py index b21469c..0eae23c 100644 --- a/src/somd2/runner/_somd1.py +++ b/src/somd2/runner/_somd1.py @@ -59,10 +59,6 @@ def _make_compatible(system): except KeyError: raise KeyError("No perturbable molecules in the system") - # Store a dummy element and ambertype. - element_dummy = _SireMol.Element("Xx") - ambertype_dummy = "du" - for mol in pert_mols: # Store the molecule info. info = mol.info() From 73260233830222de5bf95450f37ac45cff419b0a Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 4 Jun 2024 09:51:46 +0100 Subject: [PATCH 3/3] Make zero LJ sigma check consistent with Sire. --- src/somd2/runner/_somd1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/somd2/runner/_somd1.py b/src/somd2/runner/_somd1.py index 0eae23c..b3f0755 100644 --- a/src/somd2/runner/_somd1.py +++ b/src/somd2/runner/_somd1.py @@ -70,8 +70,8 @@ def _make_compatible(system): # First fix zero LJ sigmas values. ################################## - # Create a null LJParameter. - null_lj = _SireMM.LJParameter() + # Tolerance for zero sigma values. + null_lj_sigma = 1e-9 for atom in mol.atoms(): # Get the end state LJ sigma values. @@ -79,7 +79,7 @@ def _make_compatible(system): lj1 = atom.property("LJ1") # Lambda = 0 state has a zero sigma value. - if lj0.sigma() == null_lj.sigma(): + if abs(lj0.sigma().value()) <= null_lj_sigma: # Use the sigma value from the lambda = 1 state. edit_mol = ( edit_mol.atom(atom.index()) @@ -90,7 +90,7 @@ def _make_compatible(system): ) # Lambda = 1 state has a zero sigma value. - if lj1.sigma() == null_lj.sigma(): + if abs(lj1.sigma().value()) <= null_lj_sigma: # Use the sigma value from the lambda = 0 state. edit_mol = ( edit_mol.atom(atom.index())