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

Chain Class Reference
[Molecular Datastructures]

Protein chain class. More...

#include <chain.h>

Inheritance diagram for Chain:

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

Public Types

Enums
enum  Property { NUMBER_OF_PROPERTIES = AtomContainer::NUMBER_OF_PROPERTIES }
 The number of predefined properties for AtomContainer.

Public Member Functions

bool operator== (const Chain &chain) const throw ()
 Equality operator.
bool operator!= (const Chain &chain) const throw ()
 Inequality operator.
Constructors and Destructors
 Chain () throw ()
 Default constrcutor.
 Chain (const Chain &chain, bool deep=true) throw ()
 Copy constructor.
 Chain (const String &name) throw ()
 Detailled constructor.
virtual ~Chain () throw ()
 Destructor.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
 Writes a Chain object to a persistent stream.
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
 Reads a Chain object from a persistent stream.
Assignment
void set (const Chain &chain, bool deep=true) throw ()
 Assignment with cloning facility.
Chainoperator= (const Chain &chain) throw ()
 Assignment operator.
void get (Chain &chain, bool deep=true) const throw ()
 Copying with cloning facility.
void swap (Chain &chain) throw ()
 Swapping of chains.
Accessors
ProteingetProtein () throw ()
 Get a pointer to the parent protein.
const ProteingetProtein () const throw ()
 Get a constant pointer to the parent protein.
SecondaryStructuregetSecondaryStructure (Position position) throw ()
 Get a pointer to a child SecondaryStructure at a given position.
const SecondaryStructuregetSecondaryStructure (Position position) const throw ()
 Get a constant 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 constant pointer to the N-terminal Residue.
ResiduegetCTerminal () throw ()
 Get a pointer to the C-terminal Residue.
const ResiduegetCTerminal () const throw ()
 Get a constant pointer to the C-terminal Residue.
PDBAtomgetPDBAtom (Position position) throw ()
 Get a pointer to a child PDBAtom at a given position.
const PDBAtomgetPDBAtom (Position position) const throw ()
 Get a pointer to a child PDBAtom at a given position.
Size countSecondaryStructures () const throw ()
 Count the SecondaryStructures.
Size countResidues () const throw ()
 Count the Residues.
Size countPDBAtoms () const throw ()
 Count the PDBAtoms.
void prepend (SecondaryStructure &secondary_structure) throw ()
 Prepend a SecondaryStructure at position 0.
void append (SecondaryStructure &secondary_structure) throw ()
 Append a SecondaryStructure after the last position.
void insert (SecondaryStructure &secondary_structure) throw ()
 Insert a SecondaryStructure after the last position.
void insertBefore (SecondaryStructure &secondary_structure, Composite &before) throw ()
 Insert a SecondaryStructure before a given Composite object.
void insertAfter (SecondaryStructure &secondary_structure, Composite &after) throw ()
 Insert a SecondaryStructure after a given Composite object.
bool remove (SecondaryStructure &secondary_structure) throw ()
 Remove a SecondaryStructure.
void prepend (Residue &residue) throw ()
 Prepend a Residue at position 0.
void append (Residue &residue) throw ()
 Append a Residue after the last position.
void insert (Residue &residue) throw ()
 Insert a Residue after the last position.
void insertBefore (Residue &residue, Composite &before) throw ()
 Insert a Residue before a given Composite object.
void insertAfter (Residue &residue, Composite &after) throw ()
 Insert a Residue after a given Composite object.
bool remove (Residue &residue) throw ()
 Remove a Residue.
void spliceBefore (Chain &chain) throw ()
 Cut all children of chain and prepend them before the children of this chain.
void spliceAfter (Chain &chain) throw ()
 Cut all children of chain and append them after the children of this chain.
void splice (Chain &chain) throw ()
 Move the children of chain into this chain.
Debugging and Diagnostics
virtual void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
 Internal state dump.

Detailed Description

Protein chain class.

This class represents a polypeptide chain within a Protein . Chains can contain SecondaryStructure s or Residue s.


Member Function Documentation

void Chain::append Residue residue  )  throw ()
 

Append a Residue after the last position.

Parameters:
residue the Residue to append

void Chain::append SecondaryStructure secondary_structure  )  throw ()
 

Append a SecondaryStructure after the last position.

Parameters:
secondary_structure the SecondaryStructure to append

Size Chain::countPDBAtoms  )  const throw ()
 

Count the PDBAtoms.

Returns:
Size the number of PDBAtoms

Size Chain::countResidues  )  const throw ()
 

Count the Residues.

Returns:
Size the number of residues

Size Chain::countSecondaryStructures  )  const throw ()
 

Count the SecondaryStructures.

Returns:
Size the number of secondary structures

virtual void Chain::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 AtomContainer.

void Chain::get Chain chain,
bool  deep = true
const throw ()
 

Copying with cloning facility.

The assignment is either deep or shallow (default).

Parameters:
chain the chain to be assigned to
See also:
chain::set

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

Get a constant 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* Chain::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 Residue* Chain::getNTerminal  )  const throw ()
 

Get a constant 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* Chain::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* Chain::getPDBAtom Position  position  )  const throw ()
 

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

The pointer is 0 if this instance does not have a PDBAtom at this position.

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

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

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

The pointer is 0 if this instance does not have a PDBAtom at this position.

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

const Protein* Chain::getProtein  )  const throw ()
 

Get a constant pointer to the parent protein.

The pointer is 0 if this instance does not have a parent protein.

Returns:
Protein* - constant pointer to the parent protein

Protein* Chain::getProtein  )  throw ()
 

Get a pointer to the parent protein.

The pointer is 0 if this instance does not have a parent protein.

Returns:
Protein* - mutable pointer to the parent protein

const Residue* Chain::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 this position.

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

Residue* Chain::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 this position.

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

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

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

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

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

SecondaryStructure* Chain::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 this position.

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

void Chain::insert Residue residue  )  throw ()
 

Insert a Residue after the last position.

Parameters:
residue the Residue to insert

void Chain::insert SecondaryStructure secondary_structure  )  throw ()
 

Insert a SecondaryStructure after the last position.

Parameters:
secondary_structure the SecondaryStructure to insert

void Chain::insertAfter Residue residue,
Composite after
throw ()
 

Insert a Residue after a given Composite object.

Parameters:
residue the Residue to insert
after the Composite object to insert after

void Chain::insertAfter SecondaryStructure secondary_structure,
Composite after
throw ()
 

Insert a SecondaryStructure after a given Composite object.

Parameters:
secondary_structure the SecondaryStructure to insert
after the Composite object to insert after

void Chain::insertBefore Residue residue,
Composite before
throw ()
 

Insert a Residue before a given Composite object.

Parameters:
residue the Residue to insert
before the Composite object to insert before

void Chain::insertBefore SecondaryStructure secondary_structure,
Composite before
throw ()
 

Insert a SecondaryStructure before a given Composite object.

Parameters:
secondary_structure the SecondaryStructure to insert
before the Composite object to insert before

bool Chain::operator!= const Chain chain  )  const throw ()
 

Inequality operator.

See also:
operator ==

Chain& Chain::operator= const Chain chain  )  throw ()
 

Assignment operator.

The assignment is deep.

Parameters:
chain the chain to be copied (cloned)
Returns:
chain& - this instance.
See also:
chain::set

bool Chain::operator== const Chain chain  )  const throw ()
 

Equality operator.

Two chains are equal if they have the same handle.

See also:
Object::operator ==

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

Reads a Chain object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from AtomContainer.

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

Writes a Chain object to a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from AtomContainer.

void Chain::prepend Residue residue  )  throw ()
 

Prepend a Residue at position 0.

Parameters:
residue the Residue to prepend

void Chain::prepend SecondaryStructure secondary_structure  )  throw ()
 

Prepend a SecondaryStructure at position 0.

Parameters:
secondary_structure the SecondaryStructure to prepend

bool Chain::remove Residue residue  )  throw ()
 

Remove a Residue.

Parameters:
residue the Residue to remove

bool Chain::remove SecondaryStructure secondary_structure  )  throw ()
 

Remove a SecondaryStructure.

Parameters:
secondary_structure the SecondaryStructure to remove

void Chain::set const Chain chain,
bool  deep = true
throw ()
 

Assignment with cloning facility.

The assignment is either deep or shallow (default).

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

void Chain::splice Chain chain  )  throw ()
 

Move the children of chain into this chain.

The children of chain are inserted using spliceBefore .

void Chain::spliceAfter Chain chain  )  throw ()
 

Cut all children of chain and append them after the children of this chain.

Parameters:
chain the chain to access

void Chain::spliceBefore Chain chain  )  throw ()
 

Cut all children of chain and prepend them before the children of this chain.

Parameters:
chain the chain to access

void Chain::swap Chain chain  )  throw ()
 

Swapping of chains.

Parameters:
chain the chain this instance is being swapped with