Skip to content

Electrostatics Workflow

Command workflow for electrostatics analyses and local visualizations.

This module implements CLI workflow orchestration for its command family, including argument parsing, request construction, execution dispatch, and result presentation handoff.

Usage context

  • Command routing: Resolve CLI aliases and normalized command names.
  • Task execution: Build request objects and invoke registered tasks.
  • Output handling: Forward results to table, plot, export, or report flows.

Command: get-dipole

Compute get-dipole data for selected frames. This command supports total and local scope. Local scope requires core atom types and can optionally render per-frame spatial plots.

Examples


  1. Compute one-frame total values and export:
   reaxkit get-dipole --frames 10 --scope total --export get-dipole_frame10.csv

  2. Compute a frame series in total scope:
   reaxkit get-dipole --frames 0:20:2 --scope total --export get-dipole_series.csv

  3. Compute local values for selected core types:
   reaxkit get-dipole --frames 10 --scope local --core Al --export local_get-dipole_frame10.csv

  4. Render local 3D plots per frame:
   reaxkit get-dipole --frames 10 --scope local --core Al --plot plot3d --component z --save get-dipole_plots

  5. Use explicit formal charges instead of ReaxFF charges:
   reaxkit get-dipole --scope total --charge-source formal --formal-charge Al=3 N=-3

Arguments

Scientific choices

Flag Required Default Help Choices
--frames, --frame No Frames to analyze. Example: --frames 0:20:2, which selects every second frame from 0 to 20.
--scope No total Electrostatics scope. Example: --scope local, which computes per-core local contributions. total, local
--core No Comma-separated core atom types for local scope. Example: --core Al,Mg, which limits local analysis to those core types.
--volume-method No Choose convex-hull, occupied bounding-box, or simulation-cell volume. Polarization is normalized by this volume; dipole output reports it without changing the dipole. Defaults for polarization: hull in total scope and bbox in local scope. hull, bbox, cell
--charge-source No reaxff Choose per-atom ReaxFF charges or explicit species formal charges. Example: --charge-source formal --formal-charge Al=3 N=-3. reaxff, formal
--formal-charge No Assign species formal charges in elementary-charge units. May be repeated. Example: --formal-charge Al=3 N=-3.
--component No Component to color by for local plots. Example: --component mu_z, which colors by z-component values.
--plane No xy Projection plane for heatmaps. Example: --plane xz, which projects values onto XZ. xy, xz, yz
--bins No 40 Grid bins for heatmaps: "N" or "Nx,Ny". Example: --bins 80,60, which uses non-square bin resolution.
--agg No mean Heatmap aggregation: mean|max|min|sum|count. Example: --agg max, which stores the maximum value per bin.
--size No 20.0 3D marker size. Example: --size 12, which renders smaller scatter points.
--alpha No 0.9 3D marker transparency. Example: --alpha 0.6, which makes points more transparent.

Input and file selection

Flag Required Default Help Choices
--engine No Engine override. Example: --engine reaxff, which applies ReaxFF loader/parsing rules. reaxff, ams, lammps
--run-dir, --dir No . Run directory fallback for detection. Example: --run-dir runs/job1, which sets the base folder for file lookup.
--xmolout No xmolout Path to xmolout file. Example: --xmolout runs/job1/xmolout, which provides trajectory structure data.
--fort7 No fort.7 Path to fort.7 file. Example: --fort7 runs/job1/fort.7, which provides bond-order/charge source data.

Outputs and plots

Flag Required Default Help Choices
--export No Write the analysis table to CSV. Example: --export dipole.csv, which saves computed values for external analysis.
--plot No Render local dipole or polarization results as a plot. Example: --plot plot3d, which produces per-frame 3D colored scatter views. plot3d, heatmap2d
--plot-frames No Frames for local plots. Example: --plot-frames 0:20:2, which renders every second frame from 0 to 20.
--save No Directory used when saving local plots. Example: --save dipole_plots, which writes one image per frame there.
--vmin No Color scale minimum for local plots. Example: --vmin -0.5, which clamps lower color bound.
--vmax No Color scale maximum for local plots. Example: --vmax 0.5, which clamps upper color bound.
--cmap No Matplotlib colormap for local plots. Example: --cmap coolwarm, which sets the plot color palette.
--elev No 22.0 3D view elevation. Example: --elev 30, which raises camera angle.
--azim No 38.0 3D view azimuth. Example: --azim 120, which rotates camera around the scene.
--detail-format No Optional detail format (default: Parquet; legacy: CSV). parquet, csv

