Abstract Base Classes¶
We make use of abstract base classes, protocols and type hints to improve the workflow design experience. Further, these can be used for cross-package interoperability with other ZnTrack based packages like IPSuite.
For most Node classes operating on lists of ASE objects, there are two scenarios: - The node operates on a single ASE object. - The node operates on a list of ASE objects. For both scenarios, the node is given a list of ASE objects via the data attribute. For the first scenario, the id of the ASE object is given via the data_id attribute which is omitted for the second scenario.
Abstract base classes and type hints.
- class mlipx.abc.ASEKeys(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
- formation_energy = 'formation_energy'¶
- isolated_energies = 'isolated_energies'¶
- class mlipx.abc.NodeWithCalculator(*args, **kwargs)[source]¶
-
- get_spec() dict | None[source]¶
Get the meta data specification of the MLIP.
For details on the metadata specification, see: https://mlipx.readthedocs.io/en/latest/contributing.html#new-nodes
- class mlipx.abc.Optimizer(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
- BFGS = 'BFGS'¶
- FIRE = 'FIRE'¶
- LBFGS = 'LBFGS'¶
- class mlipx.abc.ProcessAtoms(*, name: str | None = None, always_changed: bool = False, data: list[ase.atoms.Atoms], data_id: int = -1, frames_path: pathlib.Path = PosixPath('$nwd$/frames.h5'))[source]¶
- static compare(*nodes: ProcessAtoms) ComparisonResults[source]¶
- data: list[Atoms]¶
- data_id: int = -1¶
- property figures: Dict[str, Figure]¶
- property frames: List[Atoms]¶
- frames_path: Path = PosixPath('$nwd$/frames.h5')¶