Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::readers::CarReader Class Reference

Reads a Materials Studio .car file and returns a correlation::core::Cell object. More...

#include <CarReader.hpp>

Inheritance diagram for correlation::readers::CarReader:
Collaboration diagram for correlation::readers::CarReader:

Public Member Functions

std::string getName () const override
 Returns the display name of the format.
std::vector< std::string > getExtensions () const override
 Returns a list of supported file extensions.
bool isTrajectory () const override
 Returns true if this reader supports trajectory files.
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.
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.
Public Member Functions inherited from correlation::readers::BaseReader
 BaseReader ()=default
 ~BaseReader () override=default
 BaseReader (const BaseReader &)=delete
BaseReader & operator= (const BaseReader &)=delete
 BaseReader (BaseReader &&)=delete
BaseReader & operator= (BaseReader &&)=delete
virtual correlation::core::Trajectory readTrajectory (const std::vector< std::string > &filenames, ProgressCallback progress_callback=nullptr)
 Reads a trajectory concatenated across multiple files.
Public Member Functions inherited from correlation::readers::IStructureReader
 IStructureReader ()=default
virtual ~IStructureReader ()=default
 IStructureReader (const IStructureReader &)=delete
IStructureReader & operator= (const IStructureReader &)=delete
 IStructureReader (IStructureReader &&)=delete
IStructureReader & operator= (IStructureReader &&)=delete
Public Member Functions inherited from correlation::readers::ITrajectoryReader
 ITrajectoryReader ()=default
virtual ~ITrajectoryReader ()=default
 ITrajectoryReader (const ITrajectoryReader &)=delete
ITrajectoryReader & operator= (const ITrajectoryReader &)=delete
 ITrajectoryReader (ITrajectoryReader &&)=delete
ITrajectoryReader & operator= (ITrajectoryReader &&)=delete

Static Public Member Functions

static correlation::core::Cell read (const std::string &file_name)
 Low-level parser for the specific file format.

Detailed Description

Reads a Materials Studio .car file and returns a correlation::core::Cell object.

Member Function Documentation

◆ getExtensions()

std::vector< std::string > correlation::readers::CarReader::getExtensions ( ) const
inlineoverridevirtual

Returns a list of supported file extensions.

Returns
A vector of strings containing extensions (e.g. {".cif", ".ext"}).

Implements correlation::readers::BaseReader.

◆ getName()

std::string correlation::readers::CarReader::getName ( ) const
inlineoverridevirtual

Returns the display name of the format.

Returns
A string representing the format name (e.g. "LAMMPS Dump", "CIF").

Implements correlation::readers::BaseReader.

◆ isTrajectory()

bool correlation::readers::CarReader::isTrajectory ( ) const
inlineoverridevirtual

Returns true if this reader supports trajectory files.

Returns
True if the format can store multiple time steps.

Implements correlation::readers::BaseReader.

◆ read()

correlation::core::Cell correlation::readers::CarReader::read ( const std::string & file_name)
static

Low-level parser for the specific file format.

Parameters
file_namePath to the source file.
Returns
The parsed simulation cell.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readStructure()

correlation::core::Cell correlation::readers::CarReader::readStructure ( const std::string & filename,
std::function< void(float, const std::string &)> progress_callback = nullptr )
overridevirtual

Reads an atomic structure from a file.

Parameters
[in]filenamePath to the file to be read.
[in]progress_callbackOptional callback to report progress [0.0, 1.0].
Returns
A Cell object containing the loaded structure.

Implements correlation::readers::BaseReader.

Here is the call graph for this function:

◆ readTrajectory()

correlation::core::Trajectory correlation::readers::CarReader::readTrajectory ( const std::string & filename,
std::function< void(float, const std::string &)> progress_callback = nullptr )
overridevirtual

Reads a trajectory from a file.

Parameters
[in]filenamePath to the file to be read.
[in]progress_callbackOptional callback to report progress [0.0, 1.0].
Returns
A Trajectory object containing all loaded frames.

Implements correlation::readers::BaseReader.


The documentation for this class was generated from the following files: