Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

Protein Class Reference
[Molecular Datastructures]

Protein Class. More...

#include <protein.h>

Inheritance diagram for Protein:

Molecule AtomContainer Composite PropertyManager PersistentObject Selectable Object AutoDeletable List of all members.

Public Types

Enums
enum  Property { NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES }
 Properties.

Public Member Functions

bool operator== (const Protein &protein) const throw ()
 Equality operator.
bool operator!= (const Protein &protein) const throw ()
 Inequality operator.
Constructors and Destructors
 Protein () throw ()
 Default constructor.
 Protein (const Protein &protein, bool deep=true) throw ()
 Copy constructor.
 Protein (const String &name, const String &id=BALL_PROTEIN_DEFAULT_ID) throw ()
 Detailled constructor.
virtual ~Protein () throw ()
 Destructor.
virtual void clear () throw ()
 Clears the contents of the protein.
virtual void destroy () throw ()
 Clear the contents of this instance of AtomContainer and removes it from parent composite structures.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
 Writes a Protein object to a persistent stream.
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
 Reads a Protein object from a persistent stream.
Assignment Methods
void set (const Protein &protein, bool deep=true) throw ()
 Assignment with cloning facility.
Proteinoperator= (const Protein &protein) throw ()
 Assignment operator.
void get (Protein &protein, bool deep=true) const throw ()
 Copy this instance to protein .
void swap (Protein &protein) throw ()
 Swapping of two proteins.
Accessors
ChaingetChain (Position position) throw ()
 Get a pointer to a child chain at a given position.
const ChaingetChain (Position position) const throw ()
 Get a pointer to a child chain at a given position.
SecondaryStructuregetSecondaryStructure (Position position) throw ()
 Get a pointer to a child SecondaryStructure at a given position.
const SecondaryStructuregetSecondaryStructure (Position position) const throw ()
 Get a pointer to a child SecondaryStructure at a given position.
ResiduegetResidue (Position position) throw ()
 Get a pointer to a child Residue at a given position.
const ResiduegetResidue (Position position) const throw ()
 Get a pointer to a child Residue at a given position.
ResiduegetNTerminal () throw ()
 Get a pointer to the N-terminal Residue.
const ResiduegetNTerminal () const throw ()
 Get a pointer to the N-terminal Residue.
ResiduegetCTerminal () throw ()
 Get a pointer to the C-terminal Residue.
const ResiduegetCTerminal () const throw ()
 Get a pointer to the C-terminal Residue.
PDBAtomgetPDBAtom (Position position) throw ()
 Get a pointer to a child PDB-Atom at a given position.
const PDBAtomgetPDBAtom (Position position) const throw ()
 Get a pointer to a child PDB-Atom at a given position.
void setID (const String &id) throw ()
 Set the ID of the NucleicAcid.
const StringgetID () const throw ()
 Retrieve the ID of the NucleicAcid.
Size countChains () const throw ()
 Count the child chains.
Size countSecondaryStructures () const throw ()
 Count the child SecondaryStructures.
Size countResidues () const throw ()
 Count the child Residues.
Size countPDBAtoms () const throw ()
 Count the child PDB-Atoms.
Debugging and Diagnostics
virtual bool isValid () const throw ()
 Internal state and consistency self-validation.
virtual void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
 Internal state dump.

Detailed Description

Protein Class.

This class is used to represent proteins. A protein may contain several Chain , SecondaryStructure , and Residue .


Member Function Documentation

Size Protein::countChains  )  const throw ()
 

Count the child chains.

Returns:
Size the number of chains

Size Protein::countPDBAtoms  )  const throw ()
 

Count the child PDB-Atoms.

Returns:
Size the number of PDB-Atoms

Size Protein::countResidues  )  const throw ()
 

Count the child Residues.

Returns:
Size the number of Residues

Size Protein::countSecondaryStructures  )  const throw ()
 

Count the child SecondaryStructures.

Returns:
Size the number of SecondaryStructures

virtual void Protein::destroy  )  throw () [virtual]
 

Clear the contents of this instance of AtomContainer and removes it from parent composite structures.

This methods clears the base fragment's name, destroys all its children (as in Composite::destroy ), and removes it from its parent composite structures.

Reimplemented from AtomContainer.

virtual void Protein::dump std::ostream &  s = std::cout,
Size  depth = 0
const throw () [virtual]
 

Internal state dump.

Dump the current internal state to the output ostream s with dumping depth depth .

Parameters:
s output stream where to output the internal state
depth the dumping depth

Reimplemented from Molecule.

void Protein::get Protein protein,
bool  deep = true
const throw ()
 

Copy this instance to protein .

The assignment is either deep or shallow (default).

Parameters:
protein the Protein to be assigned to

const Chain* Protein::getChain Position  position  )  const throw ()
 

Get a pointer to a child chain at a given position.

The pointer is 0 if this instance does not have a chain at the given position.

