Simulation State

class mlip.simulation.state.SimulationState(atomic_numbers: ndarray | list[ndarray] | None = None, positions: ndarray | list[ndarray] | None = None, forces: ndarray | list[ndarray] | None = None, velocities: ndarray | list[ndarray] | None = None, temperature: ndarray | list[ndarray] | None = None, kinetic_energy: ndarray | list[ndarray] | None = None, cell: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0)

Holds all the information of the current state of a simulation.

This object is populated during a simulation and is processed by the loggers of a simulation.

When running batched simulations, some of the fields may be of type list[numpy.ndarray] instead of just numpy.ndarray.

atomic_numbers

The atomic numbers of the system.

Type:

numpy.ndarray | list[numpy.ndarray] | None

positions

The positions along the trajectory. Has shape M x N x 3, with M being the number of steps divided by the logging interval, and N being the number of atoms of the system. The unit is Angstrom.

Type:

numpy.ndarray | list[numpy.ndarray] | None

forces

The forces along the trajectory with the same shape as the positions. The unit is eV / Angstrom.

Type:

numpy.ndarray | list[numpy.ndarray] | None

velocities

The velocities along the trajectory with the same shape as the positions, in units of \(\sqrt{eV/u}\).

Type:

numpy.ndarray | list[numpy.ndarray] | None

temperature

The temperatures along the trajectory in Kelvin.

Type:

numpy.ndarray | list[numpy.ndarray] | None

kinetic_energy

The total kinetic energy along the trajectory in eV.

Type:

numpy.ndarray | list[numpy.ndarray] | None

cell

The cell vectors along the trajectory, with shape M x 3 x 3. The unit is Angstrom.

Type:

numpy.ndarray | list[numpy.ndarray] | None

step

The current number of steps performed.

Type:

int

compute_time_seconds

The compute time in seconds used so far for the run (not including logging times).

Type:

float

__init__(atomic_numbers: ndarray | list[ndarray] | None = None, positions: ndarray | list[ndarray] | None = None, forces: ndarray | list[ndarray] | None = None, velocities: ndarray | list[ndarray] | None = None, temperature: ndarray | list[ndarray] | None = None, kinetic_energy: ndarray | list[ndarray] | None = None, cell: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0) None
class mlip.simulation.state.NEBSimulationState(atomic_numbers: ndarray | list[ndarray] | None = None, positions: ndarray | list[ndarray] | None = None, forces: ndarray | list[ndarray] | None = None, velocities: ndarray | list[ndarray] | None = None, temperature: ndarray | list[ndarray] | None = None, kinetic_energy: ndarray | list[ndarray] | None = None, cell: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0, forces_real: ndarray | list[ndarray] | None = None)

Simulation state for Nudged Elastic Band (NEB) transition state searches.

Inherits all the fields from SimulationState and adds one new one.

forces_real

Per-image physical forces from the force-field calculator, evaluated at each image’s current geometry before any NEB modification, meaning without the band-tangent projection or spring forces between images that are applied to the inherited forces field. Endpoints are included. Shape: (num_images, num_atoms, 3) per snapshot, unit eV/Å.

Type:

numpy.ndarray | list[numpy.ndarray] | None

__init__(atomic_numbers: ndarray | list[ndarray] | None = None, positions: ndarray | list[ndarray] | None = None, forces: ndarray | list[ndarray] | None = None, velocities: ndarray | list[ndarray] | None = None, temperature: ndarray | list[ndarray] | None = None, kinetic_energy: ndarray | list[ndarray] | None = None, cell: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0, forces_real: ndarray | list[ndarray] | None = None) None