Trainset Workflow
Direct command workflows for trainset export and generation utilities.
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_trainset_data
Read trainset entries from one section or all sections and return them as a table.
There are multiple sections in a training set file such as ENERGY, CHARGE, etc., and they are separated by lines starting with keyword END.
Examples
1. Getting all training sets in all sections:
reaxkit get_trainset_data --section all --export trainset_data
2. Getting training sets in a specific section, for example geometry:
reaxkit get_trainset_data --section geometry --export geometry_trainset_data
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--section |
No |
all |
Section to keep: all, charge, heatfo, geometry, cell_parameters, energy. Example: --section energy, which keeps only energy training entries. |
|
| Flag |
Required |
Default |
Help |
Choices |
--run-dir, --dir |
No |
. |
Run directory fallback for engine detection. Example: --run-dir runs/heating, which uses that directory for fallback discovery. |
|
--trainset |
No |
trainset.in |
Path to trainset file. Example: --trainset runs/heating/trainset.in, which reads training targets from that file. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--plot |
No |
|
Render a plot. Example: --plot single, which combines selected series in one figure. |
single, subplot |
--show |
No |
False |
Show the generated plot window. Example: --show, which opens generated figures interactively. |
|
--save |
No |
|
Save the generated plot to a file path. Example: --save analysis.png, which writes the generated figure to that image. |
|
--export |
No |
|
Write one CSV per selected trainset section to DIRECTORY. If DIRECTORY is omitted, use 'trainset_data'. Example: --export training_tables, which writes section CSV files under training_tables. |
|
--grid |
No |
|
Subplot grid like 2x2 or 2*2. Example: --grid 2x2, which arranges subplot panels in two rows and two columns. |
|
--xaxis |
No |
|
Optional x-axis column override. Example: --xaxis iteration, which uses the iteration column as the horizontal coordinate. |
|
--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 |
|
Logging level. Example: --log verbose, which prints detailed execution messages. |
verbose, quiet |
The figure below shows an example CSV output for trainset data. Group comments are the comments above each set of data, which shows what does data are related to.
In contrast, inline-comment is the comment line in front of each trainset line.

