votca 2024-dev
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
votca::csg::XYZReader Class Reference

class for reading xyz files More...

#include <xyzreader.h>

Inheritance diagram for votca::csg::XYZReader:
Inheritance graph
[legend]
Collaboration diagram for votca::csg::XYZReader:
Collaboration graph
[legend]

Public Member Functions

 XYZReader ()=default
 
 ~XYZReader () override=default
 
bool ReadTopology (std::string file, Topology &top) override
 open a topology file
 
bool Open (const std::string &file) override
 open a trajectory file
 
bool FirstFrame (Topology &top) override
 read in the first frame
 
bool NextFrame (Topology &top) override
 read in the next frame
 
template<class T >
void ReadFile (T &container)
 
void Close () override
 
- Public Member Functions inherited from votca::csg::TrajectoryReader
virtual ~TrajectoryReader ()=default
 
virtual bool Open (const std::string &file)=0
 open a trejectory file
 
virtual void Close ()
 
virtual bool FirstFrame (Topology &top)=0
 read in the first frame
 
virtual bool NextFrame (Topology &top)=0
 read in the next frame
 
- Public Member Functions inherited from votca::csg::TopologyReader
virtual ~TopologyReader ()=default
 
virtual bool ReadTopology (std::string file, Topology &top)=0
 open, read and close topology file
 

Public Attributes

const tools::DistanceUnit distance_unit = tools::DistanceUnit::angstroms
 

Private Member Functions

template<class T >
Index getContainerSize (T &container)
 
Index getContainerSize (Topology &container)
 
template<bool topology, class T >
void AddAtom (T &container, std::string name, Index id, const Eigen::Vector3d &pos)
 
template<bool topology, class T >
void AddAtom (Topology &container, std::string name, Index id, const Eigen::Vector3d &pos)
 
template<bool topology, class T >
bool ReadFrame (T &container)
 

Private Attributes

std::ifstream fl_
 
std::string file_
 
Index line_
 

Additional Inherited Members

- Static Public Member Functions inherited from votca::csg::TrajectoryReader
static void RegisterPlugins (void)
 
- Static Public Member Functions inherited from votca::csg::TopologyReader
static void RegisterPlugins (void)
 

Detailed Description

class for reading xyz files

This class provides the TrajectoryReader + Topology reader interface for xyz files

Definition at line 46 of file xyzreader.h.

Constructor & Destructor Documentation

◆ XYZReader()

votca::csg::XYZReader::XYZReader ( )
default

◆ ~XYZReader()

votca::csg::XYZReader::~XYZReader ( )
overridedefault

Member Function Documentation

◆ AddAtom() [1/2]

template<bool topology, class T >
void votca::csg::XYZReader::AddAtom ( T &  container,
std::string  name,
Index  id,
const Eigen::Vector3d &  pos 
)
inlineprivate

Definition at line 81 of file xyzreader.h.

◆ AddAtom() [2/2]

template<bool topology, class T >
void votca::csg::XYZReader::AddAtom ( Topology container,
std::string  name,
Index  id,
const Eigen::Vector3d &  pos 
)
inlineprivate

Definition at line 91 of file xyzreader.h.

◆ Close()

void votca::csg::XYZReader::Close ( )
overridevirtual

Reimplemented from votca::csg::TrajectoryReader.

Definition at line 62 of file xyzreader.cc.

◆ FirstFrame()

bool votca::csg::XYZReader::FirstFrame ( Topology top)
overridevirtual

read in the first frame

Implements votca::csg::TrajectoryReader.

Definition at line 64 of file xyzreader.cc.

◆ getContainerSize() [1/2]

template<class T >
Index votca::csg::XYZReader::getContainerSize ( T &  container)
inlineprivate

Definition at line 74 of file xyzreader.h.

◆ getContainerSize() [2/2]

Index votca::csg::XYZReader::getContainerSize ( Topology container)
inlineprivate

Definition at line 78 of file xyzreader.h.

◆ NextFrame()

bool votca::csg::XYZReader::NextFrame ( Topology top)
overridevirtual

read in the next frame

Implements votca::csg::TrajectoryReader.

Definition at line 66 of file xyzreader.cc.

◆ Open()

bool votca::csg::XYZReader::Open ( const std::string &  file)
overridevirtual

open a trajectory file

Implements votca::csg::TrajectoryReader.

Definition at line 52 of file xyzreader.cc.

◆ ReadFile()

template<class T >
void votca::csg::XYZReader::ReadFile ( T &  container)
inline

Definition at line 64 of file xyzreader.h.

◆ ReadFrame()

template<bool topology, class T >
bool votca::csg::XYZReader::ReadFrame ( T &  container)
inlineprivate

Definition at line 114 of file xyzreader.h.

◆ ReadTopology()

bool votca::csg::XYZReader::ReadTopology ( std::string  file,
Topology top 
)
overridevirtual

open a topology file

Implements votca::csg::TopologyReader.

Definition at line 35 of file xyzreader.cc.

Member Data Documentation

◆ distance_unit

const tools::DistanceUnit votca::csg::XYZReader::distance_unit = tools::DistanceUnit::angstroms

Definition at line 48 of file xyzreader.h.

◆ file_

std::string votca::csg::XYZReader::file_
private

Definition at line 109 of file xyzreader.h.

◆ fl_

std::ifstream votca::csg::XYZReader::fl_
private

Definition at line 108 of file xyzreader.h.

◆ line_

Index votca::csg::XYZReader::line_
private

Definition at line 110 of file xyzreader.h.


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