kups.application.mcmc.analysis
¶
Post-simulation analysis for MCMC simulations.
IsMCMCFixedData
¶
IsMCMCStepData
¶
Bases: Protocol
Contract for data from the per_step reader group.
Source code in src/kups/application/mcmc/analysis.py
IsMCMCSystemStepData
¶
Bases: Protocol
Contract for per-system step data.
Source code in src/kups/application/mcmc/analysis.py
MCMCAnalysisResult
dataclass
¶
Results from MCMC simulation analysis for a single system.
Attributes:
| Name | Type | Description |
|---|---|---|
energy |
BlockAverageResult
|
Average total potential energy with SEM (eV). |
loading |
BlockAverageResult
|
Average particle count per species with SEM (dimensionless). |
heat_of_adsorption |
BlockAverageResult
|
Per-species heat of adsorption with SEM (eV). |
total_heat_of_adsorption |
BlockAverageResult
|
Composition-weighted total heat of adsorption (eV). |
Source code in src/kups/application/mcmc/analysis.py
analyze_mcmc(fixed, per_step, n_blocks=None)
¶
Analyze MCMC simulation results from pre-loaded data.
Computes energy, loading (average particle counts), and heat of adsorption per species using block averaging for error estimation. Analysis is performed independently for each system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fixed
|
IsMCMCFixedData
|
Fixed (one-shot) logged data containing system metadata. |
required |
per_step
|
IsMCMCStepData
|
Per-step logged data containing energies and particle counts. |
required |
n_blocks
|
int | None
|
Number of blocks for error estimation. |
None
|
Returns:
| Type | Description |
|---|---|
dict[SystemId, MCMCAnalysisResult]
|
Per-system analysis results keyed by |
Source code in src/kups/application/mcmc/analysis.py
analyze_mcmc_file(hdf5_path, n_blocks=None)
¶
Analyze MCMC simulation results from an HDF5 file.
Convenience wrapper that reads the HDF5 file and delegates to
:func:analyze_mcmc.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hdf5_path
|
str | Path
|
Path to HDF5 output file from
:func: |
required |
n_blocks
|
int | None
|
Number of blocks for error estimation. |
None
|
Returns:
| Type | Description |
|---|---|
dict[SystemId, MCMCAnalysisResult]
|
Per-system analysis results keyed by |