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, potential_energy: ndarray | list[ndarray] | None = None, partial_charges: 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 justnumpy.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
- potential_energy¶
The total potential energy along the trajectory in eV.
- Type:
numpy.ndarray | list[numpy.ndarray] | None
- partial_charges¶
The partial charges of each system along the trajectory.
- 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, potential_energy: ndarray | list[ndarray] | None = None, partial_charges: 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, potential_energy: ndarray | list[ndarray] | None = None, partial_charges: 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
SimulationStateand 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
forcesfield. 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, potential_energy: ndarray | list[ndarray] | None = None, partial_charges: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0, forces_real: ndarray | list[ndarray] | None = None) None¶
- class mlip.simulation.metadynamics.states.MetadynamicsSimulationState(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, potential_energy: ndarray | list[ndarray] | None = None, partial_charges: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0, bias_cv_values: ndarray | None = None, bias_potential: ndarray | None = None, gaussian_centers: ndarray | None = None, gaussian_heights: ndarray | None = None)¶
Public simulation state returned to the user after a metadynamics run.
Extends
SimulationStatewith per-step collective variable (CV) trajectories, bias potential values, and the full history of deposited Gaussian hills.- bias_cv_values¶
Values of the collective variables used by the bias potential along the trajectory. Has shape
(num_snapshots, num_cvs).- Type:
numpy.ndarray | None
- bias_potential¶
Bias potential values along the trajectory in eV. Has shape
(num_snapshots,).- Type:
numpy.ndarray | None
- gaussian_centers¶
Center of each deposited hill in CV space. Has shape
(num_hills, num_cvs).- Type:
numpy.ndarray | None
- gaussian_heights¶
Height of each deposited hill in eV. Has shape
(n_hills,).- Type:
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, potential_energy: ndarray | list[ndarray] | None = None, partial_charges: ndarray | list[ndarray] | None = None, step: int = 0, compute_time_seconds: float = 0.0, bias_cv_values: ndarray | None = None, bias_potential: ndarray | None = None, gaussian_centers: ndarray | None = None, gaussian_heights: ndarray | None = None) None¶