Execution

Flag Required Default Help Choices
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto).
--chunk-size No 0 Maximum in-flight frames: auto or N.

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

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.

Command: get-polarization

Compute polarization data for selected frames. This command supports total and local scope. Local scope requires core atom types and can optionally render per-frame spatial plots.

Examples


  1. Compute one-frame total values and export:
   reaxkit get-polarization --frames 10 --scope total --export polarization_frame10.csv

  2. Compute a frame series in total scope:
   reaxkit get-polarization --frames 0:20:2 --scope total --export polarization_series.csv

  3. Compute local values for selected core types:
   reaxkit get-polarization --frames 10 --scope local --core Al --export local_polarization_frame10.csv

  4. Render local 3D plots per frame:
   reaxkit get-polarization --frames 10 --scope local --core Al --plot plot3d --component z --save polarization_plots

  5. Use explicit formal charges instead of ReaxFF charges:
   reaxkit get-polarization --scope total --charge-source formal --formal-charge Al=3 N=-3

Arguments

Scientific choices

Flag Required Default Help Choices
--frames, --frame No Frames to analyze. Example: --frames 0:20:2, which selects every second frame from 0 to 20.
--scope No total Electrostatics scope. Example: --scope local, which computes per-core local contributions. total, local
--core No Comma-separated core atom types for local scope. Example: --core Al,Mg, which limits local analysis to those core types.
--volume-method No Choose convex-hull, occupied bounding-box, or simulation-cell volume. Polarization is normalized by this volume; dipole output reports it without changing the dipole. Defaults for polarization: hull in total scope and bbox in local scope. hull, bbox, cell
--charge-source No reaxff Choose per-atom ReaxFF charges or explicit species formal charges. Example: --charge-source formal --formal-charge Al=3 N=-3. reaxff, formal
--formal-charge No Assign species formal charges in elementary-charge units. May be repeated. Example: --formal-charge Al=3 N=-3.
--scale-by No 1.0 Multiply polarization output values by this factor before plotting/exporting. Example: --scale-by 10.
--component No Component to color by for local plots. Example: --component mu_z, which colors by z-component values.
--plane No xy Projection plane for heatmaps. Example: --plane xz, which projects values onto XZ. xy, xz, yz
--bins No 40 Grid bins for heatmaps: "N" or "Nx,Ny". Example: --bins 80,60, which uses non-square bin resolution.
--agg No mean Heatmap aggregation: mean|max|min|sum|count. Example: --agg max, which stores the maximum value per bin.
--size No 20.0 3D marker size. Example: --size 12, which renders smaller scatter points.
--alpha No 0.9 3D marker transparency. Example: --alpha 0.6, which makes points more transparent.

Input and file selection

Flag Required Default Help Choices
--engine No Engine override. Example: --engine reaxff, which applies ReaxFF loader/parsing rules. reaxff, ams, lammps
--run-dir, --dir No . Run directory fallback for detection. Example: --run-dir runs/job1, which sets the base folder for file lookup.
--xmolout No xmolout Path to xmolout file. Example: --xmolout runs/job1/xmolout, which provides trajectory structure data.
--fort7 No fort.7 Path to fort.7 file. Example: --fort7 runs/job1/fort.7, which provides bond-order/charge source data.

Outputs and plots

Flag Required Default Help Choices
--export No Write the analysis table to CSV. Example: --export dipole.csv, which saves computed values for external analysis.
--plot No Render local dipole or polarization results as a plot. Example: --plot plot3d, which produces per-frame 3D colored scatter views. plot3d, heatmap2d
--plot-frames No Frames for local plots. Example: --plot-frames 0:20:2, which renders every second frame from 0 to 20.
--save No Directory used when saving local plots. Example: --save dipole_plots, which writes one image per frame there.
--vmin No Color scale minimum for local plots. Example: --vmin -0.5, which clamps lower color bound.
--vmax No Color scale maximum for local plots. Example: --vmax 0.5, which clamps upper color bound.
--cmap No Matplotlib colormap for local plots. Example: --cmap coolwarm, which sets the plot color palette.
--elev No 22.0 3D view elevation. Example: --elev 30, which raises camera angle.
--azim No 38.0 3D view azimuth. Example: --azim 120, which rotates camera around the scene.
--detail-format No Optional detail format (default: Parquet; legacy: CSV). parquet, csv

