Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
GromacsReader.hpp
Go to the documentation of this file.
1
8#pragma once
9
10#include "BaseReader.hpp"
11
12namespace correlation::readers {
13
21class GromacsReader : public BaseReader {
22public:
23 std::string getName() const override { return "GROMACS Reader"; }
24 std::vector<std::string> getExtensions() const override { return {".gro"}; }
25 bool isTrajectory() const override { return true; }
26
28 const std::string &filename,
29 std::function<void(float, const std::string &)> progress_callback = nullptr) override;
30
32 const std::string &filename,
33 std::function<void(float, const std::string &)> progress_callback = nullptr) override;
34
42 static correlation::core::Cell parseGroFrame(const char *data, size_t size);
43};
44
45} // namespace correlation::readers
Abstract base class for all file format readers.
Represents the simulation cell (periodic box).
Definition Cell.hpp:30
This class stores a series of snapshots of a system.
Definition Trajectory.hpp:32
Handles parsing of GROMACS (.gro) structure files.
Definition GromacsReader.hpp:21
correlation::core::Trajectory readTrajectory(const std::string &filename, std::function< void(float, const std::string &)> progress_callback=nullptr) override
Reads a trajectory from a file.
Definition GromacsReader.cpp:251
correlation::core::Cell readStructure(const std::string &filename, std::function< void(float, const std::string &)> progress_callback=nullptr) override
Reads an atomic structure from a file.
Definition GromacsReader.cpp:237
bool isTrajectory() const override
Returns true if this reader supports trajectory files.
Definition GromacsReader.hpp:25
std::vector< std::string > getExtensions() const override
Returns a list of supported file extensions.
Definition GromacsReader.hpp:24
std::string getName() const override
Returns the display name of the format.
Definition GromacsReader.hpp:23
static correlation::core::Cell parseGroFrame(const char *data, size_t size)
Parses a single GROMACS .gro frame from a memory region.
Definition GromacsReader.cpp:128
Definition TrajectoryLoader.hpp:24