Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
BaseReader.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
11#include "core/Cell.hpp"
12#include "core/Trajectory.hpp"
15
16#include <functional>
17#include <string>
18#include <vector>
19
20namespace correlation::readers {
21
26public:
27 BaseReader() = default;
28 ~BaseReader() override = default;
29 BaseReader(const BaseReader &) = delete;
30 BaseReader &operator=(const BaseReader &) = delete;
31 BaseReader(BaseReader &&) = delete;
33
38 [[nodiscard]] virtual std::string getName() const = 0;
39
44 [[nodiscard]] virtual std::vector<std::string> getExtensions() const = 0;
45
50 [[nodiscard]] virtual bool isTrajectory() const = 0;
51
58 [[nodiscard]] correlation::core::Cell
59 readStructure(const std::string &filename,
60 ProgressCallback progress_callback = nullptr) override = 0;
61
69 readTrajectory(const std::string &filename,
70 ProgressCallback progress_callback = nullptr) override = 0;
71
73};
74
75} // namespace correlation::readers
Simulation cell structure with periodic boundary conditions.
Abstract interface for parsing static atomic structures into a Cell.
Abstract interface for parsing multi-frame time-series trajectories.
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
~BaseReader() override=default
virtual std::vector< std::string > getExtensions() const =0
Returns a list of supported file extensions.
BaseReader(BaseReader &&)=delete
BaseReader(const BaseReader &)=delete
BaseReader & operator=(BaseReader &&)=delete
BaseReader & operator=(const BaseReader &)=delete
correlation::core::Trajectory readTrajectory(const std::string &filename, ProgressCallback progress_callback=nullptr) override=0
Reads a trajectory from a file.
correlation::core::Cell readStructure(const std::string &filename, ProgressCallback progress_callback=nullptr) override=0
Reads an atomic structure from a file.
virtual bool isTrajectory() const =0
Returns true if this reader supports trajectory files.
virtual std::string getName() const =0
Returns the display name of the format.
virtual correlation::core::Trajectory readTrajectory(const std::string &filename, ProgressCallback progress_callback=nullptr)=0
Reads a trajectory from a file.
Definition TrajectoryLoader.hpp:24
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