OBResidue Class Reference

Residue information. More...

#include <mol.h>

List of all members.

Public Member Functions

 OBResidue (void)
 Constructor.
 OBResidue (const OBResidue &)
virtual ~OBResidue (void)
 Destructor.
OBResidueoperator= (const OBResidue &)
void AddAtom (OBAtom *atom)
void InsertAtom (OBAtom *atom)
void RemoveAtom (OBAtom *atom)
void Clear (void)
void SetName (const std::string &resname)
void SetNum (unsigned int resnum)
void SetChain (char chain)
void SetChainNum (unsigned int chainnum)
void SetIdx (unsigned int idx)
void SetAtomID (OBAtom *atom, const std::string &id)
void SetHetAtom (OBAtom *atom, bool hetatm)
void SetSerialNum (OBAtom *atom, unsigned int sernum)
 Set the atomic serial number for a given atom (see OBSerialNums).
std::string GetName (void) const
unsigned int GetNum (void) const
unsigned int GetNumAtoms () const
char GetChain (void) const
unsigned int GetChainNum (void) const
unsigned int GetIdx (void) const
unsigned int GetResKey (void) const
std::vector< OBAtom * > GetAtoms (void) const
std::vector< OBBond * > GetBonds (bool=true) const
std::string GetAtomID (OBAtom *atom) const
unsigned GetSerialNum (OBAtom *atom) const
 
Returns:
the serial number of the supplied atom (uses OBSerialNums)

bool GetAminoAcidProperty (int) const
bool GetAtomProperty (OBAtom *, int) const
bool GetResidueProperty (int) const
bool IsHetAtom (OBAtom *atom) const
bool IsResidueType (int) const
OBAtomBeginAtom (std::vector< OBAtom * >::iterator &i)
OBAtomNextAtom (std::vector< OBAtom * >::iterator &i)
Methods for handling generic data
bool HasData (std::string &)
bool HasData (const char *)
bool HasData (unsigned int type)
void DeleteData (unsigned int type)
void DeleteData (OBGenericData *)
void DeleteData (std::vector< OBGenericData * > &)
void SetData (OBGenericData *d)
unsigned int DataSize ()
 
Returns:
the number of OBGenericData items attached to this residue

OBGenericDataGetData (unsigned int type)
OBGenericDataGetData (std::string &)
OBGenericDataGetData (const char *)
std::vector< OBGenericData * > & GetData ()
std::vector< OBGenericData
* >::iterator 
BeginData ()
std::vector< OBGenericData
* >::iterator 
EndData ()

Protected Attributes

unsigned int _idx
 Residue index (i.e., internal index in an OBMol).
char _chain
 Chain ID.
unsigned int _aakey
 Amino Acid key ID -- see SetResidueKeys().
unsigned int _reskey
 Residue key ID -- see SetResidueKeys().
unsigned int _resnum
 Residue number (i.e., in file).
std::string _resname
 Residue text name.
std::vector< bool > _hetatm
 Is a given atom a HETAM.
std::vector< std::string > _atomid
 Residue atom text IDs.
std::vector< OBAtom * > _atoms
 List of OBAtom in this residue.
std::vector< unsigned int > _sernum
 List of serial numbers.
std::vector< OBGenericData * > _vdata
 Custom data.


Detailed Description

Residue information.

The residue information is drawn from PDB or MOL2 files (or similar), which track biomolecule information, and are stored in the OBResidue class. OBResidues are stored inside the OBAtom class and OBMol classes. The residue information for an atom can be requested in the following way:

 OBAtom *atom;
 OBResidue *r;
 atom = mol.GetAtom(1);
 r = atom->GetResidue();
The residue information for a molecule can be manipulated too:
  cout << "This molecule has " << mol.NumResidues() << " residues." << endl;
  OBResidue *r;
  r = mol.GetResidue(1);


Constructor & Destructor Documentation

OBResidue ( void   ) 

Constructor.

OBResidue ( const OBResidue  ) 

