Skip to content

_base

Base class for runners.

BaseRunner dataclass

BaseRunner(
    atoms: Atoms | None = None,
    copy_files: (
        SourceDirectory
        | dict[SourceDirectory, Filenames]
        | None
    ) = None,
)

A base class for runners that sets up the calculation and cleans up the scratch directory.

Attributes:

atoms class-attribute instance-attribute

atoms: Atoms | None = None

copy_files class-attribute instance-attribute

copy_files: (
    SourceDirectory
    | dict[SourceDirectory, Filenames]
    | None
) = None

cleanup

cleanup() -> None

Perform cleanup operations on the runtime directory.

Returns:

  • None
Source code in quacc/runners/_base.py
def cleanup(self) -> None:
    """
    Perform cleanup operations on the runtime directory.

    Returns
    -------
    None
    """
    calc_cleanup(self.atoms, self.tmpdir, self.job_results_dir)

setup

setup() -> None

Perform setup operations on the runtime directory.

Returns:

  • None
Source code in quacc/runners/_base.py
def setup(self) -> None:
    """
    Perform setup operations on the runtime directory.

    Returns
    -------
    None
    """
    self.tmpdir, self.job_results_dir = calc_setup(
        self.atoms, copy_files=self.copy_files
    )