Parameters:
position the position of the child chain
Returns:
Chain* - constant pointer to the child

Chain* Protein::getChain Position  position  )  throw ()
 

Get a pointer to a child chain at a given position.

The pointer is 0 if this instance does not have a chain at the given position.

Parameters:
position the position of the child chain
Returns:
Chain* - mutable pointer to the child

const Residue* Protein::getCTerminal  )  const throw ()
 

Get a pointer to the C-terminal Residue.

The pointer is 0 if this instance does not have a Residue with the property "PROPERTY__AMINO_ACID".

Returns:
Residue* - constant pointer to the C-terminal Residue

Residue* Protein::getCTerminal  )  throw ()
 

Get a pointer to the C-terminal Residue.

The pointer is 0 if this instance does not have a Residue with the property "PROPERTY__AMINO_ACID".

Returns:
Residue* - mutable pointer to the C-terminal Residue

const String& Protein::getID  )  const throw ()
 

Retrieve the ID of the NucleicAcid.

Returns:
String the ID

const Residue* Protein::getNTerminal  )  const throw ()
 

Get a pointer to the N-terminal Residue.

The pointer is 0 if this instance does not have a Residue with the property "PROPERTY__AMINO_ACID".

Returns:
Residue* - constant pointer to the N-terminal Residue

Residue* Protein::getNTerminal  )  throw ()
 

Get a pointer to the N-terminal Residue.

The pointer is 0 if this instance does not have a Residue with the property "PROPERTY__AMINO_ACID".

Returns:
Residue* - mutable pointer to the N-terminal Residue

const PDBAtom* Protein::getPDBAtom Position  position  )  const throw ()
 

Get a pointer to a child PDB-Atom at a given position.

The pointer is 0 if this instance does not have a PDB-Atom at the given position.

Parameters:
position the position of the child PDB-Atom
Returns:
Residue* - constant pointer to the child

PDBAtom* Protein::getPDBAtom Position  position  )  throw ()
 

Get a pointer to a child PDB-Atom at a given position.

The pointer is 0 if this instance does not have a PDB-Atom at the given position.

Parameters:
position the position of the child PDB-Atom
Returns:
Residue* - mutable pointer to the child

const Residue* Protein::getResidue Position  position  )  const throw ()
 

Get a pointer to a child Residue at a given position.

The pointer is 0 if this instance does not have a Residue at the given position.

Parameters:
position the position of the child Residue
Returns:
Residue* - constant pointer to the child

Residue* Protein::getResidue Position  position  )  throw ()
 

Get a pointer to a child Residue at a given position.

The pointer is 0 if this instance does not have a Residue at the given position.

Parameters:
position the position of the child Residue
Returns:
Residue* - mutable pointer to the child

const SecondaryStructure* Protein::getSecondaryStructure Position  position  )  const throw ()
 

Get a pointer to a child SecondaryStructure at a given position.

The pointer is 0 if this instance does not have a SecondaryStructure at the given position.

Parameters:
position the position of the child SecondaryStructure
Returns:
SecondaryStructure* - constant pointer to the child

SecondaryStructure* Protein::getSecondaryStructure Position  position  )  throw ()
 

Get a pointer to a child SecondaryStructure at a given position.

The pointer is 0 if this instance does not have a SecondaryStructure at the given position.

Parameters:
position the position of the child SecondaryStructure
Returns:
SecondaryStructure* - mutable pointer to the child

virtual bool Protein::isValid  )  const throw () [virtual]
 

Internal state and consistency self-validation.

Returns:
bool -true if the internal state of this instance is correct (self-validated) and consistent, false otherwise

Reimplemented from AtomContainer.

bool Protein::operator!= const Protein protein  )  const throw ()
 

Inequality operator.

See also:
operator ==

Protein& Protein::operator= const Protein protein  )  throw ()
 

Assignment operator.

Parameters:
protein the Protein to be copied (cloned)
Returns:
Protein& - this instance

bool Protein::operator== const Protein protein  )  const throw ()
 

Equality operator.

Two proteins are equal if they have the same handle.

See also:
Object::operator ==.

void Protein::persistentRead PersistenceManager pm  )  throw (Exception::GeneralException) [virtual]
 

Reads a Protein object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from Molecule.

void Protein::persistentWrite PersistenceManager pm,
const char *  name = 0
const throw (Exception::GeneralException) [virtual]
 

Writes a Protein object to a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from Molecule.

void Protein::set const Protein protein,
bool  deep = true
throw ()
 

Assignment with cloning facility.

The assignment is either deep or shallow (default).

Parameters:
protein the Protein to be copied (cloned)
deep make a deep (=true) or shallow (=false) copy

void Protein::setID const String id  )  throw ()
 

Set the ID of the NucleicAcid.

Parameters:
id the new ID

void Protein::swap Protein protein  )  throw ()
 

Swapping of two proteins.

Parameters:
protein to swap with this instance