Metadynamics Simulation Config

class mlip.simulation.metadynamics.config.MetadynamicsConfig(*, bias_cvs: list[CollectiveVariableConfig], bias_sigmas: list[float], walls: list[WallPotentialConfig] = [], restraints: list[RestraintPotentialConfig] = [], initial_height: float, bias_factor: float | None, deposition_interval: int, max_gaussians: int, thermal_energy_ev: float | None = None)

User-facing configuration for a metadynamics simulation.

bias_cvs

One or two collective variable (CV) configurations defining the bias coordinates. Gaussian hills are deposited along these CVs.

Type:

list[mlip.simulation.metadynamics.potential_terms.collective_variables.CollectiveVariableConfig]

bias_sigmas

One or two sigma values to use for depositing Gaussian hills on each of the specified bias CVs. Units match those of the CVs.

Type:

list[float]

walls

Wall potential configurations, used to constrain coordinates.

Type:

list[mlip.simulation.metadynamics.potential_terms.walls.WallPotentialConfig]

restraints

Positional restraint configurations, used to fix atoms near their initial positions.

Type:

list[mlip.simulation.metadynamics.potential_terms.restraints.RestraintPotentialConfig]

initial_height

Initial Gaussian hill height in eV.

Type:

float

bias_factor

Well-tempered bias factor for rescaling hill heights at each deposition. Set to None for plain (untempered) metadynamics.

Type:

float | None

deposition_interval

Number of simulation steps between Gaussian hill depositions.

Type:

int

max_gaussians

Maximum number of Gaussian hills to store.

Type:

int

thermal_energy_ev

Thermal energy (k_B * T) in eV, populated by calling resolve. Do not set manually.

Type:

float | None

class mlip.simulation.metadynamics.config.JaxMDMetadynamicsSimulationConfig(*, 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, random_seed: int = 42, independent_seeds_batched: bool = True, num_episodes: ~typing.Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = None, timestep_fs: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 1.0, log_outputs: ~mlip.simulation.configs.simulation_config.SimulationLogOutputs = SimulationLogOutputs(positions=True, velocities=True, forces=True, kinetic_energy=True, temperature=True, cell=True, potential_energy=True, partial_charges=True), temperature_kelvin: ~typing.Annotated[float, FieldInfo(annotation=NoneType, required=True, metadata=[Gt(gt=0)])] | None = 300.0, 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] | list[list[int]] | None = None, metadynamics_config: ~mlip.simulation.metadynamics.config.MetadynamicsConfig)

Simulation config for a JAX-MD metadynamics run.

Extends JaxMDSimulationConfig with a metadynamics_config field that controls hill deposition, collective variables, walls, and restraints.

metadynamics_config

Metadynamics-specific settings including CVs, sigmas, bias factor, and deposition interval.

Type:

mlip.simulation.metadynamics.config.MetadynamicsConfig