Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
LammpsDumpReader.hpp
Go to the documentation of this file.
1
8#pragma once
9
10#include "BaseReader.hpp"
11#include "core/Cell.hpp"
12#include "core/Trajectory.hpp"
13
14#include <functional>
15#include <string>
16#include <vector>
17
18namespace correlation::readers {
19
31public:
32 std::string getName() const override { return "LAMMPS Dump"; }
33 std::vector<std::string> getExtensions() const override { return {"dump", "lammpstrj"}; }
34 bool isTrajectory() const override { return true; }
35
37 const std::string &filename,
38 std::function<void(float, const std::string &)> progress_callback = nullptr) override;
39
41
43 const std::string &filename,
44 std::function<void(float, const std::string &)> progress_callback = nullptr) override;
45
47 const std::vector<std::string> &filenames,
48 std::function<void(float, const std::string &)> progress_callback = nullptr) override;
49
59 static correlation::core::Cell parseDumpFrame(const char *data, size_t size);
60};
61
62} // namespace correlation::readers
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
correlation::core::Trajectory readTrajectory(const std::string &filename, ProgressCallback progress_callback=nullptr) override=0
Reads a trajectory from a file.
Reads one or more frames from a LAMMPS custom dump file.
Definition LammpsDumpReader.hpp:30
static correlation::core::Cell parseDumpFrame(const char *data, size_t size)
Parses a single LAMMPS dump frame from a memory region.
Definition LammpsDumpReader.cpp:323
bool isTrajectory() const override
Returns true if this reader supports trajectory files.
Definition LammpsDumpReader.hpp:34
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 LammpsDumpReader.cpp:509
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 LammpsDumpReader.cpp:350
std::vector< std::string > getExtensions() const override
Returns a list of supported file extensions.
Definition LammpsDumpReader.hpp:33
std::string getName() const override
Returns the display name of the format.
Definition LammpsDumpReader.hpp:32
Definition TrajectoryLoader.hpp:24