kups.application.md.analysis
¶
Post-simulation analysis for molecular dynamics.
IsMDInitData
¶
IsMDStepData
¶
Bases: HasPotentialEnergy, HasStressTensor, Protocol
Contract for the step reader group.
Source code in src/kups/application/md/analysis.py
MDAnalysisResult
dataclass
¶
Results from MD simulation analysis for a single system.
Attributes:
| Name | Type | Description |
|---|---|---|
potential_energy |
BlockAverageResult
|
Average potential energy with SEM (eV). |
kinetic_energy |
BlockAverageResult
|
Average kinetic energy with SEM (eV). |
total_energy |
BlockAverageResult
|
Average total energy with SEM (eV). |
temperature |
BlockAverageResult
|
Average temperature with SEM (K). |
energy_drift |
float
|
Linear drift rate of total energy (eV/step). |
energy_drift_per_atom |
float
|
Energy drift normalized by number of atoms. |
pressure |
BlockAverageResult
|
Average pressure with SEM (Pa). |
n_atoms |
int
|
Number of atoms in this system. |
n_steps |
int
|
Number of simulation steps analyzed. |
Source code in src/kups/application/md/analysis.py
analyze_md(init_data, step_data, n_blocks=None)
¶
Analyze MD simulation from pre-loaded data.
Computes thermodynamic averages and energy conservation metrics independently for each system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
init_data
|
IsMDInitData
|
Initial simulation state with atom positions and system index. |
required |
step_data
|
IsMDStepData
|
Per-step thermodynamic data with shape |
required |
n_blocks
|
int | None
|
Number of blocks for error estimation. If None, uses optimal_block_average to auto-select. |
None
|
Returns:
| Type | Description |
|---|---|
dict[SystemId, MDAnalysisResult]
|
Per-system analysis results keyed by |
Source code in src/kups/application/md/analysis.py
analyze_md_file(hdf5_path, n_blocks=None)
¶
Analyze MD simulation results from HDF5 file.
Convenience wrapper that reads HDF5 and delegates to analyze_md.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hdf5_path
|
str | Path
|
Path to HDF5 file from MD simulation. |
required |
n_blocks
|
int | None
|
Number of blocks for error estimation. If None, uses optimal_block_average to auto-select. |
None
|
Returns:
| Type | Description |
|---|---|
dict[SystemId, MDAnalysisResult]
|
Per-system analysis results keyed by |