Figure: Sample CSV output for trainset data.
Read every grouped/comment occurrence from trainset sections, including repeated and empty comments.
In each section of training set files, different data are separated by line comments above them which shows what those data are exactly (for example separating the EOS data for a material from the reaction barriers in the ENERGY seciton.
Getting these group comments helps user get a summary of training set and understand what the ffield was trained against.
Examples
1. Getting all group comments in all sections:
reaxkit get_trainset_group_comments --section all --export trainset_group_comments.csv
2. Getting group comments in a specific section, for example geometry:
reaxkit get_trainset_group_comments --section geometry --export geometry_group_comments.csv
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--section |
No |
all |
Section to keep: all, charge, heatfo, geometry, cell_parameters, energy. Example: --section energy, which keeps only energy training entries. |
|
| Flag |
Required |
Default |
Help |
Choices |
--run-dir, --dir |
No |
. |
Run directory fallback for engine detection. Example: --run-dir runs/heating, which uses that directory for fallback discovery. |
|
--trainset |
No |
trainset.in |
Path to trainset file. Example: --trainset runs/heating/trainset.in, which reads training targets from that file. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--plot |
No |
|
Render a plot. Example: --plot single, which combines selected series in one figure. |
single, subplot |
--show |
No |
False |
Show the generated plot window. Example: --show, which opens generated figures interactively. |
|
--save |
No |
|
Save the generated plot to a file path. Example: --save analysis.png, which writes the generated figure to that image. |
|
--export |
No |
|
Write the result table to CSV. Example: --export analysis.csv, which writes the result table for further analysis. |
|
--grid |
No |
|
Subplot grid like 2x2 or 2*2. Example: --grid 2x2, which arranges subplot panels in two rows and two columns. |
|
--xaxis |
No |
|
Optional x-axis column override. Example: --xaxis iteration, which uses the iteration column as the horizontal coordinate. |
|
--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 |
|
Logging level. Example: --log verbose, which prints detailed execution messages. |
verbose, quiet |
Command: gen_template_yaml_for_elastic_settings
Write a sample trainset settings YAML for generating elastic-based training set (i.e., EOS).
This command only writes the template YAML file but does not generate any trainset data. Once you have the YAML file, you can edit it to specify what materials/systems you want to generate elastic training data for and then run 'gen_elastic_trainset' with '--input-mode yaml' to generate the trainset based on the YAML config.
Examples
1. Generate a template YAML with default name 'trainset_settings.yaml':
reaxkit gen_template_yaml_for_elastic_settings
2. Generate a template YAML with a custom name:
reaxkit gen_template_yaml_for_elastic_settings --output trainset_settings.yaml
Arguments
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--output |
No |
trainset_settings.yaml |
Output YAML path. Example: --output trainset_settings.yaml, which writes generated output to trainset_settings.yaml. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
Command: gen_template_yaml_for_heatfo_settings
Write a starter YAML for heat-of-formation training-data generation.
Edit the material and reference settings before running gen_heatfo_trainset.
This command writes only the configuration template; it does not generate training data.
Examples
1. Create the template:
reaxkit gen_template_yaml_for_heatfo_settings --output trainset_heatfo_settings.yaml
Arguments
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--output |
No |
trainset_heatfo_settings.yaml |
Output YAML path. Example: --output trainset_heatfo_settings.yaml, which writes generated output to trainset_heatfo_settings.yaml. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
Command: gen_elastic_trainset
Generate elastic trainsets (i.e., EOS data).
This comamnd supports 3 input-mode options:
1. yaml: which needs an existing trainset YAML.
This trainset YAML can be generated using command 'gen_template_yaml_for_elastic_settings'
2. material-id: fetch one source material id (i.e., material ID [mp-1234] from material's project website)
3. batch: fetch many source systems by elements (i.e., all materials with Ba, B, and O)
[NOTE] To use the source-backed modes (material-id or batch), you need to provide the your API key and specify the source (MP (material's project) or Jarvis, where default is MP). You API-key can be obtained from the source website. For example, for MP, you can:
1. login to your account on MP website
2. on the top right of the page, near your account logo, click on the API access page link,
3. this brings you to https://next-gen.materialsproject.org/api 4. you can now copy your personal API key, which you will provide it to this command using --api-key flag or set it as an environment variable MP_API_KEY.
Examples
1. YAML mode:
reaxkit gen_elastic_trainset --input-mode yaml --yaml trainset_settings.yaml --output trainset_elastic_generated
2. Material-id mode:
reaxkit gen_elastic_trainset --input-mode material-id --mat-id mp-1234 --output trainset_elastic_mp-1234 --api-key YOUR_KEY
3. Batch mode:
- for materials containing only and exactly Ba, B, O elements as in Ba2B2O5:
reaxkit gen_elastic_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY
- for materials any or all of Ba, B, O elements (now, BaO10 is also acceptable):
reaxkit gen_elastic_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to
- for materials containing any or all of Ba, B, O elements but with a cap of 100 materials to prevent large training set genration:
reaxkit gen_elastic_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to --max-materials 100
[NOTE] As the documentation on https://docs.materialsproject.org/methodology/materials-methodology/understanding-structures-and-properties-in-the-materials-project shows, retrieved structures from the new Materials Project (MP) API may have different lattice parameters and angles thanthat of conventional or primitive unit cells you might expect from textbooks or the legacy MP database (i.e., seen on the website). For this purpose, we have a flag --crystallographic-setting-conversion which can convert the fetched crystal structure setting before generating files. The CLI defaults to 'to-conventional'; use 'to-primitive' for a primitive cell. This selects the crystallographic setting. Heatfo GEO export separately transforms Cartesian coordinates to standalone ReaxFF's cell orientation while preserving the selected lattice parameters and periodic geometry.
[Note] Source-backed elastic generation uses the full Cartesian stiffness tensor and supports non-orthogonal cells. Older nine-constant YAML files retain their orthogonal energy targets and use corrected ReaxFF geometry export. Use --skip-not-orthogonal to restrict generation to cells with right angles.
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--elements |
No |
|
Comma-separated elements for batch mode, for example Ba,B,O. Example: --elements Al,N, which queries aluminum-nitrogen materials in batch mode. |
|
--element-count-scope |
No |
exact |
Number-of-elements filter used for batch material queries. Example: --element-count-scope exact, which requires the requested number of distinct elements. |
exact, up-to |
--max-materials |
No |
|
Optional cap for batch mode. Example: --max-materials 10, which limits batch generation to ten materials. |
|
--bulk-mode |
No |
voigt |
Bulk modulus mode for supported sources. Example: --bulk-mode vrh, which uses the Voigt-Reuss-Hill bulk modulus. |
voigt, reuss, vrh |
--crystallographic-setting-conversion |
No |
to-conventional |
Convert fetched crystal structure setting before generating files. Example: --crystallographic-setting-conversion to-conventional, which converts fetched structures to conventional cells. |
to-conventional, to-primitive |
--skip-not-orthogonal |
No |
False |
Skip lattices with non-orthogonal cell angles (alpha/beta/gamma not all 90). Example: --skip-not-orthogonal, which excludes structures whose cell angles are not all 90 degrees. |
|
--skip-negative-elastic-data |
No |
False |
Skip materials whose elastic tensor contains negative cij values. Example: --skip-negative-elastic-data, which excludes materials with negative elastic-tensor entries. |
|
--weight |
No |
1.0 |
Weight used for elastic ENERGY lines in the training set. Example: --weight 1.0, which assigns unit weight to generated training entries. |
|
| Flag |
Required |
Default |
Help |
Choices |
--input-mode |
No |
yaml |
Source of material selections for training-data generation. Example: --input-mode yaml, which reads the material selection from a settings YAML. |
yaml, material-id, batch |
--source |
No |
mp |
Data source. Example: --source mp, which fetches materials from Materials Project. |
mp, jarvis |
--yaml |
No |
|
Existing trainset_settings.yaml file (yaml mode). Example: --yaml trainset_settings.yaml, which loads the trainset-generation configuration. |
|
--mat-id, --mp-id |
No |
|
Material id (material-id mode). Example: --mat-id mp-149, which selects the silicon material in material-id mode. |
|
--structure-dir |
No |
|
Directory for downloaded source structures. Example: --structure-dir structures, which stores downloaded crystal structures there. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--out-yaml |
No |
trainset_settings_source.yaml |
Generated YAML filename in source-backed modes. Example: --out-yaml trainset_source.yaml, which writes fetched material settings to that YAML file. |
|
--output |
No |
trainset_elastic_generated |
Directory for outputs. Example: --output trainset_elastic_generated, which writes generated artifacts under trainset_elastic_generated. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
--api-key |
Yes |
|
Source API key (MP uses --api-key or MP_API_KEY). Example: --api-key YOUR_MP_API_KEY, which authenticates source requests with the supplied key. |
|
--verbose |
No |
False |
Verbose source fetching/logging. Example: --verbose, which prints source-fetching details. |
|
Command: gen_heatfo_trainset
Generate heat-of-formation training sets.
It gets the heat of formation data and balances the equation element-wise.
This comamnd supports 3 input-mode options:
1. yaml: which needs an existing heatfo trainset YAML.
This trainset YAML can be generated using command 'gen_template_yaml_for_heatfo_settings'
2. material-id: fetch one source material id (i.e., material ID [mp-1234] from material's project website)
3. batch: fetch many source systems by elements (i.e., all materials with Ba, B, and O)
[NOTE] To use the source-backed modes (material-id or batch), you need to provide the your API key and specify the source (MP (material's project) or Jarvis, where default is MP). You API-key can be obtained from the source website. For example, for MP, you can:
1. login to your account on MP website
2. on the top right of the page, near your account logo, click on the API access page link,
3. this brings you to https://next-gen.materialsproject.org/api 4. you can now copy your personal API key, which you will provide it to this command using --api-key flag or set it as an environment variable MP_API_KEY.
Examples
1. YAML mode:
reaxkit gen_heatfo_trainset --input-mode yaml --yaml trainset_heatfo_settings.yaml --output trainset_heatfo_generated
2. Material-id mode:
reaxkit gen_heatfo_trainset --input-mode material-id --mat-id mp-1234 --output trainset_heatfo_mp-1234 --api-key YOUR_KEY
3. Batch mode:
- for materials containing only and exactly Ba, B, O elements as in Ba2B2O5:
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY
- for materials any or all of Ba, B, O elements (now, BaO10 is also acceptable):
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to
- same as the first one but this time passing reference list. This means that for balancing the heat of formation equation, the reference geo files will be geo file Babcc_opt with 2 atoms for Ba, geo file B_alp with 12 atoms for B, and the geo file O2 with 2 atoms for O. If you don't provide the reference list, the command will automatically find the most stable structure of elemnts from the sourcewebsite and uses them for balancing purposes:
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --references Ba=Babcc_opt:2,B=B_alp:12,O=O2:2
- for materials containing any or all of Ba, B, O elements but with a cap of 100 materials to prevent large training set genration:
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to --max-materials 100
[NOTE] As the documentation on https://docs.materialsproject.org/methodology/materials-methodology/understanding-structures-and-properties-in-the-materials-project shows, retrieved structures from the new Materials Project (MP) API may have different lattice parameters and angles thanthat of conventional or primitive unit cells you might expect from textbooks or the legacy MP database (i.e., seen on the website). For this purpose, we have a flag --crystallographic-setting-conversion which can convert the fetched crystal structure setting before generating files. The CLI defaults to 'to-conventional'; use 'to-primitive' for a primitive cell. This selects the crystallographic setting. Heatfo GEO export separately transforms Cartesian coordinates to standalone ReaxFF's cell orientation while preserving the selected lattice parameters and periodic geometry.
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--elements |
No |
|
Comma-separated elements for batch mode, for example Ba,B,O. Example: --elements Al,N, which queries aluminum-nitrogen materials in batch mode. |
|
--element-count-scope |
No |
exact |
Number-of-elements filter used for batch material queries. Example: --element-count-scope exact, which requires the requested number of distinct elements. |
exact, up-to |
--max-materials |
No |
|
Optional cap for batch mode. Example: --max-materials 10, which limits batch generation to ten materials. |
|
--crystallographic-setting-conversion |
No |
to-conventional |
Convert fetched crystal structure setting before generating files. Example: --crystallographic-setting-conversion to-conventional, which converts fetched structures to conventional cells. |
to-conventional, to-primitive |
--weight |
No |
1.0 |
Weight used for heatfo ENERGY lines in the training set. Example: --weight 1.0, which assigns unit weight to generated training entries. |
|
| Flag |
Required |
Default |
Help |
Choices |
--source |
No |
mp |
Data source. Example: --source mp, which fetches materials from Materials Project. |
mp, jarvis |
--input-mode |
No |
batch |
Source of material selections for training-data generation. Example: --input-mode yaml, which reads the material selection from a settings YAML. |
yaml, material-id, batch |
--yaml |
No |
|
Heatfo YAML settings file (yaml mode). Example: --yaml trainset_settings.yaml, which loads the trainset-generation configuration. |
|
--mat-id, --mp-id |
No |
|
Material id (material-id mode). Example: --mat-id mp-149, which selects the silicon material in material-id mode. |
|
--references |
No |
|
Optional reference map: element=identifier:atoms,... (example: "Ba=Babcc_opt:2,B=B_alp:12,O=O2:2"). If omitted, unary references are auto-selected from the source. Example: --references Al=Alfcc:4,N=N2:2, which uses the specified aluminum and nitrogen reference structures. |
|
--trainset-file |
No |
trainset_heatfo.in |
Output trainset filename. Example: --trainset-file trainset.in, which writes generated training entries to trainset.in. |
|
--geo-file |
No |
geo |
Output concatenated geo filename. Example: --geo-file geo, which writes generated geometries to geo. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--output |
No |
trainset_heatfo_generated |
Directory for outputs. Example: --output trainset_heatfo_generated, which writes generated artifacts under trainset_heatfo_generated. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
--api-key |
No |
|
Source API key (MP uses --api-key or MP_API_KEY). Example: --api-key YOUR_MP_API_KEY, which authenticates source requests with the supplied key. |
|
--verbose |
No |
False |
Verbose source fetching/logging. Example: --verbose, which prints source-fetching details. |
|
Command: make-trainset-settings
Write a sample trainset settings YAML for generating elastic-based training set (i.e., EOS).
This command only writes the template YAML file but does not generate any trainset data. Once you have the YAML file, you can edit it to specify what materials/systems you want to generate elastic training data for and then run 'gen_elastic_trainset' with '--input-mode yaml' to generate the trainset based on the YAML config.
Examples
1. Generate a template YAML with default name 'trainset_settings.yaml':
reaxkit gen_template_yaml_for_elastic_settings
2. Generate a template YAML with a custom name:
reaxkit gen_template_yaml_for_elastic_settings --output trainset_settings.yaml
Arguments
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--output |
No |
trainset_settings.yaml |
Output YAML path. Example: --output trainset_settings.yaml, which writes generated output to trainset_settings.yaml. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
Command: make-trainset-settings-heatfo
Write a starter YAML for heat-of-formation training-data generation.
Edit the material and reference settings before running gen_heatfo_trainset.
This command writes only the configuration template; it does not generate training data.
Examples
1. Create the template:
reaxkit gen_template_yaml_for_heatfo_settings --output trainset_heatfo_settings.yaml
Arguments
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--output |
No |
trainset_heatfo_settings.yaml |
Output YAML path. Example: --output trainset_heatfo_settings.yaml, which writes generated output to trainset_heatfo_settings.yaml. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
Command: make-trainset-elastic
Generate elastic trainsets (i.e., EOS data).
This comamnd supports 3 input-mode options:
1. yaml: which needs an existing trainset YAML.
This trainset YAML can be generated using command 'gen_template_yaml_for_elastic_settings'
2. material-id: fetch one source material id (i.e., material ID [mp-1234] from material's project website)
3. batch: fetch many source systems by elements (i.e., all materials with Ba, B, and O)
[NOTE] To use the source-backed modes (material-id or batch), you need to provide the your API key and specify the source (MP (material's project) or Jarvis, where default is MP). You API-key can be obtained from the source website. For example, for MP, you can:
1. login to your account on MP website
2. on the top right of the page, near your account logo, click on the API access page link,
3. this brings you to https://next-gen.materialsproject.org/api 4. you can now copy your personal API key, which you will provide it to this command using --api-key flag or set it as an environment variable MP_API_KEY.
Examples
1. YAML mode:
reaxkit gen_elastic_trainset --input-mode yaml --yaml trainset_settings.yaml --output trainset_elastic_generated
2. Material-id mode:
reaxkit gen_elastic_trainset --input-mode material-id --mat-id mp-1234 --output trainset_elastic_mp-1234 --api-key YOUR_KEY
3. Batch mode:
- for materials containing only and exactly Ba, B, O elements as in Ba2B2O5:
reaxkit gen_elastic_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY
- for materials any or all of Ba, B, O elements (now, BaO10 is also acceptable):
reaxkit gen_elastic_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to
- for materials containing any or all of Ba, B, O elements but with a cap of 100 materials to prevent large training set genration:
reaxkit gen_elastic_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to --max-materials 100
[NOTE] As the documentation on https://docs.materialsproject.org/methodology/materials-methodology/understanding-structures-and-properties-in-the-materials-project shows, retrieved structures from the new Materials Project (MP) API may have different lattice parameters and angles thanthat of conventional or primitive unit cells you might expect from textbooks or the legacy MP database (i.e., seen on the website). For this purpose, we have a flag --crystallographic-setting-conversion which can convert the fetched crystal structure setting before generating files. The CLI defaults to 'to-conventional'; use 'to-primitive' for a primitive cell. This selects the crystallographic setting. Heatfo GEO export separately transforms Cartesian coordinates to standalone ReaxFF's cell orientation while preserving the selected lattice parameters and periodic geometry.
[Note] Source-backed elastic generation uses the full Cartesian stiffness tensor and supports non-orthogonal cells. Older nine-constant YAML files retain their orthogonal energy targets and use corrected ReaxFF geometry export. Use --skip-not-orthogonal to restrict generation to cells with right angles.
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--elements |
No |
|
Comma-separated elements for batch mode, for example Ba,B,O. Example: --elements Al,N, which queries aluminum-nitrogen materials in batch mode. |
|
--element-count-scope |
No |
exact |
Number-of-elements filter used for batch material queries. Example: --element-count-scope exact, which requires the requested number of distinct elements. |
exact, up-to |
--max-materials |
No |
|
Optional cap for batch mode. Example: --max-materials 10, which limits batch generation to ten materials. |
|
--bulk-mode |
No |
voigt |
Bulk modulus mode for supported sources. Example: --bulk-mode vrh, which uses the Voigt-Reuss-Hill bulk modulus. |
voigt, reuss, vrh |
--crystallographic-setting-conversion |
No |
to-conventional |
Convert fetched crystal structure setting before generating files. Example: --crystallographic-setting-conversion to-conventional, which converts fetched structures to conventional cells. |
to-conventional, to-primitive |
--skip-not-orthogonal |
No |
False |
Skip lattices with non-orthogonal cell angles (alpha/beta/gamma not all 90). Example: --skip-not-orthogonal, which excludes structures whose cell angles are not all 90 degrees. |
|
--skip-negative-elastic-data |
No |
False |
Skip materials whose elastic tensor contains negative cij values. Example: --skip-negative-elastic-data, which excludes materials with negative elastic-tensor entries. |
|
--weight |
No |
1.0 |
Weight used for elastic ENERGY lines in the training set. Example: --weight 1.0, which assigns unit weight to generated training entries. |
|
| Flag |
Required |
Default |
Help |
Choices |
--input-mode |
No |
yaml |
Source of material selections for training-data generation. Example: --input-mode yaml, which reads the material selection from a settings YAML. |
yaml, material-id, batch |
--source |
No |
mp |
Data source. Example: --source mp, which fetches materials from Materials Project. |
mp, jarvis |
--yaml |
No |
|
Existing trainset_settings.yaml file (yaml mode). Example: --yaml trainset_settings.yaml, which loads the trainset-generation configuration. |
|
--mat-id, --mp-id |
No |
|
Material id (material-id mode). Example: --mat-id mp-149, which selects the silicon material in material-id mode. |
|
--structure-dir |
No |
|
Directory for downloaded source structures. Example: --structure-dir structures, which stores downloaded crystal structures there. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--out-yaml |
No |
trainset_settings_source.yaml |
Generated YAML filename in source-backed modes. Example: --out-yaml trainset_source.yaml, which writes fetched material settings to that YAML file. |
|
--output |
No |
trainset_elastic_generated |
Directory for outputs. Example: --output trainset_elastic_generated, which writes generated artifacts under trainset_elastic_generated. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
--api-key |
Yes |
|
Source API key (MP uses --api-key or MP_API_KEY). Example: --api-key YOUR_MP_API_KEY, which authenticates source requests with the supplied key. |
|
--verbose |
No |
False |
Verbose source fetching/logging. Example: --verbose, which prints source-fetching details. |
|
Command: make-trainset-heatfo
Generate heat-of-formation training sets.
It gets the heat of formation data and balances the equation element-wise.
This comamnd supports 3 input-mode options:
1. yaml: which needs an existing heatfo trainset YAML.
This trainset YAML can be generated using command 'gen_template_yaml_for_heatfo_settings'
2. material-id: fetch one source material id (i.e., material ID [mp-1234] from material's project website)
3. batch: fetch many source systems by elements (i.e., all materials with Ba, B, and O)
[NOTE] To use the source-backed modes (material-id or batch), you need to provide the your API key and specify the source (MP (material's project) or Jarvis, where default is MP). You API-key can be obtained from the source website. For example, for MP, you can:
1. login to your account on MP website
2. on the top right of the page, near your account logo, click on the API access page link,
3. this brings you to https://next-gen.materialsproject.org/api 4. you can now copy your personal API key, which you will provide it to this command using --api-key flag or set it as an environment variable MP_API_KEY.
Examples
1. YAML mode:
reaxkit gen_heatfo_trainset --input-mode yaml --yaml trainset_heatfo_settings.yaml --output trainset_heatfo_generated
2. Material-id mode:
reaxkit gen_heatfo_trainset --input-mode material-id --mat-id mp-1234 --output trainset_heatfo_mp-1234 --api-key YOUR_KEY
3. Batch mode:
- for materials containing only and exactly Ba, B, O elements as in Ba2B2O5:
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY
- for materials any or all of Ba, B, O elements (now, BaO10 is also acceptable):
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to
- same as the first one but this time passing reference list. This means that for balancing the heat of formation equation, the reference geo files will be geo file Babcc_opt with 2 atoms for Ba, geo file B_alp with 12 atoms for B, and the geo file O2 with 2 atoms for O. If you don't provide the reference list, the command will automatically find the most stable structure of elemnts from the sourcewebsite and uses them for balancing purposes:
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --references Ba=Babcc_opt:2,B=B_alp:12,O=O2:2
- for materials containing any or all of Ba, B, O elements but with a cap of 100 materials to prevent large training set genration:
reaxkit gen_heatfo_trainset --input-mode batch --elements Ba,B,O --api-key YOUR_KEY --element-count-scope up-to --max-materials 100
[NOTE] As the documentation on https://docs.materialsproject.org/methodology/materials-methodology/understanding-structures-and-properties-in-the-materials-project shows, retrieved structures from the new Materials Project (MP) API may have different lattice parameters and angles thanthat of conventional or primitive unit cells you might expect from textbooks or the legacy MP database (i.e., seen on the website). For this purpose, we have a flag --crystallographic-setting-conversion which can convert the fetched crystal structure setting before generating files. The CLI defaults to 'to-conventional'; use 'to-primitive' for a primitive cell. This selects the crystallographic setting. Heatfo GEO export separately transforms Cartesian coordinates to standalone ReaxFF's cell orientation while preserving the selected lattice parameters and periodic geometry.
Arguments
Scientific choices
| Flag |
Required |
Default |
Help |
Choices |
--elements |
No |
|
Comma-separated elements for batch mode, for example Ba,B,O. Example: --elements Al,N, which queries aluminum-nitrogen materials in batch mode. |
|
--element-count-scope |
No |
exact |
Number-of-elements filter used for batch material queries. Example: --element-count-scope exact, which requires the requested number of distinct elements. |
exact, up-to |
--max-materials |
No |
|
Optional cap for batch mode. Example: --max-materials 10, which limits batch generation to ten materials. |
|
--crystallographic-setting-conversion |
No |
to-conventional |
Convert fetched crystal structure setting before generating files. Example: --crystallographic-setting-conversion to-conventional, which converts fetched structures to conventional cells. |
to-conventional, to-primitive |
--weight |
No |
1.0 |
Weight used for heatfo ENERGY lines in the training set. Example: --weight 1.0, which assigns unit weight to generated training entries. |
|
| Flag |
Required |
Default |
Help |
Choices |
--source |
No |
mp |
Data source. Example: --source mp, which fetches materials from Materials Project. |
mp, jarvis |
--input-mode |
No |
batch |
Source of material selections for training-data generation. Example: --input-mode yaml, which reads the material selection from a settings YAML. |
yaml, material-id, batch |
--yaml |
No |
|
Heatfo YAML settings file (yaml mode). Example: --yaml trainset_settings.yaml, which loads the trainset-generation configuration. |
|
--mat-id, --mp-id |
No |
|
Material id (material-id mode). Example: --mat-id mp-149, which selects the silicon material in material-id mode. |
|
--references |
No |
|
Optional reference map: element=identifier:atoms,... (example: "Ba=Babcc_opt:2,B=B_alp:12,O=O2:2"). If omitted, unary references are auto-selected from the source. Example: --references Al=Alfcc:4,N=N2:2, which uses the specified aluminum and nitrogen reference structures. |
|
--trainset-file |
No |
trainset_heatfo.in |
Output trainset filename. Example: --trainset-file trainset.in, which writes generated training entries to trainset.in. |
|
--geo-file |
No |
geo |
Output concatenated geo filename. Example: --geo-file geo, which writes generated geometries to geo. |
|
Outputs and plots
| Flag |
Required |
Default |
Help |
Choices |
--output |
No |
trainset_heatfo_generated |
Directory for outputs. Example: --output trainset_heatfo_generated, which writes generated artifacts under trainset_heatfo_generated. |
|
--copy-to-dot |
No |
False |
Also copy generated output to current directory. Example: --copy-to-dot, which adds copies of generated artifacts in the current directory. |
|
--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. |
|
--api-key |
No |
|
Source API key (MP uses --api-key or MP_API_KEY). Example: --api-key YOUR_MP_API_KEY, which authenticates source requests with the supplied key. |
|
--verbose |
No |
False |
Verbose source fetching/logging. Example: --verbose, which prints source-fetching details. |
|
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.