Skip to content

Commit

Permalink
Merge pull request #684 from OpenFreeEnergy/remove-flatten-torsions
Browse files Browse the repository at this point in the history
Remove flatten torsions from HTF
  • Loading branch information
IAlibay authored Jan 15, 2024
2 parents b1a7c06 + 5f4cc01 commit 181afab
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
13 changes: 1 addition & 12 deletions openfe/protocols/openmm_rfe/_rfe_utils/relative.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ def __init__(self,
softcore_alpha=0.5,
softcore_LJ_v2=True,
softcore_LJ_v2_alpha=0.85,
interpolate_old_and_new_14s=False,
flatten_torsions=False,
**kwargs):
interpolate_old_and_new_14s=False):
"""
Initialize the Hybrid topology factory.
Expand Down Expand Up @@ -126,10 +124,6 @@ def __init__(self,
Whether to turn off interactions for new exceptions (not just
1,4s) at lambda = 0 and old exceptions at lambda = 1; if False,
they are present in the nonbonded force.
flatten_torsions : bool, default False
If True, torsion terms involving `unique_new_atoms` will be
scaled such that at lambda=0,1, the torsion term is turned off/on
respectively. The opposite is true for `unique_old_atoms`.
"""

# Assign system positions and force
Expand All @@ -149,11 +143,6 @@ def __init__(self,
self._use_dispersion_correction = use_dispersion_correction
self._interpolate_14s = interpolate_old_and_new_14s

# TODO: re-implement this at some point
if flatten_torsions:
errmsg = "Flatten torsions option is not current implemented"
raise ValueError(errmsg)

# Sofcore options
self._softcore_alpha = softcore_alpha
self._check_bounds(softcore_alpha, "softcore_alpha") # [0,1] check
Expand Down
1 change: 0 additions & 1 deletion openfe/protocols/openmm_rfe/equil_rfe_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,6 @@ def run(self, *, dry=False, verbose=True,
softcore_LJ_v2=alchem_settings.softcore_LJ_v2,
softcore_LJ_v2_alpha=alchem_settings.softcore_alpha,
interpolate_old_and_new_14s=alchem_settings.interpolate_old_and_new_14s,
flatten_torsions=alchem_settings.flatten_torsions,
)

# 4. Create lambda schedule
Expand Down
6 changes: 0 additions & 6 deletions openfe/protocols/openmm_rfe/equil_rfe_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ class Config:
at lambda 0 and old exceptions at lambda 1. If False they are present
in the nonbonded force. Default False.
"""
flatten_torsions = False
"""
Whether to scale torsion terms involving unique atoms, such that at the
endstate the torsion term is turned off/on depending on the state the
unique atoms belong to. Default False.
"""
explicit_charge_correction = False
"""
Whether to explicitly account for a charge difference during the
Expand Down
2 changes: 1 addition & 1 deletion openfe/tests/protocols/test_rfe_tokenization.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def instance(self):

class TestRelativeHybridTopologyProtocol(GufeTokenizableTestsMixin):
cls = openmm_rfe.RelativeHybridTopologyProtocol
key = "RelativeHybridTopologyProtocol-3030cc1227b68412f1a10d315be63147"
key = "RelativeHybridTopologyProtocol-fffbf0bfbe89e15a943764474b9b3a36"
repr = f"<{key}>"

@pytest.fixture()
Expand Down

0 comments on commit 181afab

Please sign in to comment.