rgpycrumbs.eon.helpers¶
Shared helpers for eOn job-config authorship.
Cookbook context: https://atomistic-cookbook.org/examples/eon-pet-neb/eon-pet-neb.html
Changed in version 1.9.x: write_eon_config routes through eon-schema INI helpers (no eon-akmc).
Functions¶
|
Write a |
Module Contents¶
- rgpycrumbs.eon.helpers.write_eon_config(path: str | pathlib.Path, settings: collections.abc.Mapping[str, collections.abc.Mapping[str, Any]], *, validate: bool = False) pathlib.Path[source]¶
Write a
config.inifor eOn from a nested section dict.Uses
eon_schema.config.write_ini()(case-preserving keys, lowercase bools). Optional validate flags unknown keys on L0-covered sections viaeon_schema.config.unknown_ini_keys()(pot-specific sections such asSocketNWChemPotare not flagged).Parameters¶
- path:
File path or directory (writes
config.iniinside a directory).- settings:
{section: {key: value}}map.- validate:
If True, raise
ValueErrorwhen covered L0 sections contain unknown option names.
Returns¶
- pathlib.Path
Path to the written
config.ini.
Added in version 0.1.0.
Changed in version 1.9.x: Implemented with eon-schema; added validate.