Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

GenericMol Class Reference

#include <GromacsTopFile.h>

List of all members.

Public Member Functions

 GenericMol (const char *theName)
int getNumAtoms () const
int getNumBonds () const
int getNumAngles () const
int getNumDihedrals () const
int getNumRes () const
void addAtom (const char *theType, int theTypeNum, int theResNum, const char *theResType, const char *theAtomName, Real theCharge, Real theMass)
void addBond (int atomi, int atomj, int type)
void addAngle (int atomi, int atomj, int atomk, int type)
void addDihedral (int atomi, int atomj, int atomk, int atoml, int type)
const char * getName () const
const GenericAtomgetAtom (int n) const
const GenericBondgetBond (int n) const
const GenericAnglegetAngle (int n) const
const GenericDihedralgetDihedral (int n) const


Constructor & Destructor Documentation

GenericMol::GenericMol const char *  theName  ) 
 

Definition at line 737 of file GromacsTopFile.C.

00737                                           {
00738   name = strdup(theName);
00739 }


Member Function Documentation

void GenericMol::addAngle int  atomi,
int  atomj,
int  atomk,
int  type
 

Definition at line 716 of file GromacsTopFile.C.

References ResizeArray< Elem >::add().

00716                                                                    {
00717   angleList.add(new GenericAngle(atomi, atomj, atomk, type));
00718 }

void GenericMol::addAtom const char *  theType,
int  theTypeNum,
int  theResNum,
const char *  theResType,
const char *  theAtomName,
Real  theCharge,
Real  theMass
 

Definition at line 728 of file GromacsTopFile.C.

References ResizeArray< Elem >::add().

00730                                                        {
00731 
00732   atomList.add(new GenericAtom(theType,theTypeNum,theResNum,theResType,
00733                            theAtomName,theCharge,theMass));
00734 }

void GenericMol::addBond int  atomi,
int  atomj,
int  type
 

Definition at line 711 of file GromacsTopFile.C.

References ResizeArray< Elem >::add().

00711                                                        {
00712   bondList.add(new GenericBond(atomi, atomj, type));
00713 }

void GenericMol::addDihedral int  atomi,
int  atomj,
int  atomk,
int  atoml,
int  type
 

Definition at line 721 of file GromacsTopFile.C.

References ResizeArray< Elem >::add().

00722                                                   {
00723   dihedralList.add(new GenericDihedral(atomi, atomj, atomk,
00724                                              atoml, type));
00725 }

const GenericAngle * GenericMol::getAngle int  n  )  const
 

Definition at line 752 of file GromacsTopFile.C.

References ResizeArray< Elem >::size().

00752                                                     {
00753   /* double-check */
00754   if(n >= angleList.size() || n<0) {
00755     fprintf(stderr,"Angle index %d out of bounds.\n",n);
00756     exit(1);
00757   }
00758   return angleList[n];
00759 }

const GenericAtom * GenericMol::getAtom int  n  )  const
 

Definition at line 772 of file GromacsTopFile.C.

References ResizeArray< Elem >::size().

00772                                                   {
00773   /* double-check */
00774   if(n >= atomList.size() || n<0) {
00775     fprintf(stderr,"Atom index %d out of bounds for %s.\n",n,name);
00776     exit(1);
00777   }
00778   return atomList[n];
00779 }

const GenericBond * GenericMol::getBond int  n  )  const
 

Definition at line 742 of file GromacsTopFile.C.

References ResizeArray< Elem >::size().

00742                                                   {
00743   /* double-check */
00744   if(n >= bondList.size() || n<0) {
00745     fprintf(stderr,"Bond index %d out of bounds.\n",n);
00746     exit(1);
00747   }
00748   return bondList[n];
00749 }

const GenericDihedral * GenericMol::getDihedral int  n  )  const
 

Definition at line 762 of file GromacsTopFile.C.

References ResizeArray< Elem >::size().

00762                                                           {
00763   /* double-check */
00764   if(n >= dihedralList.size() || n<0) {
00765     fprintf(stderr,"Dihedral index %d out of bounds.\n",n);
00766     exit(1);
00767   }
00768   return dihedralList[n];
00769 }

const char* GenericMol::getName  )  const [inline]
 

Definition at line 156 of file GromacsTopFile.h.

00156 { return name; }

int GenericMol::getNumAngles  )  const [inline]
 

Definition at line 140 of file GromacsTopFile.h.

References ResizeArray< Elem >::size().

Referenced by MolInst::getNumAngles().

00140 { return angleList.size(); }

int GenericMol::getNumAtoms  )  const [inline]
 

Definition at line 138 of file GromacsTopFile.h.

References ResizeArray< Elem >::size().

Referenced by MolInst::getNumAtoms().

00138 { return atomList.size(); }

int GenericMol::getNumBonds  )  const [inline]
 

Definition at line 139 of file GromacsTopFile.h.

References ResizeArray< Elem >::size().

Referenced by MolInst::getNumBonds().

00139 { return bondList.size(); }

int GenericMol::getNumDihedrals  )  const [inline]
 

Definition at line 141 of file GromacsTopFile.h.

References ResizeArray< Elem >::size().

Referenced by MolInst::getNumDihedrals().

00141 { return dihedralList.size(); }

int GenericMol::getNumRes  )  const [inline]
 

Definition at line 142 of file GromacsTopFile.h.

References ResizeArray< Elem >::size().

Referenced by MolInst::getNumRes().

00142 { return atomList[atomList.size()-1]->getResNum(); }


The documentation for this class was generated from the following files:
Generated on Tue Jul 8 04:07:18 2008 for NAMD by  doxygen 1.3.9.1