Copy constructor

Warning:
Currently does not copy all associated OBGenericData This requires a (minor) API change, and will thus only be fixed in 2.1 or later releases.

~OBResidue ( void   )  [virtual]

Destructor.


Member Function Documentation

OBResidue & operator= ( const OBResidue  ) 

void AddAtom ( OBAtom atom  ) 

void InsertAtom ( OBAtom atom  ) 

void RemoveAtom ( OBAtom atom  ) 

void Clear ( void   ) 

void SetName ( const std::string &  resname  ) 

void SetNum ( unsigned int  resnum  ) 

void SetChain ( char  chain  ) 

void SetChainNum ( unsigned int  chainnum  ) 

void SetIdx ( unsigned int  idx  ) 

void SetAtomID ( OBAtom atom,
const std::string &  id 
)

void SetHetAtom ( OBAtom atom,
bool  hetatm 
)

void SetSerialNum ( OBAtom atom,
unsigned int  sernum 
)

Set the atomic serial number for a given atom (see OBSerialNums).

string GetName ( void   )  const

unsigned int GetNum ( void   )  const

unsigned int GetNumAtoms (  )  const

char GetChain ( void   )  const

unsigned int GetChainNum ( void   )  const

unsigned int GetIdx ( void   )  const

unsigned int GetResKey ( void   )  const

vector< OBAtom * > GetAtoms ( void   )  const

vector< OBBond * > GetBonds ( bool  = true  )  const

string GetAtomID ( OBAtom atom  )  const

unsigned int GetSerialNum ( OBAtom atom  )  const

Returns:
the serial number of the supplied atom (uses OBSerialNums)

bool GetAminoAcidProperty ( int   )  const

bool GetAtomProperty ( OBAtom ,
int   
) const

bool GetResidueProperty ( int   )  const

bool IsHetAtom ( OBAtom atom  )  const

bool IsResidueType ( int   )  const

OBAtom * BeginAtom ( std::vector< OBAtom * >::iterator &  i  ) 

Deprecated:
Use FOR_ATOMS_OF_RESIDUE and OBResidueAtomIter instead

OBAtom * NextAtom ( std::vector< OBAtom * >::iterator &  i  ) 

Deprecated:
Use FOR_ATOMS_OF_RESIDUE and OBResidueAtomIter instead

bool HasData ( std::string &   ) 

bool HasData ( const char *   ) 

bool HasData ( unsigned int  type  ) 

void DeleteData ( unsigned int  type  ) 

void DeleteData ( OBGenericData  ) 

void DeleteData ( std::vector< OBGenericData * > &   ) 

void SetData ( OBGenericData d  )  [inline]

unsigned int DataSize (  )  [inline]

Returns:
the number of OBGenericData items attached to this residue

OBGenericData * GetData ( unsigned int  type  ) 

OBGenericData * GetData ( std::string &   ) 

OBGenericData * GetData ( const char *   ) 

std::vector<OBGenericData*>& GetData (  )  [inline]

std::vector<OBGenericData*>::iterator BeginData (  )  [inline]

std::vector<OBGenericData*>::iterator EndData (  )  [inline]


Member Data Documentation

unsigned int _idx [protected]

Residue index (i.e., internal index in an OBMol).

char _chain [protected]

Chain ID.

unsigned int _aakey [protected]

Amino Acid key ID -- see SetResidueKeys().

unsigned int _reskey [protected]

Residue key ID -- see SetResidueKeys().

unsigned int _resnum [protected]

Residue number (i.e., in file).

std::string _resname [protected]

Residue text name.

std::vector<bool> _hetatm [protected]

Is a given atom a HETAM.

std::vector<std::string> _atomid [protected]

Residue atom text IDs.

std::vector<OBAtom*> _atoms [protected]

List of OBAtom in this residue.

std::vector<unsigned int> _sernum [protected]

List of serial numbers.

std::vector<OBGenericData*> _vdata [protected]

Custom data.


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