eon.lammps_bundle¶
Pack and inspect eOn LAMMPS run-input bundles (.eonlpb).
The bundle is a single self-contained file that holds in.lammps plus every file the run needs (pair_coeff data, custom pair_style .so plugins, KIM tables, read_data inputs, shell helpers, …). The client-side reader in client/potentials/LAMMPS/LammpsBundle.{h,cpp} extracts the bundle to a per-instance scratch dir and pins liblammps’s working directory there, so the eonclient CWD no longer matters for LAMMPS file lookups.
Format (all little-endian): [0..7] magic : b”EONLPB1\0” (8 bytes) [8..15] m_len : uint64 (manifest length in bytes) [16..] manifest : JSON UTF-8 (m_len bytes) […] bodies : concatenated file contents in manifest order
Manifest schema: {“files”: [{“name”: “in.lammps”, “size”: 1234}, {“name”: “Pd.eam.alloy”, “size”: 56789}]}
Usage::
python -m eon.lammps_bundle pack potfiles/ bundle.eonlpb
python -m eon.lammps_bundle list bundle.eonlpb
Module Contents¶
Classes¶
Functions¶
Pack every regular file under |
|
Parse the magic + manifest from a bundle and return its entry list. |
|
Data¶
API¶
- eon.lammps_bundle.MAGIC¶
b’EONLPB1\x00’
- eon.lammps_bundle.HEADER_LEN¶
None
- eon.lammps_bundle.pack(source_dir: str | os.PathLike, bundle_path: str | os.PathLike) pathlib.Path¶
Pack every regular file under
source_dirintobundle_path.Refuses to pack a directory that does not contain
in.lammps– the client treats a bundle without it as a configuration error. Returns the absolute path of the written bundle.
- eon.lammps_bundle.read_manifest(bundle_path: str | os.PathLike) list[eon.lammps_bundle.BundleEntry]¶
Parse the magic + manifest from a bundle and return its entry list.