Execution

Flag Required Default Help Choices
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto).
--chunk-size No 0 Maximum in-flight frames: auto or N.

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

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.

Command: charge-table

Extract per-atom charges across selected frames. You can filter by atom ids or element types, subsample frames, export tables, and plot charge series on iteration/frame/time axes.

Examples


  1. Export charge table for a frame slice:
   reaxkit charge_table --frames 0:10:2 --export charges.csv

  2. Plot selected atom ids over selected frames:
   reaxkit charge_table --atom-ids 1 2 3 --frames 0,5,10 --plot single

  3. Filter by atom types and save time-axis plot:
   reaxkit charge_table --atom-types O H --every 5 --xaxis time --save charge_series.png

Arguments

Scientific choices

Flag Required Default Help Choices
--atom-ids No 1-based atom ids to include. Example: --atom-ids 1 2 3, which keeps only those atoms.
--atom-types No Element symbols to include. Example: --atom-types O H, which keeps only oxygen and hydrogen rows.
--frames No Frame selector syntax. Example: --frames 0,5,10, which evaluates only those three frames.
--every No 1 Use every Nth selected frame. Example: --every 5, which subsamples selected frames by 5.

Input and file selection

Flag Required Default Help Choices
--engine No Engine override. Example: --engine reaxff, which applies ReaxFF loader/parsing rules. reaxff, ams, lammps
--run-dir, --dir No . Run directory fallback for detection. Example: --run-dir runs/job1, which sets the base folder for file lookup.
--xmolout No xmolout Path to xmolout file. Example: --xmolout runs/job1/xmolout, which provides trajectory structure data.
--fort7 No fort.7 Path to fort.7 file. Example: --fort7 runs/job1/fort.7, which provides bond-order/charge source data.
--control No control Control file for time-axis conversion. Example: --control control, which provides timestep metadata for time conversion.

Outputs and plots

Flag Required Default Help Choices
--plot No Render a plot. Example: --plot single, which makes one combined chart. single, subplot
--show No False Show the generated plot window. Example: --show, which opens the chart interactively.
--save No Save the generated plot to a file path. Example: --save charge_series.png, which writes the figure image.
--export No Write the table to CSV. Example: --export charges.csv, which saves tabular output.
--grid No Subplot grid like 2x2 or 2*2. Example: --grid 2x2, which arranges subplot panels in two rows and two columns.
--xaxis No iter Quantity on x-axis. Example: --xaxis time, which uses converted time instead of iteration index. iter, frame, time
--detail-format No Optional detail format (default: Parquet; legacy: CSV). parquet, csv

Execution

Flag Required Default Help Choices
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto).
--chunk-size No 0 Maximum in-flight frames: auto or N.

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

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.

Command: charge_table

Extract per-atom charges across selected frames. You can filter by atom ids or element types, subsample frames, export tables, and plot charge series on iteration/frame/time axes.

Examples


  1. Export charge table for a frame slice:
   reaxkit charge_table --frames 0:10:2 --export charges.csv

  2. Plot selected atom ids over selected frames:
   reaxkit charge_table --atom-ids 1 2 3 --frames 0,5,10 --plot single

  3. Filter by atom types and save time-axis plot:
   reaxkit charge_table --atom-types O H --every 5 --xaxis time --save charge_series.png

Arguments

Scientific choices

Flag Required Default Help Choices
--atom-ids No 1-based atom ids to include. Example: --atom-ids 1 2 3, which keeps only those atoms.
--atom-types No Element symbols to include. Example: --atom-types O H, which keeps only oxygen and hydrogen rows.
--frames No Frame selector syntax. Example: --frames 0,5,10, which evaluates only those three frames.
--every No 1 Use every Nth selected frame. Example: --every 5, which subsamples selected frames by 5.

Input and file selection

Flag Required Default Help Choices
--engine No Engine override. Example: --engine reaxff, which applies ReaxFF loader/parsing rules. reaxff, ams, lammps
--run-dir, --dir No . Run directory fallback for detection. Example: --run-dir runs/job1, which sets the base folder for file lookup.
--xmolout No xmolout Path to xmolout file. Example: --xmolout runs/job1/xmolout, which provides trajectory structure data.
--fort7 No fort.7 Path to fort.7 file. Example: --fort7 runs/job1/fort.7, which provides bond-order/charge source data.
--control No control Control file for time-axis conversion. Example: --control control, which provides timestep metadata for time conversion.

