MTK++ Latest version: 0.2.0

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

Container for atoms and bonds. More...

#include <mtkpp/src/Molecule/submolecule.h>

Collaboration diagram for MTKpp::submolecule:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 submolecule (molecule *parent=0)
 submolecule Constructor
virtual ~submolecule ()
 submolecule Destructor
void copy (submolecule *pSubMol)
 Copy contents of pSubMol in this submolecule.
moleculegetParent ()
 Get molecule which submolecule is apart of.
virtual atomaddAtom ()
 Add atom to the submolecule.
virtual atomaddAtom (atom *pAt)
 Copy atom into the submolecule.
virtual BondaddBond (atom *a, atom *b)
 Add a Bond between a and b.
void setName (const std::string &name)
 Set name of submolecule.
void set1LName (const std::string &name)
 Set 1-Letter name of submolecule.
std::string getName ()
 Get name of submolecule.
std::string get1LName ()
 Get 1-Letter name of submolecule.
void setIndex (const int &i)
 Set index of submolecule.
int getIndex ()
 Get index of submolecule.
void setSubMolId (const int &id)
 Set id of submolecule.
int getSubMolId ()
 Get id of submolecule.
void setColIndex (const int &id)
 Set collection index of submolecule.
int getColIndex ()
 Get collection index of submolecule.
void setiCode (const std::string &i)
 Set icode of submolecule.
std::string getiCode ()
 Get icode of submolecule.
void setNumAtoms (const int &n)
 Set the number of atoms in submolecule.
int getNumAtoms ()
 Get number of atoms in the submolecule.
void setNumBonds (const int &n)
 Set the number of bonds in submolecule.
int getNumBonds ()
 Get number of bonds in the submolecule.
void setStdFrag (stdFrag *f)
 Set the standard fragment for this submolecule.
stdFraggetStdFrag ()
 Get standard fragment associated with this submolecule.
bool hasStdFrag ()
 Has a standard fragment.
std::vector< atom * > getAtomList ()
 Get all atoms in submolecule.
std::vector< Bond * > getBondList ()
 Get all bonds in submolecule.
atomgetAtom (int i)
 Get an atom in submolecule.
atomgetAtom (const std::string &name)
 Get an atom in submolecule.
atomgetAtom (stdAtom *pStdAtom)
 Get atom.
void centerOfMass ()
 Calculate the center of mass.
vector3dgetCenterOfMass ()
 Get the center of mass.
int numHeavyAtoms ()
 Get number of stdAtoms in fragment.
double getMolecularWeight ()
 Get Molecular Weight.
void print ()
 Print submolecule details to screen.

Static Public Member Functions

static bool less (submolecule *lhs, submolecule *rhs)
 Compares two submolecule based on collection index.
static bool greater (submolecule *lhs, submolecule *rhs)
 Compares two submolecule based on collection index.

Protected Types

typedef std::vector< atom * >
::iterator 
AtomIterator
 atom iterator

Protected Attributes

moleculepParent
 submolecules' molecule
std::string itsName
 submolecule name
std::string its1LName
 submolecule name
std::string itsiCode
 iCode from pdb file
int itsColIndex
 Collection index.
int itsIndex
 Molecule index.
int itsSubMolId
 submolecule internal id
int itsNumAtoms
 number of atoms
int itsNumBonds
 number of bonds
vector3dpCenterMass
std::vector< atom * > itsAtomList
 list of atoms in submolecule
std::vector< Bond * > itsBondList
 list of bonds in submolecule
atompAtom
 atom pointer
BondpBond
 Bond pointer.
stdFragpStdFrag
 standard fragment pointer

Friends

class molecule

Detailed Description

Container for atoms and bonds.

Author:
Martin Peters
Version:
0.1
Date:
2005

Member Typedef Documentation

typedef std::vector<atom*>::iterator MTKpp::submolecule::AtomIterator [protected]

atom iterator


Constructor & Destructor Documentation

MTKpp::submolecule::submolecule ( molecule parent = 0)

submolecule Constructor

Parameters:
parentmolecule pointer

References its1LName, itsColIndex, itsiCode, itsIndex, itsName, itsNumAtoms, itsNumBonds, itsSubMolId, pAtom, pBond, pCenterMass, and pStdFrag.

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

