Skip to content

Commit

Permalink
Use abstractmethod instead of NotImplemented
Browse files Browse the repository at this point in the history
  • Loading branch information
IAlibay committed Oct 16, 2023
1 parent 49b6842 commit 1aac5ec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openfe/protocols/openmm_afe/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"""
from __future__ import annotations

import abc
import os
import logging

Expand Down Expand Up @@ -221,6 +222,7 @@ def _set_optional_path(basepath):
self.scratch_basepath = _set_optional_path(scratch_basepath)
self.shared_basepath = _set_optional_path(shared_basepath)

@abc.abstractmethod
def _get_components(self):
"""
Get the relevant components to create the alchemical system with.
Expand All @@ -229,8 +231,9 @@ def _get_components(self):
----
Must be implemented in the child class.
"""
raise NotImplementedError
...

@abc.abstractmethod
def _handle_settings(self):
"""
Get a dictionary with the following entries:
Expand All @@ -253,7 +256,7 @@ def _handle_settings(self):
----
Must be implemented in the child class.
"""
raise NotImplementedError
...

def _get_system_generator(
self, settings: dict[str, SettingsBaseModel],
Expand Down

0 comments on commit 1aac5ec

Please sign in to comment.