62 std::expected<std::
string, std::
string>
loadFile(const std::
string &path,
71 std::expected<std::
string, std::
string>
loadFiles(const std::vector<std::
string> &paths,
94 [[nodiscard]] std::shared_ptr<const correlation::core::Trajectory>
114 [[nodiscard]] std::map<std::string, int>
getAtomCounts()
const;
128 bool renameElement(std::string_view old_symbol, std::string_view new_symbol);
170 void setTrajectory(std::shared_ptr<correlation::core::Trajectory> traj)
noexcept {
Simulation cell structure with periodic boundary conditions.
Floating point precision type definitions for Correlation.
Trajectory data structure for time-series atomistic simulations.
~TrajectoryLoader()=default
const correlation::core::Cell * cell() const noexcept
Gets a pointer to the first cell frame.
Definition TrajectoryLoader.hpp:103
real_t getTimeStep() const noexcept
Simulation timestep of the trajectory in femtoseconds.
Definition TrajectoryLoader.hpp:157
TrajectoryLoader(const TrajectoryLoader &)=delete
void clear() noexcept
Clears currently loaded trajectory and resets state.
Definition TrajectoryLoader.hpp:177
std::expected< std::string, std::string > loadFile(const std::string &path, const ProgressCallback &progress=nullptr)
Loads a structure or trajectory file from the given path.
Definition TrajectoryLoader.cpp:70
const correlation::readers::IReaderRegistry * registry_
Definition TrajectoryLoader.hpp:181
correlation::core::Trajectory * trajectoryMut() noexcept
Gets a mutable pointer to the loaded trajectory.
Definition TrajectoryLoader.hpp:86
size_t getTotalAtomCount() const noexcept
Total number of atoms in the primary frame.
Definition TrajectoryLoader.hpp:140
TrajectoryLoader()
Constructs a TrajectoryLoader using the global default ReaderFactory singleton.
Definition TrajectoryLoader.cpp:21
real_t getRecommendedTimeStep() const
Recommended timestep derived from atomic masses in the active cell.
Definition TrajectoryLoader.cpp:66
std::vector< std::pair< std::string, int > > getOrderedAtomCounts() const
Computes atomic species counts in cell element-registration order.
Definition TrajectoryLoader.cpp:35
std::shared_ptr< correlation::core::Trajectory > trajectory_
Definition TrajectoryLoader.hpp:180
TrajectoryLoader(TrajectoryLoader &&) noexcept=default
void setTrajectory(std::shared_ptr< correlation::core::Trajectory > traj) noexcept
Injects an existing trajectory instance.
Definition TrajectoryLoader.hpp:170
std::expected< std::string, std::string > loadFiles(const std::vector< std::string > &paths, const ProgressCallback &progress=nullptr)
Loads a multi-file trajectory from a collection of paths.
Definition TrajectoryLoader.cpp:120
size_t getRemovedFrameCount() const noexcept
Number of skipped/removed frames during parsing.
Definition TrajectoryLoader.hpp:150
std::function< void(float, const std::string &)> ProgressCallback
Definition TrajectoryLoader.hpp:36
std::shared_ptr< const correlation::core::Trajectory > trajectoryShared() const noexcept
Gets a shared pointer to the loaded trajectory.
Definition TrajectoryLoader.hpp:95
size_t getFrameCount() const noexcept
Total number of frames in the loaded trajectory.
Definition TrajectoryLoader.hpp:133
const correlation::core::Trajectory * trajectory() const noexcept
Gets a pointer to the loaded trajectory.
Definition TrajectoryLoader.hpp:78
TrajectoryLoader & operator=(const TrajectoryLoader &)=delete
bool renameElement(std::string_view old_symbol, std::string_view new_symbol)
Renames an element species across the loaded trajectory.
Definition TrajectoryLoader.cpp:59
std::map< std::string, int > getAtomCounts() const
Computes atomic species counts for the active cell.
Definition TrajectoryLoader.cpp:27
Represents the simulation cell (periodic box).
Definition Cell.hpp:30
This class stores a series of snapshots of a system.
Definition Trajectory.hpp:32
Abstract interface defining lookup capabilities for file reader discovery and instantiation.
Definition IReaderRegistry.hpp:32
Definition AppController.hpp:27
Definition ITrajectoryCalculator.hpp:13
Definition TrajectoryLoader.hpp:24
Definition AnalysisTypes.hpp:11
double real_t
Definition Precision.hpp:18