submolecule Destructor

References itsAtomList, and pAtom.


Member Function Documentation

static bool MTKpp::submolecule::less ( submolecule lhs,
submolecule rhs 
) [inline, static]

Compares two submolecule based on collection index.

Parameters:
lhsfirst idObject
rhsSecond idObject
Returns:
boolean

After this function is defined the STL sort() function can be used

References getColIndex().

Referenced by main().

static bool MTKpp::submolecule::greater ( submolecule lhs,
submolecule rhs 
) [inline, static]

Compares two submolecule based on collection index.

Parameters:
lhsfirst idObject
rhsSecond idObject
Returns:
boolean

After this function is defined the STL sort() function can be used

References getColIndex().

void MTKpp::submolecule::copy ( submolecule pSubMol)
molecule * MTKpp::submolecule::getParent ( )
atom * MTKpp::submolecule::addAtom ( ) [virtual]
atom * MTKpp::submolecule::addAtom ( atom pAt) [virtual]
Bond * MTKpp::submolecule::addBond ( atom a,
atom b 
) [virtual]

Add a Bond between a and b.

Parameters:
aatom pointer 1
batom pointer 2
Returns:
Bond pointer

References MTKpp::Bond::atom1, MTKpp::Bond::atom2, itsBondList, pBond, MTKpp::Bond::stereo, MTKpp::Bond::topology, and MTKpp::Bond::type.

void MTKpp::submolecule::setName ( const std::string &  name)
void MTKpp::submolecule::set1LName ( const std::string &  name)

Set 1-Letter name of submolecule.

Parameters:
namesubmolecule 1-Letter name

References its1LName.

Referenced by MTKpp::mol2Parser::buildupSubmolecule(), and MTKpp::pdbParser::Read().

std::string MTKpp::submolecule::getName ( )
std::string MTKpp::submolecule::get1LName ( )

Get 1-Letter name of submolecule.

Returns:
submolecule 1-Letter name

References its1LName.

Referenced by MTKpp::molecule::getRes1LSymbols(), and main().

void MTKpp::submolecule::setIndex ( const int &  i)

Set index of submolecule.

Parameters:
isubmolecule index

References itsIndex.

Referenced by MTKpp::molecule::addSubMolecule(), MTKpp::mol2Parser::buildupSubmolecule(), and copy().

int MTKpp::submolecule::getIndex ( )

Get index of submolecule.

Returns:
submolecule index

References itsIndex.

Referenced by copy(), and MTKpp::molecule::getSubMolecule().

void MTKpp::submolecule::setSubMolId ( const int &  id)
int MTKpp::submolecule::getSubMolId ( )
void MTKpp::submolecule::setColIndex ( const int &  id)

Set collection index of submolecule.

Parameters:
idsubmolecule collection index

References itsColIndex.

Referenced by MTKpp::molecule::addSubMolecule().

int MTKpp::submolecule::getColIndex ( )

Get collection index of submolecule.

Returns:
submolecule collection index

References itsColIndex.

Referenced by greater(), less(), and main().

void MTKpp::submolecule::setiCode ( const std::string &  i)

Set icode of submolecule.

Parameters:
isubmolecule icode

References itsiCode.

Referenced by copy(), and MTKpp::pdbParser::Read().

std::string MTKpp::submolecule::getiCode ( )

Get icode of submolecule.

Returns:
submolecule icode

References itsiCode.

Referenced by copy(), and MTKpp::pdbParser::Write().

void MTKpp::submolecule::setNumAtoms ( const int &  n)

Set the number of atoms in submolecule.

Parameters:
nnumber of atoms

References itsNumAtoms.

Referenced by MTKpp::molParser::Read().

int MTKpp::submolecule::getNumAtoms ( )

Get number of atoms in the submolecule.

Returns:
number of atoms in submolecule

References itsAtomList.

Referenced by MTKpp::ligProtonate::addHydrogens().

void MTKpp::submolecule::setNumBonds ( const int &  n)

Set the number of bonds in submolecule.

Parameters:
nnumber of bonds

References itsNumBonds.

Referenced by MTKpp::molParser::Read().

