MTK++ Latest version: 0.2.0

Public Member Functions | Protected Attributes
MTKpp::zmatParser Class Reference

Reads and writes z-matrix format files. More...

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

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

List of all members.

Public Member Functions

 zmatParser ()
 zmatParser Constructor
 ~zmatParser ()
 zmatParser Destructor
int genZmatrix (molecule *pMolecule, std::vector< std::vector< std::string > > &zmatrix, std::map< std::string, double > &zmatData, std::map< int, int > &atomMap)
 Generates Z-matrix.
void Read (const std::string &i, collection *c, std::vector< std::vector< std::string > > &zmatrix, std::map< std::string, double > &zmatData)
 Read zmatrix formatted file.
void Write (const std::string &o, molecule *m)
 Write zmatrix formatted input file.
void Write (const std::string &o, molecule *m, std::vector< vector3d > &coordinates)
 Write zmatrix formatted input file.
void Write (const std::string &o, collection *c, const int &molID)
 Write zmatrix formatted input file.
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 Attributes

std::ofstream outputFileStream
 Output File Stream.
bool bError
 Error occured.
std::string errorMessage
 Error message.
unsigned int NUM_INDENTS_PER_SPACE

Detailed Description

Reads and writes z-matrix format files.

Author:
Martin Peters
Version:
0.1
Date:
2006

Constructor & Destructor Documentation

MTKpp::zmatParser::zmatParser ( )

zmatParser Constructor

MTKpp::zmatParser::~zmatParser ( )

zmatParser Destructor


Member Function Documentation

int MTKpp::zmatParser::genZmatrix ( molecule pMolecule,
std::vector< std::vector< std::string > > &  zmatrix,
std::map< std::string, double > &  zmatData,
std::map< int, int > &  atomMap 
)

Generates Z-matrix.

Parameters:
pMoleculemolecule pointer
zmatrixsee below
zmatDatasee below
atomMapA map between the old atom ordering and the new

zmatrix:

  1. [[symbol, bondIndex, bondName, angleIndex, angleName, torsionIndex, torsionName]]

zmatrix data:

  1. [bondName:size, angleName:size, torsionName:size]

References MTKpp::vector3d::dist(), MTKpp::molecule::getAngle(), MTKpp::molecule::getAtomList(), MTKpp::molecule::getBond(), MTKpp::atom::getBondedAtoms(), MTKpp::atom::getCoords(), MTKpp::atom::getElement(), MTKpp::atom::getIndex(), MTKpp::molecule::getTorsion(), MTKpp::RAD2DEG, and MTKpp::element::symbol.

Referenced by MTKpp::gaussianParser::generateZMatrix().

void MTKpp::zmatParser::Read ( const std::string &  i,
collection c,
std::vector< std::vector< std::string > > &  zmatrix,
std::map< std::string, double > &  zmatData 
)
void MTKpp::zmatParser::Write ( const std::string &  o,
molecule m 
)

Write zmatrix formatted input file.

Parameters:
oOutput file
mmolecule pointer
void MTKpp::zmatParser::Write ( const std::string &  o,
molecule m,
std::vector< vector3d > &  coordinates 
)

Write zmatrix formatted input file.

Parameters:
oOutput file
mmolecule pointer
coordinatesVector of coordinates which overrides the molecules coordinates
void MTKpp::zmatParser::Write ( const std::string &  o,
collection c,
const int &  molID 
)

Write zmatrix formatted input file.

Parameters:
oOutput file
ccollection pointer
molIDThe ID of the molecule in the collection

References MTKpp::molecule::getCoordinates(), MTKpp::collection::getMolecule(), and MTKpp::baseParser::Write().

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().


Member Data Documentation

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:58 for MTK++ by Doxygen 1.7.5.1