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_eon_config(→ pathlib.Path)

Write a config.ini for eOn from a nested section dict.

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.ini for 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 via eon_schema.config.unknown_ini_keys() (pot-specific sections such as SocketNWChemPot are not flagged).

Parameters

path:

File path or directory (writes config.ini inside a directory).

settings:

{section: {key: value}} map.

validate:

If True, raise ValueError when 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.