steering
Steered molecular dynamics utilities.
import mlx_atomistic.steering
Classes
Section titled “Classes”SteeredCOMBiasPotential
Section titled “SteeredCOMBiasPotential”class SteeredCOMBiasPotential def __init__(ligand_indices: object, direction: object, target: float, k: float, masses: object | None = None, name: str = 'steered_com_bias')Moving harmonic restraint on a ligand center-of-mass projection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
ligand_indices | object | ||
direction | object | ||
target | float | ||
k | float | ||
masses | object | None | None | |
name | str | 'steered_com_bias' |
Methods
collective_variable
Section titled “collective_variable”def collective_variable(positions: mx.array) -> mx.arrayReturn ligand COM projection onto the steering direction.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | mx.array |
Returns
mx.array
energy_forces
Section titled “energy_forces”def energy_forces(positions: mx.array, cell: Cell | None = None, pairs: mx.array | None = None) -> tuple[mx.array, mx.array]Return the steering COM-bias energy and per-atom forces.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | mx.array | Atomic coordinates, shape (n_atoms, 3). | |
cell | Cell | None | None | Accepted for interface uniformity but unused. Defaults to None. |
pairs | mx.array | None | None | Accepted for interface uniformity and ignored; the term uses its stored index list. Defaults to None. |
Returns
tuple[mx.array, mx.array]— An(energy, forces)tuple: scalar energy and per-atom forces of shape(n_atoms, 3).
potential_energy
Section titled “potential_energy”def potential_energy(positions: mx.array, cell: Cell | None = None) -> mx.arrayReturn the steering COM-bias energy 0.5 * k * (cv - target)**2.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | mx.array | Atomic coordinates, shape (n_atoms, 3). | |
cell | Cell | None | None | Accepted for interface uniformity but unused. Defaults to None. |
Returns
mx.array— The bias energy as a scalar array.
SteeredNVTResult
Section titled “SteeredNVTResult”class SteeredNVTResult def __init__(sampled_positions: mx.array, sampled_velocities: mx.array, sampled_steps: mx.array, sampled_time: mx.array, diagnostic_steps: mx.array, diagnostic_time: mx.array, potential_energy: mx.array, kinetic_energy: mx.array, total_energy: mx.array, potential_energy_by_term: dict[str, mx.array], temperature: mx.array, pair_count: mx.array, rebuild_count: mx.array, constraint_max_error: mx.array, sampled_cv: mx.array, sampled_target: mx.array, sampled_bias_energy: mx.array, sampled_work: mx.array, diagnostic_cv: mx.array, diagnostic_target: mx.array, diagnostic_bias_energy: mx.array, diagnostic_work: mx.array, final_state: SimulationState, target_temperature: float)Trajectory and steering diagnostics from an NVT SMD run.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
sampled_positions | mx.array | ||
sampled_velocities | mx.array | ||
sampled_steps | mx.array | ||
sampled_time | mx.array | ||
diagnostic_steps | mx.array | ||
diagnostic_time | mx.array | ||
potential_energy | mx.array | ||
kinetic_energy | mx.array | ||
total_energy | mx.array | ||
potential_energy_by_term | dict[str, mx.array] | ||
temperature | mx.array | ||
pair_count | mx.array | ||
rebuild_count | mx.array | ||
constraint_max_error | mx.array | ||
sampled_cv | mx.array | ||
sampled_target | mx.array | ||
sampled_bias_energy | mx.array | ||
sampled_work | mx.array | ||
diagnostic_cv | mx.array | ||
diagnostic_target | mx.array | ||
diagnostic_bias_energy | mx.array | ||
diagnostic_work | mx.array | ||
final_state | SimulationState | ||
target_temperature | float |
Functions
Section titled “Functions”simulate_steered_nvt
Section titled “simulate_steered_nvt”def simulate_steered_nvt(positions, velocities, *, masses = None, ligand_indices, direction, target_start: float, target_velocity: float, k: float, cell: Cell | None = None, force_terms: ForceTerm | list[ForceTerm] | tuple[ForceTerm, ...] | None = None, neighbor_manager: NeighborListManager | None = None, config: SimulationConfig | None = None, thermostat: LangevinThermostat | None = None, constraints: DistanceConstraints | None = None) -> SteeredNVTResultRun Langevin NVT while steering a ligand COM projection.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positions | |||
velocities | |||
masses | None | ||
ligand_indices | |||
direction | |||
target_start | float | ||
target_velocity | float | ||
k | float | ||
cell | Cell | None | None | |
force_terms | ForceTerm | list[ForceTerm] | tuple[ForceTerm, ...] | None | None | |
neighbor_manager | NeighborListManager | None | None | |
config | SimulationConfig | None | None | |
thermostat | LangevinThermostat | None | None | |
constraints | DistanceConstraints | None | None |
Returns
SteeredNVTResult