int MTKpp::submolecule::getNumBonds ( )

Get number of bonds in the submolecule.

Returns:
number of bonds in submolecule

References itsNumBonds.

void MTKpp::submolecule::setStdFrag ( stdFrag f)

Set the standard fragment for this submolecule.

Parameters:
fstandard fragment (stdFrag) pointer

References pStdFrag.

Referenced by MTKpp::atomTyper::atomTypeByLib(), and copy().

stdFrag * MTKpp::submolecule::getStdFrag ( )
bool MTKpp::submolecule::hasStdFrag ( )

Has a standard fragment.

Returns:
boolean

References pStdFrag.

Referenced by MTKpp::molecule::getStdCharge().

std::vector< atom * > MTKpp::submolecule::getAtomList ( )
std::vector< Bond * > MTKpp::submolecule::getBondList ( )

Get all bonds in submolecule.

Returns:
list to bonds

References itsBondList.

atom * MTKpp::submolecule::getAtom ( int  i)
atom * MTKpp::submolecule::getAtom ( const std::string &  name)

Get an atom in submolecule.

Parameters:
nameatom name
Returns:
atom pointer

References MTKpp::atom::getName(), itsAtomList, and pAtom.

atom * MTKpp::submolecule::getAtom ( stdAtom pStdAtom)

Get atom.

Parameters:
pStdAtomstandard atom pointer
Returns:
atom pointer

References MTKpp::atom::getStdAtom(), itsAtomList, and pAtom.

void MTKpp::submolecule::centerOfMass ( )

Calculate the center of mass.

References getAtomList(), MTKpp::atom::getCoords(), pAtom, and pCenterMass.

Referenced by getCenterOfMass(), and MTKpp::molecule::getNumMMnonBondedPairs().

vector3d * MTKpp::submolecule::getCenterOfMass ( )

Get the center of mass.

References centerOfMass(), and pCenterMass.

int MTKpp::submolecule::numHeavyAtoms ( )

Get number of stdAtoms in fragment.

Returns:
number of stdAtoms

References getAtomList(), MTKpp::atom::getElementSymbol(), and pAtom.

Referenced by MTKpp::protonate::buildMissingHeavyAtoms(), and MTKpp::protonate::runMol().

double MTKpp::submolecule::getMolecularWeight ( )

Get Molecular Weight.

Returns:
molecular weight

References MTKpp::atom::getAtomicMass(), getAtomList(), and pAtom.

Referenced by MTKpp::molecule::getMolecularWeight().

void MTKpp::submolecule::print ( )

Print submolecule details to screen.

References getAtomList(), getName(), MTKpp::atom::getName(), and pAtom.


Friends And Related Function Documentation

friend class molecule [friend]

Member Data Documentation

submolecules' molecule

Referenced by addAtom(), and getParent().

std::string MTKpp::submolecule::itsName [protected]

submolecule name

Referenced by getName(), setName(), and submolecule().

std::string MTKpp::submolecule::its1LName [protected]

submolecule name

Referenced by get1LName(), set1LName(), and submolecule().

std::string MTKpp::submolecule::itsiCode [protected]

iCode from pdb file

Referenced by getiCode(), setiCode(), and submolecule().

Collection index.

Referenced by getColIndex(), setColIndex(), and submolecule().

Molecule index.

Referenced by getIndex(), setIndex(), and submolecule().

submolecule internal id

Referenced by getSubMolId(), setSubMolId(), and submolecule().

number of atoms

Referenced by setNumAtoms(), and submolecule().

number of bonds

Referenced by getNumBonds(), setNumBonds(), and submolecule().

std::vector<atom*> MTKpp::submolecule::itsAtomList [protected]

list of atoms in submolecule

Referenced by addAtom(), MTKpp::molecule::delAtom(), getAtom(), getAtomList(), getNumAtoms(), and ~submolecule().

std::vector<Bond*> MTKpp::submolecule::itsBondList [protected]

list of bonds in submolecule

Referenced by addBond(), and getBondList().

Bond pointer.

Referenced by addBond(), and submolecule().

standard fragment pointer

Referenced by getStdFrag(), hasStdFrag(), setStdFrag(), and submolecule().


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