votca 2024.2-dev
Loading...
Searching...
No Matches
votca::csg::DLPOLYTopologyReader Class Reference

class for reading dlpoly topology files More...

#include <dlpolytopologyreader.h>

Inheritance diagram for votca::csg::DLPOLYTopologyReader:
Collaboration diagram for votca::csg::DLPOLYTopologyReader:

Public Member Functions

 DLPOLYTopologyReader ()=default
 
bool ReadTopology (std::string file, Topology &top) override
 read a topology file
 
void setFname (std::string name)
 set the topology file name: name.dlpf (convention: ".dlpf"="FIELD")
 
std::string getFname ()
 get the topology file name: name.dlpf (convention: ".dlpf"="FIELD")
 
- Public Member Functions inherited from votca::csg::TopologyReader
virtual ~TopologyReader ()=default
 

Public Attributes

const tools::DistanceUnit distance_unit = tools::DistanceUnit::angstroms
 Set default units.
 
const tools::MassUnit mass_unit = tools::MassUnit::atomic_mass_units
 
const tools::TimeUnit time_unit = tools::TimeUnit::picoseconds
 
const tools::ChargeUnit charge_unit = tools::ChargeUnit::e
 
const tools::MolarEnergyUnit molar_energy_unit
 
const tools::VelocityUnit velocity_unit
 
const tools::MolarForceUnit force_unit
 

Private Member Functions

std::string NextKeyline_ (std::ifstream &fs, const char *wspace)
 
std::string NextKeyInt_ (std::ifstream &fs, const char *wspace, const std::string &word, Index &ival)
 
bool isKeyInt_ (const std::string &line, const char *wspace, const std::string &word, Index &ival)
 

Private Attributes

std::string fname_
 

Additional Inherited Members

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

Detailed Description

class for reading dlpoly topology files

This class encapsulates the dlpoly topology reading functions and provides an interface to fill a topolgy class

Definition at line 42 of file dlpolytopologyreader.h.

Constructor & Destructor Documentation

◆ DLPOLYTopologyReader()

votca::csg::DLPOLYTopologyReader::DLPOLYTopologyReader ( )
default

Member Function Documentation

◆ getFname()

std::string votca::csg::DLPOLYTopologyReader::getFname ( )
inline

get the topology file name: name.dlpf (convention: ".dlpf"="FIELD")

Definition at line 66 of file dlpolytopologyreader.h.

◆ isKeyInt_()

bool votca::csg::DLPOLYTopologyReader::isKeyInt_ ( const std::string & line,
const char * wspace,
const std::string & word,
Index & ival )
private

function to check if the given (last read) directive line starts with a given keyword and has an integer value at the end

Definition at line 101 of file dlpolytopologyreader.cc.

◆ NextKeyInt_()

string votca::csg::DLPOLYTopologyReader::NextKeyInt_ ( std::ifstream & fs,
const char * wspace,
const std::string & word,
Index & ival )
private

function to read the next line containing only a given keyword and an integer value after it (only skipping comments!)

Definition at line 67 of file dlpolytopologyreader.cc.

◆ NextKeyline_()

string votca::csg::DLPOLYTopologyReader::NextKeyline_ ( std::ifstream & fs,
const char * wspace )
private

function to find and read the next line starting with a keyword/directive (skipping comments starting with "#" or ";")

Definition at line 44 of file dlpolytopologyreader.cc.

◆ ReadTopology()

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

read a topology file

Implements votca::csg::TopologyReader.

Definition at line 143 of file dlpolytopologyreader.cc.

◆ setFname()

void votca::csg::DLPOLYTopologyReader::setFname ( std::string name)
inline

set the topology file name: name.dlpf (convention: ".dlpf"="FIELD")

Definition at line 61 of file dlpolytopologyreader.h.

Member Data Documentation

◆ charge_unit

const tools::ChargeUnit votca::csg::DLPOLYTopologyReader::charge_unit = tools::ChargeUnit::e

Definition at line 50 of file dlpolytopologyreader.h.

◆ distance_unit

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

Set default units.

Definition at line 47 of file dlpolytopologyreader.h.

◆ fname_

std::string votca::csg::DLPOLYTopologyReader::fname_
private

Definition at line 69 of file dlpolytopologyreader.h.

◆ force_unit

const tools::MolarForceUnit votca::csg::DLPOLYTopologyReader::force_unit
Initial value:

Definition at line 55 of file dlpolytopologyreader.h.

◆ mass_unit

const tools::MassUnit votca::csg::DLPOLYTopologyReader::mass_unit = tools::MassUnit::atomic_mass_units

Definition at line 48 of file dlpolytopologyreader.h.

◆ molar_energy_unit

const tools::MolarEnergyUnit votca::csg::DLPOLYTopologyReader::molar_energy_unit
Initial value:

Definition at line 51 of file dlpolytopologyreader.h.

◆ time_unit

const tools::TimeUnit votca::csg::DLPOLYTopologyReader::time_unit = tools::TimeUnit::picoseconds

Definition at line 49 of file dlpolytopologyreader.h.

◆ velocity_unit

const tools::VelocityUnit votca::csg::DLPOLYTopologyReader::velocity_unit
Initial value:

Definition at line 53 of file dlpolytopologyreader.h.


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