99[[nodiscard]] std::expected<correlation::core::Cell, std::string>
111[[nodiscard]] std::expected<correlation::core::Trajectory, std::string>
123[[nodiscard]] std::expected<correlation::core::Trajectory, std::string>
Abstract base class for all file format readers.
Simulation cell structure with periodic boundary conditions.
Trajectory data structure for time-series atomistic simulations.
Represents the simulation cell (periodic box).
Definition Cell.hpp:30
This class stores a series of snapshots of a system.
Definition Trajectory.hpp:32
Definition TrajectoryLoader.hpp:24
FileType
A type-safe enum to specify the format of a structure or trajectory file.
Definition FileReader.hpp:29
@ Nequip
NequIP Extended XYZ format (.nequip).
Definition FileReader.hpp:46
@ Xdatcar
VASP XDATCAR trajectory format.
Definition FileReader.hpp:39
@ Mace
MACE Extended XYZ format (.mace, .extxyz).
Definition FileReader.hpp:43
@ Cell
CASTEP .cell physical structure format.
Definition FileReader.hpp:31
@ Outmol
DMol3 .outmol format.
Definition FileReader.hpp:37
@ Arc
Accelrys .arc trajectory format.
Definition FileReader.hpp:34
@ Gap
GAP Extended XYZ format (.gap, .quip).
Definition FileReader.hpp:45
@ CastepMd
CASTEP molecular dynamics .md trajectory format.
Definition FileReader.hpp:36
@ Chgnet
CHGNet Extended XYZ format (.chgnet).
Definition FileReader.hpp:44
@ Unknown
Unrecognized or unsupported file format.
Definition FileReader.hpp:47
@ Cif
Crystallographic Information File (.cif).
Definition FileReader.hpp:32
@ Vasp
VASP POSCAR/CONTCAR single-structure format.
Definition FileReader.hpp:38
@ Xyz
Extended XYZ .xyz format.
Definition FileReader.hpp:42
@ Pdb
PDB .pdb format.
Definition FileReader.hpp:41
@ LammpsDump
LAMMPS atomic dump trajectory format.
Definition FileReader.hpp:35
@ Gromacs
GROMACS .gro format.
Definition FileReader.hpp:40
@ Car
Accelrys .car file format.
Definition FileReader.hpp:30
@ OnetepDat
ONETEP input/output .dat format.
Definition FileReader.hpp:33
FileType determineFileType(const std::string &filename)
Determines the FileType from a given filename extension.
Definition FileReader.cpp:79
std::expected< correlation::core::Trajectory, std::string > readTrajectoryExpected(const std::string &filename, FileType type=FileType::Unknown, const ProgressCallback &progress_callback=nullptr)
Reads a trajectory from the given file, returning Trajectory or diagnostic error string.
Definition FileReader.cpp:299
correlation::core::Trajectory readTrajectory(const std::string &filename, FileType type, const ProgressCallback &progress_callback=nullptr)
Reads a trajectory from a file.
Definition FileReader.cpp:247
std::expected< correlation::core::Cell, std::string > readStructureExpected(const std::string &filename, FileType type=FileType::Unknown, const ProgressCallback &progress_callback=nullptr)
Reads a structure from the given file, returning Cell or diagnostic error string.
Definition FileReader.cpp:287
correlation::core::Cell readStructure(const std::string &filename, FileType type, const ProgressCallback &progress_callback=nullptr)
Reads an atomic structure from a file.
Definition FileReader.cpp:229
std::function< void(float, const std::string &)> ProgressCallback
Progress report callback function type. Invoked with normalized progress in [0.0, 1....
Definition IStructureReader.hpp:22