ASE Simulation Config¶
- class mlip.simulation.configs.ase_config.ASESimulationConfig(*, simulation_type: ~mlip.simulation.enums.SimulationType = SimulationType.MD, md_integrator: ~mlip.simulation.enums.MDIntegrator = MDIntegrator.NVT_LANGEVIN, num_steps: ~typing.Annotated[int, ~annotated_types.Gt(gt=0)], snapshot_interval: ~typing.Annotated[int, ~annotated_types.Gt(gt=0)] = 1, box: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | ~typing.Annotated[list[~typing.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: ~typing.Annotated[float, ~annotated_types.Ge(ge=1)] = 1.25, set_none_charge_to_zero: bool = True, log_interval: ~typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, log_outputs: ~mlip.simulation.configs.simulation_config.SimulationLogOutputs = SimulationLogOutputs(positions=True, velocities=True, forces=True, kinetic_energy=True, temperature=True, cell=True), timestep_fs: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 1.0, temperature_kelvin: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 300.0, friction: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 0.1, temperature_schedule_config: ~mlip.simulation.configs.simulation_config.TemperatureScheduleConfig = TemperatureScheduleConfig(method=<TemperatureScheduleMethod.CONSTANT: 'constant'>, temperature=300.0, start_temperature=None, end_temperature=None, max_temperature=None, min_temperature=None, heating_period=None), pressure_bar: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 1.01325, barostat_update_interval: ~typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 25, molecule_indices: list[int] | None = None, max_force_convergence_threshold: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None)¶
Configuration for the ASE-based simulations.
Also includes the attributes of the parent class
SimulationConfig.The config is separated into three blocks: values that are used for both MD and minimization, and then the ones used exclusively for MD and for minimization, respectively.
- log_interval¶
The interval in
num_stepsat which the loggers will be called. If not set, an appropriate value will be attempted to be selected. For fewer than 1000 steps, it will default to 10. For more than 1000 steps, it will default to 1000.- Type:
int | None
- log_outputs¶
A dataclass specifying which of the simulation state fields to populate during the simulation. By default, all possible ones.
- timestep_fs¶
The simulation timestep in femtoseconds. The default is 1.0.
- Type:
float | None
- temperature_kelvin¶
The temperature in Kelvin, set to 300 by default. Must be set to
Nonefor energy minimizations.- Type:
float | None
- friction¶
Friction coefficient for the simulation. Default is 0.1.
- Type:
float | None
- temperature_schedule_config¶
The temperature schedule config to use for the simulation. Default is the constant schedule in which case
temperature_kelvinwill be applied.
- pressure_bar¶
The target pressure in bar, for NPT simulations. Default is 1.01325 bar = 1 atm.
- Type:
float | None
- barostat_update_interval¶
The number of steps between volume updates using the MonteCarloBarostat in
NPT_MC_LANGEVINsimulations. Default is 25.- Type:
int | None
- molecule_indices¶
List defining which atoms belong to which molecules, required for
NPT_MC_LANGEVINsimulations. For example, for a system of two consecutive water molecules, this would be[0, 0, 0, 1, 1, 1]. Default is None.- Type:
list[int] | None
- max_force_convergence_threshold¶
The convergence threshold for minimizations w.r.t. the sum of the force norms. See the ASE docs for more information. If not set, the ASE default will be used.
- Type:
float | None
Note
This simulation engine supports generic PBCs and lattice parameters read from the
cellattribute of thease.Atomsto be simulated. Setting theboxparameter from configuration is discouraged in this case, but kept for consistency withJaxMDSimulationEngineengine for now.