MTK++ Latest version: 0.2.0

Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
MTKpp::pdbParser Class Reference

Reads and writes PDB format files. More...

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

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

List of all members.

Public Member Functions

 pdbParser ()
 pdbParser Constructor
 ~pdbParser ()
 pdbParser Destructor
void Read (const std::string &i, collection *c)
 Read PDB file.
void Read (const std::string &i, collection *c, molecule *m)
 Read PDB file.
void updateMolCoords (const std::string &i, molecule *m)
 Update coordinates of molecule from PDB file.
void Write (const std::string &o, molecule *m)
 Write PDB file.
void Write (const std::string &o, std::vector< molecule * > m)
 Write PDB file.
void Write (const std::string &o, collection *c)
 Write PDB file.
void Write (const std::string &o, collection *c, const double d)
 Write PDB file.
void Write (const std::string &o, molecule *m, std::vector< vector3d > &coordinates)
 Write PDB formatted file.
void Write (const std::string &o, metalCenter *m)
 Write PDB formatted file.
void Write (std::ostream &os, collection *c)
 Write PDB file.
double getTotalCharge ()
 Get Total charge.
bool hasTotalCharge ()
 Has total charge.
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.

Public Attributes

pdbInfoitsPdbInfo
double totalCharge
 Total charge on the chemical specie described by the pdb.
bool hasTotalChargeRemark

Protected Types

typedef std::vector< molecule * >
::iterator 
moleculeIterator
 molecule iterator
typedef std::vector< atom * >
::iterator 
atomIterator
 atom iterator
typedef std::multimap< atom
*, atom * > 
itsConectMMap_ptrs
 atom map used to generate CONECT info
typedef std::map< std::string,
std::string >::iterator 
nameMapIterator
 residue name map iterator

Protected Member Functions

void setInfo ()
 Create pdbInfo object.
std::string get1LCode (std::string s)
 Get the 1-Letter residue code.
std::string determineType (std::string s, std::string r, bool a, bool b)
 Get the type of the current atom.

Protected Attributes

collectionpCollection
 collection pointer
moleculepMolecule
 molecule pointer
submoleculepSubMolecule
 submolecule pointer
atompAtom
 atom pointer
atompAtom1
 atom pointer
atompAtom2
 atom pointer
BondpBond
 Bond pointer.
std::map< int, int > itsAtomMap
 internal atom mapping local to pdbParser
vector3dpCoord1
 coordinate pointer
vector3dpCoord2
 coordinate pointer
std::list< atom * > listConect_ptrs
 atom list used to generate CONECT info
std::map< std::string,
std::string > 
res21l
 Residue name to 1 letter code.
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 PDB format files.

Author:
Martin Peters
Duane Williams
Version:
0.1
Date:
2005

Member Typedef Documentation

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

molecule iterator

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

atom iterator

typedef std::multimap<atom*,atom*> MTKpp::pdbParser::itsConectMMap_ptrs [protected]

atom map used to generate CONECT info

typedef std::map<std::string, std::string>::iterator MTKpp::pdbParser::nameMapIterator [protected]

residue name map iterator


Constructor & Destructor Documentation

MTKpp::pdbParser::pdbParser ( )
MTKpp::pdbParser::~pdbParser ( )

pdbParser Destructor

References itsPdbInfo.


Member Function Documentation

void MTKpp::pdbParser::Read ( const std::string &  i,
collection c 
)
void MTKpp::pdbParser::Read ( const std::string &  i,
collection c,
molecule m 
)
void MTKpp::pdbParser::updateMolCoords ( const std::string &  i,
molecule m 
)

Update coordinates of molecule from PDB file.

Parameters:
iinput file
mmolecule pointer

References MTKpp::errorLogger, MTKpp::errorHandler::flush(), MTKpp::molecule::getAtom(), pAtom, and MTKpp::atom::setCoords().

Referenced by main().

void MTKpp::pdbParser::Write ( const std::string &  o,
molecule m 
)
void MTKpp::pdbParser::Write ( const std::string &  o,
std::vector< molecule * >  m 
)
void MTKpp::pdbParser::Write ( const std::string &  o,
collection c 
)
void MTKpp::pdbParser::Write ( const std::string &  o,
collection c,
const double  d 
)

Write PDB file.

Parameters:
ooutput file
ccollection pointer
dd?
void MTKpp::pdbParser::Write ( const std::string &  o,
molecule m,
std::vector< vector3d > &  coordinates 
)
void MTKpp::pdbParser::Write ( const std::string &  o,
metalCenter m 
)
void MTKpp::pdbParser::Write ( std::ostream &  os,
collection c 
)
double MTKpp::pdbParser::getTotalCharge ( ) [inline]

Get Total charge.

References totalCharge.

bool MTKpp::pdbParser::hasTotalCharge ( ) [inline]

Has total charge.

References hasTotalChargeRemark.

void MTKpp::pdbParser::setInfo ( ) [protected]

Create pdbInfo object.

References MTKpp::pdbInfo::expTechnique, itsPdbInfo, and MTKpp::pdbInfo::resolution.

Referenced by pdbParser(), and Read().

std::string MTKpp::pdbParser::get1LCode ( std::string  s) [protected]

Get the 1-Letter residue code.

Parameters:
s3-Letter code
Returns:
1-Letter code

References MTKpp::errorLogger, res21l, MTKpp::errorHandler::throwError(), and MTKpp::WARNING.

Referenced by Read().

std::string MTKpp::pdbParser::determineType ( std::string  s,
std::string  r,
bool  a,
bool  b 
) [protected]

Get the type of the current atom.

  • Pro -- All protein atoms
  • Met -- Zn, Ca atoms
  • Wat -- Water atom
  • Lig -- Ligand atoms
    Parameters:
    satom name
    rresidue name
    aatom bool
    bhetatm bool
    Returns:
    atom type

Referenced by Read().

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 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

Total charge on the chemical specie described by the pdb.

Referenced by getTotalCharge(), and Read().

Referenced by hasTotalCharge(), and Read().

collection pointer

molecule pointer

Referenced by Read(), and Write().

submolecule pointer

Referenced by Read(), and Write().

atom pointer

Referenced by Read(), updateMolCoords(), and Write().

atom pointer

atom pointer

Bond pointer.

std::map<int, int> MTKpp::pdbParser::itsAtomMap [protected]

internal atom mapping local to pdbParser

coordinate pointer

coordinate pointer

std::list<atom*> MTKpp::pdbParser::listConect_ptrs [protected]

atom list used to generate CONECT info

std::map<std::string, std::string> MTKpp::pdbParser::res21l [protected]

Residue name to 1 letter code.

Referenced by get1LCode(), and pdbParser().

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