rgpycrumbs.eon.plt_kmc¶
Visualize an eOn aKMC trajectory: N2 ejection vs simulation time.
Added in version 1.8.0.
Reads an eOn aKMC output directory (dynamics.txt + per-state
states/<id>/reactant.con) and plots, against cumulative KMC simulation
time:
the cumulative number of N2 molecules ejected from the Si core, and
the system energy and visited-state index.
An N2 is detected as a bonded N-N pair whose midpoint lies further than a threshold (default 4 Angstrom) from the Si-core center of mass. The reader is robust to partial aKMC directories (missing states are skipped).
Attributes¶
Classes¶
One accepted aKMC transition from |
|
Cumulative N2 ejection and energy vs time across visited states. |
Functions¶
|
Parse an eOn aKMC |
|
Ordered list of visited state ids: initial reactant then each product. |
|
Count N2 molecules ejected from the Si core in an ASE |
|
Build the N2-ejection timeline for an eOn aKMC directory. |
|
Render the two-panel N2-ejection + energy figure to |
|
Plot N2 ejection vs KMC time for an eOn aKMC directory. |
Module Contents¶
- class rgpycrumbs.eon.plt_kmc.DynamicsStep[source]¶
One accepted aKMC transition from
dynamics.txt.Added in version 1.8.0.
- rgpycrumbs.eon.plt_kmc._DEFAULT_ORDER = ['step', 'reactant_id', 'process_id', 'product_id', 'step_time', 'total_time', 'barrier',...[source]¶
- rgpycrumbs.eon.plt_kmc.parse_dynamics(dynamics_file) list[DynamicsStep][source]¶
Parse an eOn aKMC
dynamics.txtinto orderedDynamicsStep.Uses the header row to map columns when present; otherwise assumes the canonical eOn column order. Separator and comment lines are skipped.
Added in version 1.8.0.
- rgpycrumbs.eon.plt_kmc.visited_state_sequence(steps: list[DynamicsStep]) list[int][source]¶
Ordered list of visited state ids: initial reactant then each product.
Added in version 1.8.0.
- rgpycrumbs.eon.plt_kmc.count_ejected_n2(atoms, core_threshold: float = 4.0, nn_cutoff: float = 1.6) int[source]¶
Count N2 molecules ejected from the Si core in an ASE
Atoms.An N2 is a bonded N-N pair (separation <
nn_cutoff) whose midpoint lies further thancore_thresholdfrom the Si-atom center of mass. N atoms are greedily paired nearest-first. Falls back to the all-atom COM as the core reference when no Si atoms are present.Added in version 1.8.0.
- class rgpycrumbs.eon.plt_kmc.KmcTimeline[source]¶
Cumulative N2 ejection and energy vs time across visited states.
Added in version 1.8.0.
- rgpycrumbs.eon.plt_kmc.collect_kmc_n2_timeline(akmc_dir, core_threshold: float = 4.0, nn_cutoff: float = 1.6) KmcTimeline[source]¶
Build the N2-ejection timeline for an eOn aKMC directory.
Robust to partial directories: states missing
reactant.conreuse the previous count. Requiresreadconandase.Added in version 1.8.0.
- rgpycrumbs.eon.plt_kmc.plot_kmc_timeline(timeline: KmcTimeline, out_path, log_time: bool = True)[source]¶
Render the two-panel N2-ejection + energy figure to
out_path.Added in version 1.8.0.
- rgpycrumbs.eon.plt_kmc.main(akmc_dir: pathlib.Path, out_path: pathlib.Path | None, core_threshold: float, nn_cutoff: float, log_time: bool)[source]¶
Plot N2 ejection vs KMC time for an eOn aKMC directory.