Get Potential Energy Workflow
Dedicated workflow for potential-energy time series.
Command: get_potential_energy
Get potential energy as a time series.
Compare total or per-atom potential energy in existing simulation output.
Per-atom normalization uses --num-atoms N or frame atom counts from xmolout.
Use --relative to also output E(frame) - E(reference_frame).
The reference defaults to source frame 0, before sampling; change it with --reference-frame.
With --per-atom, normalize each frame before subtracting the reference.
CSV exports retain total energy; --relative with --num-atoms or --per-atom includes total, relative total, per-atom, and relative per-atom columns.
Examples
1. Total energy:
reaxkit get-potential-energy --summary runs/heating/summary.txt --plot single
2. Energy per atom:
reaxkit get-potential-energy --summary runs/heating/summary.txt --xmolout runs/heating/xmolout --per-atom --plot single --save energy_per_atom.png
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--frames |
No |
|
Zero-based source frames to include; colon ranges exclude the stop. Example: --frames 0:20:2, which selects frames 0, 2, ..., 18. |
|
--every |
No |
1 |
Stride through selected frames. Example: --every 5, which keeps every fifth selected frame. |
|
--frame-source |
No |
|
Trajectory file whose headers define frame iterations when no control file exists. By default, the configured or sibling xmolout is used. Example: --frame-source runs/heating/xmolout, which maps iterations to that trajectory's frame positions. |
|
--frame-count |
No |
|
Total trajectory frame count used to infer frame spacing only when neither a control file nor a trajectory frame source exists. Example: --frame-count 101, which estimates frame spacing for a trajectory containing 101 frames. |
|
--per-atom |
No |
False |
Divide potential energy by each frame's atom count from xmolout. Example: --per-atom, which reports energy per atom instead of total energy. |
|
--num-atoms |
No |
|
Positive atom count used to normalize every frame; implies --per-atom and overrides xmolout atom counts. Example: --num-atoms 100 --relative. |
|
--relative |
No |
False |
Also output E(frame) - E(reference_frame), after any per-atom normalization. Example: --relative. |
|
--reference-frame |
No |
0 |
Zero-based source frame for --relative, before --frames/--every sampling (default: 0). Example: --relative --reference-frame 10. |
|
| Flag |
Required |
Default |
Help |
Choices |
--engine |
No |
|
Simulation engine used to load input data. Example: --engine reaxff, which selects ReaxFF readers instead of automatic detection. |
reaxff, ams, lammps |
--input |
No |
. |
Input file or directory used for engine detection. Example: --input runs/heating, which detects the engine from that run. |
|
--run-dir |
No |
. |
Fallback directory for input discovery. Example: --run-dir runs/heating, which searches that simulation directory. |
|
--xmolout |
No |
xmolout |
Input file containing trajectory coordinates and frame metadata. Example: --xmolout runs/heating/xmolout, which reads trajectory coordinates and frame metadata from that file. |
|
--summary |
No |
|
Input file containing simulation scalar values. Example: --summary runs/heating/summary.txt, which reads simulation scalar values from that file. |
|
--control |
No |
control |
Control file used for frame (iout2) and time conversion. The default also searches beside the selected input files. Example: --control runs/heating/control, which supplies output cadence and timestep metadata. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--plot |
No |
|
Plot all series together (single), in one multi-panel figure (subplot), or as one figure file per series (separate). Example: --plot subplot, which gives each series its own panel for comparison. |
single, subplot, separate |
--show |
No |
False |
Open generated figures interactively. Example: --show, which displays plot windows in addition to any saved figures. |
|
--save |
No |
|
Destination for generated figures; separate plots use a directory. Example: --save temperature.png, which writes the plotted temperature to that image. |
|
--export |
No |
|
Destination for the result CSV table. Example: --export temperature.csv, which writes the extracted values for further analysis. |
|
--grid |
No |
|
Rows and columns for subplot layout. Example: --grid 2x2, which arranges series in two rows and two columns. |
|
--xaxis |
No |
iter |
Horizontal axis expressed as iterations, trajectory frames, or physical time. Example: --xaxis time, which converts iterations using control-file timestep metadata. |
iter, frame, time |
--plot-style |
No |
default |
Plot appearance: default preserves existing styling; publication uses clear fonts and an accessible palette; publication-bold uses larger bold text and heavier lines. Example: --plot-style publication-bold, which improves readability when figures are reduced in a manuscript. |
default, publication, publication-bold |
--color-style |
No |
default |
Color treatment: default preserves existing colors; light-fill uses lighter bar and marker interiors with the original outlines and lines. Example: --color-style light-fill, which adds contrast between fills and borders. |
default, light-fill |
--detail-format |
No |
|
Optional detail format (default: Parquet; legacy: CSV). Example: --detail-format csv, which writes requested detail tables as CSV. |
parquet, csv |
Execution
| Flag |
Required |
Default |
Help |
Choices |
--execution |
No |
auto |
Execution backend; unsupported backends fall back to serial with a logged reason. Example: --execution serial, which processes work sequentially. |
auto, serial, threads, processes |
--workers |
No |
0 |
Frame workers: auto or N (default: auto). Example: --workers 4, which requests four frame workers. |
|
--chunk-size |
No |
0 |
Maximum in-flight frames: auto or N. Example: --chunk-size 8, which limits concurrent frame processing to eight frames. |
|
Storage and cache
| Flag |
Required |
Default |
Help |
Choices |
--run-id |
No |
|
Run identifier for run-scoped layout. Example: --run-id run_91ac0e, which reuses that run identifier. |
|
--project-root |
No |
reaxkit_workspace |
Project root that contains inputs/, data/, analysis/, etc. Example: --project-root ./workspace, which stores run artifacts there. |
|
--analysis-id |
No |
|
Optional analysis artifact id; defaults to run id. Example: --analysis-id comparison-a, which names the analysis artifact explicitly. |
|
--input-cache, --no-input-cache |
No |
True |
Reuse parsed input frames across commands (default: enabled; use --no-input-cache to force source reads for reproducibility checks or benchmarks). Example: --no-input-cache, which reloads frames from their source files. |
|
--frame-cache-max-gb |
No |
10.0 |
Maximum workspace frame-cache size in GiB (default: 10; use 0 for unlimited). Example: --frame-cache-max-gb 20, which caps cached frames at 20 GiB. |
|
--output-profile |
No |
standard |
Select the shared artifact policy. Standard writes declared default outputs; minimal keeps core tables; full and legacy include optional details. Default: standard. Example: --output-profile full, which includes declared optional detail tables. |
minimal, standard, full, legacy |
--profile |
No |
False |
Record deterministic function calls and timings for all Python threads (requires --diagnostics and reaxkit[profiling]). |
|
--profile-clock |
No |
wall |
Profiler timer: elapsed wall time (default) or thread CPU time. Requires --profile to record. |
wall, cpu |
--diagnostics, --no-diagnostics |
No |
False |
Enable a per-command report, console log, resource samples, and periodic Python stacks under logs/diagnostics (disabled by default). |
|
--diagnostic-interval-seconds |
No |
60.0 |
Python stack sampling interval (default: 60 seconds). Example: --diagnostic-interval-seconds 30. |
|
--checkpoint, --no-checkpoint |
No |
|
Enable durable result batches for audited commands. Example: --no-checkpoint, disables recovery storage. |
|
--resume |
No |
|
Resume a compatible result checkpoint; repeat the original scientific options. Example: --resume ./checkpoint, skips committed calculations. |
|
--checkpoint-buffer-mb |
No |
32 |
Result buffer in MiB, plus one oversized frame. Example: --checkpoint-buffer-mb 32, bounds pending result payloads to approximately 32 MiB. |
|
--checkpoint-interval-seconds |
No |
30 |
Flush at the next completed frame after this interval. Example: --checkpoint-interval-seconds 30, commits roughly every 30 seconds. |
|
Diagnostics and compatibility
| Flag |
Required |
Default |
Help |
Choices |
-h, --help |
No |
|
show this help message and exit |
|
--help-all, --all-flags |
No |
|
Show every option, grouped by purpose. Example: --help-all, which includes advanced flags in the help output. |
|
--log |
No |
|
Runtime logging verbosity. Example: --log verbose, which prints detailed execution messages. |
verbose, quiet |
Common Runtime and Presentation Arguments
These are shared workflow-level CLI flags added before command-specific options, covering runtime context (engine/input/storage) and output presentation/export behavior.
Each command table above includes its shared and inherited options.