diff --git a/atomistics/calculators/output.py b/atomistics/calculators/output.py index 216db0ef..4ca8f1ef 100644 --- a/atomistics/calculators/output.py +++ b/atomistics/calculators/output.py @@ -2,25 +2,24 @@ @dataclasses.dataclass -class AtomisticsOutput: +class Output: @classmethod def fields(cls): return tuple(field.name for field in dataclasses.fields(cls)) - @classmethod - def get(cls, engine, *quantities: str) -> dict: - return {q: getattr(cls, q)(engine) for q in quantities} + def get(self, engine, *quantities: str) -> dict: + return {q: getattr(self, q)(engine) for q in quantities} @dataclasses.dataclass -class OutputStatic(AtomisticsOutput): +class OutputStatic(Output): forces: callable energy: callable stress: callable @dataclasses.dataclass -class OutputMolecularDynamics(AtomisticsOutput): +class OutputMolecularDynamics(Output): positions: callable cell: callable forces: callable