Simulation Config¶
- class mlip.simulation.configs.simulation_config.SimulationConfig(*, simulation_type: SimulationType = SimulationType.MD, md_integrator: MDIntegrator = MDIntegrator.NVT_LANGEVIN, num_steps: Annotated[int, Gt(gt=0)], snapshot_interval: Annotated[int, Gt(gt=0)] = 1, box: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | Annotated[list[Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])]], FieldInfo(annotation=NoneType, required=True, metadata=[MinLen(min_length=3), MaxLen(max_length=3)])] | None = None, edge_capacity_multiplier: Annotated[float, Ge(ge=1)] = 1.25, set_none_charge_to_zero: bool = True)¶
The base configuration that all simulations share.
It only contains fields that are independent of backend and simulation type.
- simulation_type¶
The type of simulation to run, either MD or minimization. Defaults to MD.
- md_integrator¶
The type of MD integrator to use if running MD simulations. Ignored if
simulation_typeis not MD. Defaults to NVT-Langevin.
- num_steps¶
The number of total steps to run. For energy minimizations, this is the maximum number of steps if no convergence reached earlier.
- Type:
int
- snapshot_interval¶
The interval (in steps) between snapshots of the simulation state. This means information about every N-th snapshot is stored in the simulation state available to the loggers (N being the snapshot interval). Defaults to 1.
- Type:
int
- box¶
The optional simulation box. If
None, no periodic boundary conditions (PBCs) are applied. It can be set to either a float or a list three floats, to enforce orthorhombic PBCs. Note that theASESimulationEnginesupports generic PBCs by reading thecellattribute of thease.Atomsto simulate, in which case theboxparameter should not be used.- Type:
float | list[float] | None
- edge_capacity_multiplier¶
Factor to multiply the number of edges (and long-range edges, when present) by to obtain the edge capacity including padding. Defaults to 1.25.
- Type:
float
- set_none_charge_to_zero¶
Whether to set a missing total charge on the simulated system to zero. Default is
True.- Type:
bool
- class mlip.simulation.configs.simulation_config.TemperatureScheduleConfig(*, method: TemperatureScheduleMethod = TemperatureScheduleMethod.CONSTANT, temperature: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, start_temperature: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, end_temperature: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, max_temperature: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, min_temperature: Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, heating_period: Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None)¶
The base configuration containing all the possible parameters for the temperature schedules.
- method¶
The type of temperature schedule to use. Default is constant.
- temperature¶
The temperature to use for the constant schedule in Kelvin.
- Type:
float | None
- start_temperature¶
The starting temperature in Kelvin. Used for the linear schedule.
- Type:
float | None
- end_temperature¶
The ending temperature in Kelvin. Used for the linear schedule.
- Type:
float | None
- max_temperature¶
The maximum temperature in Kelvin. Used for the triangle schedule.
- Type:
float | None
- min_temperature¶
The minimum temperature in Kelvin. Used for the triangle schedule.
- Type:
float | None
- heating_period¶
The period for heating the system. Measured in number of simulation steps. Used for the triangle schedule.
- Type:
int | None
- class mlip.simulation.configs.simulation_config.SimulationLogOutputs(positions: bool = True, velocities: bool = True, forces: bool = True, kinetic_energy: bool = True, temperature: bool = True, cell: bool = True)¶
Dataclass that specifies which of the fields in the simulation state get updated/logged during the simulation.
By default, all of them will. A user can hence disable specific ones to save memory, e.g., if one is only interested in saving positions.
- positions¶
Whether to save positions.
- Type:
bool
- velocities¶
Whether to save velocities.
- Type:
bool
- forces¶
Whether to save forces.
- Type:
bool
- kinetic_energy¶
Whether to save kinetic energies.
- Type:
bool
- temperature¶
Whether to save temperatures.
- Type:
bool
- cell¶
Whether to save cell vectors.
- Type:
bool