Skip to content

Commit

Permalink
Expose FreeEnergyMixin protocols. [closes #243]
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Feb 19, 2024
1 parent 5cc7dea commit 1730723
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/BioSimSpace/Process/_amber.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from .._Config import Amber as _AmberConfig
from .._Exceptions import IncompatibleError as _IncompatibleError
from .._Exceptions import MissingSoftwareError as _MissingSoftwareError
from ..Protocol._free_energy_mixin import _FreeEnergyMixin
from ..Protocol._position_restraint_mixin import _PositionRestraintMixin
from .._SireWrappers import System as _System
from ..Types._type import Type as _Type
Expand Down Expand Up @@ -126,7 +127,7 @@ def __init__(
)

# Catch unsupported protocols.
if isinstance(protocol, _Protocol.FreeEnergy):
if isinstance(protocol, _FreeEnergyMixin):
raise _IncompatibleError(
"Unsupported protocol: '%s'" % self._protocol.__class__.__name__
)
Expand Down
3 changes: 2 additions & 1 deletion python/BioSimSpace/Process/_gromacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
from .. import _isVerbose
from .._Config import Gromacs as _GromacsConfig
from .._Exceptions import MissingSoftwareError as _MissingSoftwareError
from ..Protocol._free_energy_mixin import _FreeEnergyMixin
from ..Protocol._position_restraint_mixin import _PositionRestraintMixin
from .._SireWrappers import System as _System
from ..Types._type import Type as _Type
Expand Down Expand Up @@ -232,7 +233,7 @@ def _setup(self):
# Create a copy of the system.
system = self._system.copy()

if isinstance(self._protocol, _Protocol.FreeEnergy):
if isinstance(self._protocol, _FreeEnergyMixin):
# Check that the system contains a perturbable molecule.
if self._system.nPerturbableMolecules() == 0:
raise ValueError(
Expand Down

0 comments on commit 1730723

Please sign in to comment.