kups.application.md.data
¶
Data structures and ASE initialisation for molecular dynamics simulations.
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 |
|---|---|---|
unitcell |
UnitCell
|
Unit cell geometry for each system. |
temperature |
Array
|
Target temperature (K), shape |
time_step |
Array
|
Integration timestep (internal time units), shape |
friction_coefficient |
Array
|
Langevin friction (1/time), shape |
thermostat_time_constant |
Array
|
CSVR coupling time (time), shape |
target_pressure |
Array
|
Target pressure (energy/length^3), shape |
pressure_coupling_time |
Array
|
Barostat coupling time (time), shape |
compressibility |
Array
|
Isothermal compressibility (length^3/energy), shape |
minimum_scale_factor |
Array
|
Minimum barostat scale factor, shape |
unitcell_gradients |
UnitCell
|
Energy gradient w.r.t. the unit cell, stored as a
:class: |
potential_energy |
Array
|
Total potential energy per system (eV), shape |
Source code in src/kups/application/md/data.py
stress_tensor
property
¶
Virial stress tensor, shape (n_systems, 3, 3).
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
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. |