kups.application.md.data
¶
Data structures and ASE initialisation for molecular dynamics simulations.
BAOABLangevinParams
¶
Control parameters for the BAOAB Langevin (NVT) integrator.
Attributes:
| Name | Type | Description |
|---|---|---|
time_step |
Array
|
Integration timestep |
temperature |
Array
|
Target temperature |
friction_coefficient |
Array
|
Langevin friction |
Source code in src/kups/application/md/data.py
BAOABNPTLangevinParams
¶
Control parameters for the BAOAB NPT Langevin integrator.
Implements the fully-flexible-cell extended-variable NPT Langevin
formulation of Gao, Fang & Wang, Sampling the isothermal-isobaric
ensemble by Langevin dynamics, JCP 2016 (arxiv 1601.01044). The atom
side reuses the existing Langevin friction γ; the cell side adds a
fictitious mass tensor and a separate Langevin friction.
Attributes:
| Name | Type | Description |
|---|---|---|
time_step |
Array
|
Integration timestep |
temperature |
Array
|
Target temperature |
friction_coefficient |
Array
|
Atom Langevin friction |
target_pressure |
Array
|
Target pressure |
pressure_coupling_time |
Array
|
Barostat coupling time |
compressibility |
Array
|
Isothermal compressibility |
barostat_mass |
Array
|
Fictitious cell mass tensor \(M_{\alpha\beta}\)
(mass·length²), lower-triangular, shape |
barostat_friction |
Array
|
Langevin friction on cell DOFs \(\gamma_{\alpha\beta}\)
(1/time), lower-triangular, shape |
Source code in src/kups/application/md/data.py
CSVRNPTParams
¶
Control parameters for the CSVR-NPT integrator.
Attributes:
| Name | Type | Description |
|---|---|---|
time_step |
Array
|
Integration timestep |
temperature |
Array
|
Target temperature |
thermostat_time_constant |
Array
|
CSVR coupling time |
target_pressure |
Array
|
Target pressure |
pressure_coupling_time |
Array
|
Barostat coupling time |
compressibility |
Array
|
Isothermal compressibility |
minimum_scale_factor |
Array
|
Minimum barostat scale factor, shape |
Source code in src/kups/application/md/data.py
CSVRParams
¶
Control parameters for the CSVR (NVT) integrator.
Attributes:
| Name | Type | Description |
|---|---|---|
time_step |
Array
|
Integration timestep |
temperature |
Array
|
Target temperature |
thermostat_time_constant |
Array
|
CSVR coupling time |
Source code in src/kups/application/md/data.py
MDParticles
¶
Bases: Particles
Particle state for molecular dynamics simulations.
Extends :class:Particles with gradient, momenta, and derived
kinematic quantities needed by MD integrators.
Attributes:
| Name | Type | Description |
|---|---|---|
position_gradients |
Array
|
Energy gradient w.r.t. positions, shape |
momenta |
Array
|
Particle momenta, shape |
exclusion |
Index[ExclusionId]
|
Per-particle exclusion index (defaults to one group per
atom via :func: |
Source code in src/kups/application/md/data.py
MDSystems
¶
Per-system state for molecular dynamics simulations.
Attributes:
| Name | Type | Description |
|---|---|---|
cell |
Cell[Any]
|
Cell geometry for each system. |
integrator_params |
IntegratorParams
|
Bundled integrator control parameters; concrete shape
(e.g. :class: |
cell_gradients |
Cell[Any]
|
Energy gradient w.r.t. the cell, stored as a
:class: |
cell_momentum |
Array
|
Extended-variable cell-momentum tensor \(p^h\),
lower-triangular |
potential_energy |
Array
|
Total potential energy per system (eV), shape |
Source code in src/kups/application/md/data.py
MdParameters
¶
Bases: BaseModel
Physical and numerical parameters for an MD simulation.
Source code in src/kups/application/md/data.py
compressibility
instance-attribute
¶
Isothermal compressibility (1/Pa).
friction_coefficient
instance-attribute
¶
Langevin friction coefficient (1/fs).
initialize_momenta = False
class-attribute
instance-attribute
¶
If True, initialize momenta from Maxwell-Boltzmann distribution.
integrator
instance-attribute
¶
Integration algorithm to use.
minimum_scale_factor
instance-attribute
¶
Minimum allowed box scaling factor per barostat step (dimensionless).
pressure_coupling_time
instance-attribute
¶
Barostat coupling time (fs).
target_pressure
instance-attribute
¶
Target pressure for NPT barostat (Pa).
temperature
instance-attribute
¶
Target temperature (K).
thermostat_time_constant
instance-attribute
¶
CSVR thermostat coupling time (fs).
time_step
instance-attribute
¶
Integration timestep (fs).
MdRunConfig
¶
Bases: BaseModel
Run configuration for an MD simulation.
Source code in src/kups/application/md/data.py
block_size = 1
class-attribute
instance-attribute
¶
Production steps fused per on-device dispatch (1 = per-step). Only the last frame of each block is saved, so the trajectory has num_steps // block_size frames.
num_steps
instance-attribute
¶
Number of production steps.
num_warmup_steps
instance-attribute
¶
Number of warmup steps before production.
out_file
instance-attribute
¶
Path to the output HDF5 file.
seed
instance-attribute
¶
Random seed for reproducibility. None for time-based.
MdState
¶
Force-field-agnostic molecular-dynamics state.
The potential is built with its parameters at construction time (via the
adapters' parameters=), so no force-field field lives on the state.
Source code in src/kups/application/md/data.py
VerletParams
¶
Control parameters for the NVE Velocity Verlet integrator.
Attributes:
| Name | Type | Description |
|---|---|---|
time_step |
Array
|
Integration timestep |
Source code in src/kups/application/md/data.py
md_state_from_ase(atoms, config, *, key=None)
¶
Build MD particles and system data from an ASE Atoms object or file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
atoms
|
Atoms | str | Path
|
ASE Atoms object, or a file path (str/Path) readable by
|
required |
config
|
MdParameters
|
MD configuration with temperature, timestep, and thermostat/barostat parameters. |
required |
key
|
Array | None
|
JAX PRNG key for Maxwell-Boltzmann momenta initialisation. If None, momenta are set to zero. |
None
|
Returns:
| Type | Description |
|---|---|
tuple[Table[ParticleId, MDParticles], Table[SystemId, MDSystems]]
|
Tuple of (particles, systems) ready for use with MD integrators. |