MTK++ Latest version: 0.2.0

Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
MTKpp::mtkppParser Class Reference

Reads and writes MTK++ State xml files. More...

#include <mtkpp/src/Parsers/mtkppParser.h>

Inheritance diagram for MTKpp::mtkppParser:
Inheritance graph
[legend]
Collaboration diagram for MTKpp::mtkppParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 mtkppParser ()
 mtkppParser Constructor
virtual ~mtkppParser ()
 mtkppParser Destructor
void Read (const std::string &i, collection *c)
 Read MTK++ xml file.
void Write (const std::string &o, collection *c)
 Write MTK++ xml file.
void readMolecule (TiXmlNode *molNode, molecule *mol)
 Read molecule.
virtual void Read ()
 Read function.
virtual void Write ()
 Write function.
std::ofstream & OpenFile (std::string fileName)
 Write function.
std::string determineElement (std::string &name)
 Preceive element symbol from the atom name.
void setError (int i)
 Error handling within Parsers.
bool getError ()
 Error handling within dcParser.
void setErrorMessage (std::string s)
 Error handling within Parsers.
std::string getErrorMessage ()
 Error handling within Parsers.

Protected Types

typedef std::vector< molecule * >
::iterator 
moleculeIterator
 molecule iterator
typedef std::vector
< submolecule * >::iterator 
submoleculeIterator
 submolecule iterator
typedef std::vector< atom * >
::iterator 
atomIterator
 atom iterator
typedef std::map< int, Bond * >
::iterator 
BondMapIterator
 Bond map iterator.
typedef std::map< ULONG_KIND,
Angle * >::iterator 
AngleMapIterator
 Angle map iterator.
typedef std::map< ULONG_KIND,
Torsion * >::iterator 
TorsionMapIterator
 Torsion map iterator.
typedef std::map< int,
Improper * >::iterator 
ImproperMapIterator
 Improper map iterator.
typedef std::map< std::string,
double >::iterator 
PropertyMapIterator
 property map iterator
typedef std::map< std::string,
int >::iterator 
intPropertyMapIterator
 property map iterator

Protected Member Functions

void readSubmolecule (TiXmlNode *smolNode, molecule *mol)
 Read submolecule.
void readAtom (TiXmlNode *atomNode, submolecule *subMol)
 Read atom.
void readBond (TiXmlNode *bondNode, molecule *mol)
 Read bond.
void readAngle (TiXmlNode *angleNode, molecule *mol)
 Read angle.
void readTorsion (TiXmlNode *torNode, molecule *mol)
 Read angle.
void writeMolecule (TiXmlElement *root, molecule *mol)
 Write molecule.
void writeSubMolecule (TiXmlElement *root, submolecule *smol)
 Write submolecule.
void writeAtom (TiXmlElement *root, submolecule *smol, atom *at)
 Write atom.
void writeMetalCenter (TiXmlElement *root, metalCenter *pMetalCenter)
 Write metal center.
void writeBonds (TiXmlElement *root, std::map< int, Bond * > bonds)
 Write bonds.
void writeAngles (TiXmlElement *root, std::map< ULONG_KIND, Angle * > angles)
 Write angles.
void writeTorsions (TiXmlElement *root, std::map< ULONG_KIND, Torsion * > torsions)
 Write angles.

Protected Attributes

collectionpCollection
 collection pointer
atompAtom
 atom pointer
atompAtom1
 atom pointer
atompAtom2
 atom pointer
BondpBond
 Bond pointer.
AnglepAngle
 Angle pointer.
TorsionpTorsion
 Torsion pointer.
ImproperpImproper
 Improper pointer.
vector3dpCoord1
 coordinate pointer
vector3dpCoord2
 coordinate pointer
std::ofstream outputFileStream
 Output File Stream.
bool bError
 Error occured.
std::string errorMessage
 Error message.
unsigned int NUM_INDENTS_PER_SPACE

Friends

class stdLibParser

Detailed Description

Reads and writes MTK++ State xml files.

Author:
Martin Peters

Member Typedef Documentation

typedef std::vector<molecule*>::iterator MTKpp::mtkppParser::moleculeIterator [protected]

molecule iterator

typedef std::vector<submolecule*>::iterator MTKpp::mtkppParser::submoleculeIterator [protected]

submolecule iterator

typedef std::vector<atom*>::iterator MTKpp::mtkppParser::atomIterator [protected]

atom iterator

typedef std::map<int, Bond*>::iterator MTKpp::mtkppParser::BondMapIterator [protected]

Bond map iterator.

typedef std::map<ULONG_KIND, Angle*>::iterator MTKpp::mtkppParser::AngleMapIterator [protected]

Angle map iterator.

typedef std::map<ULONG_KIND, Torsion*>::iterator MTKpp::mtkppParser::TorsionMapIterator [protected]

Torsion map iterator.

typedef std::map<int, Improper*>::iterator MTKpp::mtkppParser::ImproperMapIterator [protected]

Improper map iterator.

typedef std::map<std::string, double>::iterator MTKpp::mtkppParser::PropertyMapIterator [protected]

property map iterator

typedef std::map<std::string, int>::iterator MTKpp::mtkppParser::intPropertyMapIterator [protected]