Outputs and plots

Flag Required Default Help Choices
--plot No Render a plot. Example: --plot single, which makes one combined chart. single, subplot
--show No False Show the generated plot window. Example: --show, which opens the chart interactively.
--save No Save the generated plot to a file path. Example: --save charge_series.png, which writes the figure image.
--export No Write the table to CSV. Example: --export charges.csv, which saves tabular output.
--grid No Subplot grid like 2x2 or 2*2. Example: --grid 2x2, which arranges subplot panels in two rows and two columns.
--xaxis No iter Quantity on x-axis. Example: --xaxis time, which uses converted time instead of iteration index. iter, frame, time
--detail-format No Optional detail format (default: Parquet; legacy: CSV). parquet, csv

Execution

Flag Required Default Help Choices
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto).
--chunk-size No 0 Maximum in-flight frames: auto or N.

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

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.

Command: get_polarization_field

Analyze polarization-field hysteresis behavior from trajectory-level data. This command aggregates hysteresis points, plots response curves, exports tables, and can report coercive/remnant roots.

Examples


  1. Plot and save aggregated hysteresis curve:
   reaxkit get_polarization_field --plot --save hysteresis.png

  2. Customize axes and aggregation, then export:
   reaxkit get_polarization_field --xaxis field_z --yaxis pol_z --aggregate last --export hysteresis.csv

  3. Print roots and write a summary text report:
   reaxkit get_polarization_field --roots --summary hysteresis_summary.txt

  4. Exclude vacuum using the occupied coordinate extents:
   reaxkit get_polarization_field --volume-method bbox --export hysteresis.csv

Arguments

Scientific choices

Flag Required Default Help Choices
--aggregate No mean Aggregation within each contiguous constant-field section. Example: --aggregate mean averages each plateau without merging later visits to the same field. mean, max, min, last
--volume-method No hull Volume used to normalize polarization. 'bbox' excludes vacuum outside the occupied coordinate extents; default: hull. hull, bbox, cell
--scale-by No 1.0 Multiply polarization output values by this factor before plotting/exporting. Example: --scale-by 10.

Input and file selection

Flag Required Default Help Choices
--engine No Engine override. Example: --engine reaxff, which applies ReaxFF loader/parsing rules. reaxff, ams, lammps
--run-dir, --dir No . Run directory fallback for detection. Example: --run-dir runs/job1, which sets the base folder for file lookup.
--xmolout No xmolout Path to xmolout file. Example: --xmolout runs/job1/xmolout, which provides trajectory structure data.
--fort7 No fort.7 Path to fort.7 file. Example: --fort7 runs/job1/fort.7, which provides bond-order/charge source data.
--fort78 No fort.78 Path to fort.78 file. Example: --fort78 runs/job1/fort.78, which reads field-response source data from that file.
--control No control Path to control file. Example: --control runs/job1/control, which provides simulation timing/control metadata.
--summary No hysteresis_summary.txt Write coercive fields and remnant polarizations to a text file. Example: --summary hysteresis_summary.txt, which stores root summary values in text form.
--roots No False Also print coercive and remnant values to stdout. Example: --roots, which prints root metrics directly in CLI output.

Outputs and plots

Flag Required Default Help Choices
--plot No False Render the hysteresis plot. Example: --plot, which generates the hysteresis curve figure.
--save No hysteresis_aggregated.png Save plot to a file path. Example: --save hysteresis.png, which writes the plotted curve to that image file.
--export No hysteresis_aggregated.csv Write aggregated data to CSV. Example: --export hysteresis.csv, which saves aggregated hysteresis table.
--yaxis No pol_z Quantity for y-axis. Example: --yaxis pol_z, which plots z-polarization response on y-axis.
--xaxis No field_z Quantity for x-axis. Example: --xaxis field_z, which uses z-field strength on x-axis.
--detail-format No Optional detail format (default: Parquet; legacy: CSV). parquet, csv

Execution

Flag Required Default Help Choices
--execution No auto Execution backend; unsupported backends fall back to serial with a logged reason. auto, serial, threads, processes
--workers No 0 Frame workers: auto or N (default: auto).
--chunk-size No 0 Maximum in-flight frames: auto or N.

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

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.

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.