Classes | |
| struct | ConFrameMetadata |
| struct | ConMetadataText |
| struct | ConMetadataValue |
Enumerations | |
| enum class | IoStatus : std::uint8_t { Ok = 0 , ReadError = 1 , WriteError = 2 , AppendError = 3 , OpenError = 4 , InvalidArgument = 5 } |
| Structured I/O result for the client surface (nanobind-friendly). More... | |
Functions | |
| bool | chemfiles_available () noexcept |
| True when this build links chemfiles (-Dwith_chemfiles found it). | |
| bool | is_readcon_path (std::string_view filename) |
| True for paths readcon owns: .con, .convel and their .gz/.zst forms. | |
| bool | is_chemfiles_path (std::string_view filename) |
| True for structure paths routed to chemfiles: a known extension (xyz, extxyz, pdb, cif, mmcif, gro, data, lmp, mol2, sdf, vasp, xtc, trr, dcd, nc, arc, cml, cssr, mmtf, tng) or a POSCAR/CONTCAR name. | |
| void | set_structure_input_format (std::string fmt) |
| [Main] input_format: empty or "con" keeps readcon only. | |
| const std::string & | structure_input_format () noexcept |
| std::vector< double > | parse_cell_values (const std::string &text) |
| Parse "a b c" or nine numbers; throws std::invalid_argument. | |
| void | set_config_cell (const std::vector< double > &values, bool pbc) |
| Fallback cell for foreign files that carry none ([Main] cell / pbc). | |
| void | set_default_vacuum (double angstrom) |
| Vacuum padding per side (Angstrom) for the bounding-box default cell. | |
| double | default_vacuum () noexcept |
| void | publish_structure_input (std::string format, const std::string &cell, bool pbc, double vacuum) |
| Publish [Main] input_format, cell, pbc, and default_vacuum to the process-wide readers. | |
| const std::string & | last_cell_warning () noexcept |
| Read the first frame of any chemfiles-supported file into Matter. | |
| IoStatus | inp2matter (Matter &m, const std::string &filename) |
| Input entry point: .con/.convel (and .gz/.zst) go to readcon, everything else goes to chemfiles. | |
| IoStatus | chemfiles2matter (Matter &, const std::string &filename, const std::string &) |
| readcon::ConFrame | matterToConFrame (Matter &m, const ConFrameMetadata *metadata=nullptr) |
| Build a single stamped ConFrame from Matter (same builder as matter2con). | |
| void | set_write_con_forces (bool enabled) noexcept |
| Whether written .con frames carry "Forces of Component" sections. | |
| bool | write_con_forces () noexcept |
| ConFrameMetadata | metadata_from_frame (const readcon::ConFrame &frame) |
| Extract known frame-level fields from a parsed readcon frame. | |
| std::pair< std::array< double, 3 >, std::array< double, 3 > > | cell_to_lengths_angles (const Matter &m) |
| void | resetConAppendState () |
| Drop the per-path bookkeeping that lets append-mode writes skip re-parsing frames this process wrote. | |
| IoStatus | matter2con (Matter &m, std::string filename, bool append=false, const ConFrameMetadata *metadata=nullptr) |
| Append a frame to a .con, or truncate and write one frame. | |
| IoStatus | con2matter (Matter &m, std::string filename) |
| IoStatus | con2matter (Matter &m, const readcon::ConFrame &frame, ConFrameMetadata *out_metadata) |
| IoStatus | matter2convel (Matter &m, std::string filename) |
| IoStatus | convel2matter (Matter &m, std::string filename) |
| IoStatus | matter2xyz (Matter &m, std::string filename, bool append=false) |
| Write one extended-XYZ frame: Lattice= cell and 17-digit coordinates. | |
| IoStatus | writeTibble (Matter &m, std::string filename) |
| Debug table (positions, optional cached forces). Not a structure format. | |
| std::vector< readcon::ConFrame > | buildNebPathFrames (const std::vector< std::shared_ptr< Matter > > &path, const std::vector< ConFrameMetadata > &metadata_per_image) |
| Build NEB band ConFrames without writing (clone builder path of writeNebPath). | |
| IoStatus | writeConFrames (std::string filename, const std::vector< readcon::ConFrame > &frames) |
| Write already-built ConFrames to a multi-frame .con (temp or durable). | |
| IoStatus | writeNebPath (std::string filename, const std::vector< std::shared_ptr< Matter > > &path, const std::vector< ConFrameMetadata > &metadata_per_image) |
| Write a full NEB path as one multi-frame .con using ConFrameBuilder::clone(). | |
| void | mirror_con_corpus (const std::string &path) |
| Copy a con file into the run readcon-db corpus when libreadcon_db loads. | |
| bool | readcon_db_mirror_ok () |
| True when the loaded rkrdb_open belongs to the linked readcon-db. | |
| void | readcon_db_mirror_reset () |
| Drop a cached load so a later call reads EON_READCON_DB_LIBRARY again. | |
| const char * | readcon_db_loaded_version () |
| Version of the loaded library. Empty when the load failed. | |
| constexpr bool | io_ok (IoStatus s) noexcept |
| constexpr const char * | io_status_name (IoStatus s) noexcept |
| Human-readable label for logging / bindings. | |
|
strong |
Structured I/O result for the client surface (nanobind-friendly).
Prefer comparing to IoStatus::Ok rather than treating as bool.
| Enumerator | |
|---|---|
| Ok | |
| ReadError | |
| WriteError | |
| AppendError | |
| OpenError | |
| InvalidArgument | |
Definition at line 29 of file ConFileIO.h.
|
nodiscard |
Build NEB band ConFrames without writing (clone builder path of writeNebPath).
Empty vector on invalid input.
| path | images, endpoints included |
| metadata_per_image | one record per image; length must equal path |
Definition at line 894 of file ConFileIO.cpp.
| std::pair< std::array< double, 3 >, std::array< double, 3 > > eonc::io::cell_to_lengths_angles | ( | const Matter & | m | ) |
Definition at line 512 of file ConFileIO.cpp.
|
nodiscard |
Definition at line 428 of file ChemfilesIO.cpp.
|
nodiscardnoexcept |
True when this build links chemfiles (-Dwith_chemfiles found it).
Definition at line 168 of file ChemfilesIO.cpp.
|
nodiscard |
Definition at line 621 of file ConFileIO.cpp.
Definition at line 603 of file ConFileIO.cpp.
Definition at line 771 of file ConFileIO.cpp.
|
nodiscardnoexcept |
Definition at line 250 of file ChemfilesIO.cpp.
Input entry point: .con/.convel (and .gz/.zst) go to readcon, everything else goes to chemfiles.
An unknown extension is treated as .con, as before.
Definition at line 265 of file ChemfilesIO.cpp.
|
nodiscardconstexprnoexcept |
Definition at line 38 of file ConFileIO.h.
|
nodiscardconstexprnoexcept |
Human-readable label for logging / bindings.
Definition at line 43 of file ConFileIO.h.
|
nodiscard |
True for structure paths routed to chemfiles: a known extension (xyz, extxyz, pdb, cif, mmcif, gro, data, lmp, mol2, sdf, vasp, xtc, trr, dcd, nc, arc, cml, cssr, mmtf, tng) or a POSCAR/CONTCAR name.
Other dotted names keep the classic meaning and get .con appended.
Definition at line 188 of file ChemfilesIO.cpp.
|
nodiscard |
True for paths readcon owns: .con, .convel and their .gz/.zst forms.
Definition at line 176 of file ChemfilesIO.cpp.
|
nodiscardnoexcept |
Read the first frame of any chemfiles-supported file into Matter.
Maps positions, atomic numbers, masses and velocities when present. Fixed atoms come from per-atom extxyz properties: fixed (true = frozen) or ASE's move_mask (true = free), as a bool, a number, or a 3-vector for per-axis masks.
Cell precedence: the file's own cell (periodic); else [Main] cell with [Main] pbc; else a loud WARNING naming the file and both keys, and an orthorhombic, non-periodic box spanning the atoms plus [Main] default_vacuum (10 Angstrom) on every side.
format overrides chemfiles' extension guess ("" = guess). Text of the last default-cell warning on this thread ("" when the last read needed none). Lets tests and callers surface it.
Definition at line 263 of file ChemfilesIO.cpp.
|
nodiscard |
Append a frame to a .con, or truncate and write one frame.
With append, an uncompressed target is extended in place through readcon::ConFrameWriter OpenMode::Append, so N appends cost N frame writes rather than N(N+1)/2. Earlier frames are never re-serialized, and the writer is flushed before the call returns, so every intermediate state on disk is a complete multi-frame .con.
A target that eOn did not write, or that changed size or mtime since eOn last wrote it, is parsed once before anything is added; an unparseable target yields IoStatus::AppendError with its bytes untouched. Gzip and zstd targets keep the read-all-and-rewrite path because a compressed member cannot be extended in place.
Definition at line 538 of file ConFileIO.cpp.
Definition at line 751 of file ConFileIO.cpp.
Write one extended-XYZ frame: Lattice= cell and 17-digit coordinates.
append concatenates another frame. A tail that does not end in a newline gets one before the next atom count, so the frames stay separate. A target whose last frame has a different atom count yields InvalidArgument and is left unchanged. Chemfiles in readcon is ingress (XYZ/PDB/GRO into ConFrame), not XYZ egress, so this writer emits the Lattice= comment ASE and chemfiles already read.
Definition at line 789 of file ConFileIO.cpp.
|
nodiscard |
Build a single stamped ConFrame from Matter (same builder as matter2con).
Does not write to disk.
Definition at line 482 of file ConFileIO.cpp.
| ConFrameMetadata eonc::io::metadata_from_frame | ( | const readcon::ConFrame & | frame | ) |
Extract known frame-level fields from a parsed readcon frame.
Definition at line 495 of file ConFileIO.cpp.
| void eonc::io::mirror_con_corpus | ( | const std::string & | path | ) |
Copy a con file into the run readcon-db corpus when libreadcon_db loads.
Failure to load the library or to insert the blob does not change IoStatus.
Definition at line 251 of file ReadconDbMirror.cpp.
|
nodiscard |
Parse "a b c" or nine numbers; throws std::invalid_argument.
Definition at line 210 of file ChemfilesIO.cpp.
| void eonc::io::publish_structure_input | ( | std::string | format, |
| const std::string & | cell, | ||
| bool | pbc, | ||
| double | vacuum ) |
Publish [Main] input_format, cell, pbc, and default_vacuum to the process-wide readers.
Structure reads do not carry a Parameters object. Throws std::invalid_argument before changing any reader when cell is not empty, 3, or 9 numbers, or when default_vacuum is negative. "con" clears the format, as set_structure_input_format does.
Definition at line 252 of file ChemfilesIO.cpp.
| const char * eonc::io::readcon_db_loaded_version | ( | ) |
Version of the loaded library. Empty when the load failed.
Definition at line 292 of file ReadconDbMirror.cpp.
| bool eonc::io::readcon_db_mirror_ok | ( | ) |
True when the loaded rkrdb_open belongs to the linked readcon-db.
A missing library returns false and does not change IoStatus.
Definition at line 285 of file ReadconDbMirror.cpp.
| void eonc::io::readcon_db_mirror_reset | ( | ) |
Drop a cached load so a later call reads EON_READCON_DB_LIBRARY again.
Definition at line 290 of file ReadconDbMirror.cpp.
| void eonc::io::resetConAppendState | ( | ) |
Drop the per-path bookkeeping that lets append-mode writes skip re-parsing frames this process wrote.
Appends already re-parse a target whose size or mtime moved, so this only matters when a file is replaced with different content of the same size inside one filesystem timestamp tick.
Definition at line 533 of file ConFileIO.cpp.
| void eonc::io::set_config_cell | ( | const std::vector< double > & | values, |
| bool | pbc ) |
Fallback cell for foreign files that carry none ([Main] cell / pbc).
values holds 3 numbers (orthorhombic a b c) or 9 (row-major lattice, one vector per row). Empty clears it. Throws std::invalid_argument on any other count.
Definition at line 233 of file ChemfilesIO.cpp.
| void eonc::io::set_default_vacuum | ( | double | angstrom | ) |
Vacuum padding per side (Angstrom) for the bounding-box default cell.
Definition at line 242 of file ChemfilesIO.cpp.
| void eonc::io::set_structure_input_format | ( | std::string | fmt | ) |
[Main] input_format: empty or "con" keeps readcon only.
Any other value (xyz, pdb, cif, ...) makes a request for "pos.con" read "pos.<fmt>" when that file exists, so jobs that name .con inputs start from any format. Output stays .con only.
Definition at line 202 of file ChemfilesIO.cpp.
|
noexcept |
Whether written .con frames carry "Forces of Component" sections.
Force sections enable force+energy co-loading on re-read (warm NEB restarts without re-evaluating the potential) but are not part of the classic con layout: external readers such as ASE's eon parser reject frames that carry them. Off unless [Main] write_con_forces enables it. A ConFrameMetadata.write_con_forces value, then the Matter Parameters field, override this process-wide flag for a single write. Reading force-bearing frames is always supported regardless of this flag.
Definition at line 487 of file ConFileIO.cpp.
|
nodiscardnoexcept |
Definition at line 208 of file ChemfilesIO.cpp.
|
nodiscardnoexcept |
Definition at line 491 of file ConFileIO.cpp.
|
nodiscard |
Write already-built ConFrames to a multi-frame .con (temp or durable).
Definition at line 943 of file ConFileIO.cpp.
|
nodiscard |
Write a full NEB path as one multi-frame .con using ConFrameBuilder::clone().
Seeds identity (symbols/fixed/mass/id/cell headers) from path[0] only, then for each image clones that template and bulk-updates positions/forces + metadata. Images must share atom count and topology with path[0] (standard NEB band invariant); heterogeneous multi-frame movies should not use this. Avoids re-reading the output file per image (legacy append path).
| filename | output path |
| path | length must be numImages+2 (endpoints included) |
| metadata_per_image | length must equal path.size() |
Definition at line 962 of file ConFileIO.cpp.
Debug table (positions, optional cached forces). Not a structure format.
Definition at line 851 of file ConFileIO.cpp.