property map iterator


Constructor & Destructor Documentation

MTKpp::mtkppParser::mtkppParser ( )

mtkppParser Constructor

MTKpp::mtkppParser::~mtkppParser ( ) [virtual]

mtkppParser Destructor


Member Function Documentation

void MTKpp::mtkppParser::Read ( const std::string &  i,
collection c 
)

Read MTK++ xml file.

Parameters:
iinput file
ccollection pointer
void MTKpp::mtkppParser::Write ( const std::string &  o,
collection c 
)

Write MTK++ xml file.

Parameters:
ooutput file
ccollection pointer

Referenced by main().

void MTKpp::mtkppParser::readMolecule ( TiXmlNode molNode,
molecule mol 
)

Read molecule.

Parameters:
nodedom node
molmolecule
void MTKpp::mtkppParser::readSubmolecule ( TiXmlNode smolNode,
molecule mol 
) [protected]

Read submolecule.

Parameters:
nodedom node
molmolecule
void MTKpp::mtkppParser::readAtom ( TiXmlNode atomNode,
submolecule subMol 
) [protected]

Read atom.

Parameters:
nodedom node
molmolecule
void MTKpp::mtkppParser::readBond ( TiXmlNode bondNode,
molecule mol 
) [protected]

Read bond.

Parameters:
nodedom node
molmolecule
void MTKpp::mtkppParser::readAngle ( TiXmlNode angleNode,
molecule mol 
) [protected]

Read angle.

Parameters:
nodedom node
molmolecule
void MTKpp::mtkppParser::readTorsion ( TiXmlNode torNode,
molecule mol 
) [protected]

Read angle.

Parameters:
nodedom node
molmolecule
void MTKpp::mtkppParser::writeMolecule ( TiXmlElement root,
molecule mol 
) [protected]

Write molecule.

Parameters:
rootTiXmlElement object
molmolecule
void MTKpp::mtkppParser::writeSubMolecule ( TiXmlElement root,
submolecule smol 
) [protected]

Write submolecule.

Parameters:
rootTiXmlElement object
molmolecule
void MTKpp::mtkppParser::writeAtom ( TiXmlElement root,
submolecule smol,
atom at 
) [protected]

Write atom.

Parameters:
rootTiXmlElement object
smolsubmolecule pointer
atatom pointer
void MTKpp::mtkppParser::writeMetalCenter ( TiXmlElement root,
metalCenter pMetalCenter 
) [protected]

Write metal center.

Parameters:
docdom document
pMetalCentermetal center pointer
void MTKpp::mtkppParser::writeBonds ( TiXmlElement root,
std::map< int, Bond * >  bonds 
) [protected]

Write bonds.

Parameters:
rootTiXmlElement object
bondsbond map
void MTKpp::mtkppParser::writeAngles ( TiXmlElement root,
std::map< ULONG_KIND, Angle * >  angles 
) [protected]

Write angles.

Parameters:
rootTiXmlElement object
anglesangle map
void MTKpp::mtkppParser::writeTorsions ( TiXmlElement root,
std::map< ULONG_KIND, Torsion * >  torsions 
) [protected]

Write angles.

Parameters:
rootTiXmlElement object
torsionstorsion map
void MTKpp::baseParser::Read ( ) [virtual, inherited]

Read function.

Referenced by MTKpp::acParser::Read(), and MTKpp::molParser::Read().

void MTKpp::baseParser::Write ( ) [virtual, inherited]
std::ofstream & MTKpp::baseParser::OpenFile ( std::string  fileName) [inherited]

Write function.

References MTKpp::baseParser::outputFileStream.

Referenced by main().

std::string MTKpp::baseParser::determineElement ( std::string &  name) [inherited]

Preceive element symbol from the atom name.

References MTKpp::GetAlphaChar(), and MTKpp::removeCharacter().

Referenced by MTKpp::pdbParser::Read(), and MTKpp::prepParser::readFragment().

void MTKpp::baseParser::setError ( int  i) [inline, inherited]
bool MTKpp::baseParser::getError ( ) [inline, inherited]

Error handling within dcParser.

Returns:
error

References MTKpp::baseParser::bError.

Referenced by main().

void MTKpp::baseParser::setErrorMessage ( std::string  s) [inline, inherited]
std::string MTKpp::baseParser::getErrorMessage ( ) [inline, inherited]

Error handling within Parsers.

Returns:
error message

References MTKpp::baseParser::errorMessage.

Referenced by main().


Friends And Related Function Documentation

friend class stdLibParser [friend]

Member Data Documentation

collection pointer

atom pointer

atom pointer

atom pointer

Bond pointer.

Angle pointer.

Torsion pointer.

Improper pointer.

coordinate pointer

coordinate pointer

std::ofstream MTKpp::baseParser::outputFileStream [protected, inherited]

Output File Stream.

Referenced by MTKpp::baseParser::OpenFile().

bool MTKpp::baseParser::bError [protected, inherited]
std::string MTKpp::baseParser::errorMessage [protected, inherited]
unsigned int MTKpp::baseParser::NUM_INDENTS_PER_SPACE [protected, inherited]

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

Generated on Fri Dec 23 2011 09:28:57 for MTK++ by Doxygen 1.7.5.1