BALL::Chain Class Reference
[Molecular Datastructures]

Protein chain class. More...

#include <chain.h>

Inheritance diagram for BALL::Chain:
Inheritance graph
[legend]

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
Equality operator.
bool operator!= (const Chain &chain) const
Inequality operator.
Constructors and Destructors
Chain ()
Default constrcutor.
Chain (const Chain &chain, bool deep=true)
Copy constructor.
Chain (const String &name)
Detailled constructor.
virtual ~Chain ()
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)
Assignment with cloning facility.
Chain & operator= (const Chain &chain)
Assignment operator.
void get (Chain &chain, bool deep=true) const
Copying with cloning facility.
void swap (Chain &chain)
Swapping of chains.
Accessors
Protein * getProtein ()
Get a pointer to the parent protein.
const Protein * getProtein () const
Get a constant pointer to the parent protein.
SecondaryStructure * getSecondaryStructure (Position position)
Get a pointer to a child SecondaryStructure at a given position.
const SecondaryStructure * getSecondaryStructure (Position position) const
Get a constant pointer to a child SecondaryStructure at a given position.
Residue * getResidue (Position position)
Get a pointer to a child Residue at a given position.
const Residue * getResidue (Position position) const
Get a pointer to a child Residue at a given position.
Residue * getNTerminal ()
Get a pointer to the N-terminal Residue.
const Residue * getNTerminal () const
Get a constant pointer to the N-terminal Residue.
Residue * getCTerminal ()
Get a pointer to the C-terminal Residue.
const Residue * getCTerminal () const
Get a constant pointer to the C-terminal Residue.
PDBAtom * getPDBAtom (Position position)
Get a pointer to a child PDBAtom at a given position.
const PDBAtom * getPDBAtom (Position position) const
Get a pointer to a child PDBAtom at a given position.
Size countSecondaryStructures () const
Count the SecondaryStructures.
Size countResidues () const
Count the Residues.
Size countPDBAtoms () const
Count the PDBAtoms.
void prepend (SecondaryStructure &secondary_structure)
Prepend a SecondaryStructure at position 0.
void append (SecondaryStructure &secondary_structure)
Append a SecondaryStructure after the last position.
void insert (SecondaryStructure &secondary_structure)
Insert a SecondaryStructure after the last position.
void insertBefore (SecondaryStructure &secondary_structure, Composite &before)
Insert a SecondaryStructure before a given Composite object.
void insertAfter (SecondaryStructure &secondary_structure, Composite &after)
Insert a SecondaryStructure after a given Composite object.
bool remove (SecondaryStructure &secondary_structure)
Remove a SecondaryStructure.
void prepend (Residue &residue)
Prepend a Residue at position 0.
void append (Residue &residue)
Append a Residue after the last position.
void insert (Residue &residue)
Insert a Residue after the last position.
void insertBefore (Residue &residue, Composite &before)
Insert a Residue before a given Composite object.
void insertAfter (Residue &residue, Composite &after)
Insert a Residue after a given Composite object.
bool remove (Residue &residue)
Remove a Residue.
void spliceBefore (Chain &chain)
Cut all children of chain and prepend them before the children of this chain.
void spliceAfter (Chain &chain)
Cut all children of chain and append them after the children of this chain.
void splice (Chain &chain)
Move the children of chain into this chain.
Debugging and Diagnostics
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
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 BALL::Chain::append ( Residue & residue )

Append a Residue after the last position.

Parameters:
residue the Residue to append

void BALL::Chain::append ( SecondaryStructure & secondary_structure )

Append a SecondaryStructure after the last position.

Parameters:
secondary_structure the SecondaryStructure to append

Size BALL::Chain::countPDBAtoms ( ) const

Count the PDBAtoms.

Returns:
Size the number of PDBAtoms

Size BALL::Chain::countResidues ( ) const

Count the Residues.

Returns:
Size the number of residues

Size BALL::Chain::countSecondaryStructures ( ) const

Count the SecondaryStructures.

Returns:
Size the number of secondary structures

virtual void BALL::Chain::dump ( std::ostream & s = std::cout,
Size depth = 0
) const [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 BALL::AtomContainer.

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

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* BALL::Chain::getCTerminal ( ) const

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* BALL::Chain::getCTerminal ( )

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* BALL::Chain::getNTerminal ( ) const

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* BALL::Chain::getNTerminal ( )

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* BALL::Chain::getPDBAtom ( Position position ) const

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* BALL::Chain::getPDBAtom ( Position position )

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* BALL::Chain::getProtein ( ) const

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* BALL::Chain::getProtein ( )

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* BALL::Chain::getResidue ( Position position ) const

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* BALL::Chain::getResidue ( Position position )

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* BALL::Chain::getSecondaryStructure ( Position position ) const

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* BALL::Chain::getSecondaryStructure ( Position position )

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 BALL::Chain::insert ( Residue & residue )

Insert a Residue after the last position.

Parameters:
residue the Residue to insert

void BALL::Chain::insert ( SecondaryStructure & secondary_structure )

Insert a SecondaryStructure after the last position.

Parameters:
secondary_structure the SecondaryStructure to insert

void BALL::Chain::insertAfter ( Residue & residue,
Composite & after
)

Insert a Residue after a given Composite object.

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

void BALL::Chain::insertAfter ( SecondaryStructure & secondary_structure,
Composite & after
)

Insert a SecondaryStructure after a given Composite object.

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

void BALL::Chain::insertBefore ( Residue & residue,
Composite & before
)

Insert a Residue before a given Composite object.

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

void BALL::Chain::insertBefore ( SecondaryStructure & secondary_structure,
Composite & before
)

Insert a SecondaryStructure before a given Composite object.

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

bool BALL::Chain::operator!= ( const Chain & chain ) const

Inequality operator.

See also:
operator ==

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

Assignment operator.

The assignment is deep.

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

bool BALL::Chain::operator== ( const Chain & chain ) const

Equality operator.

Two chains are equal if they have the same handle.

See also:
Object::operator ==

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

Reads a Chain object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from BALL::AtomContainer.

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

void BALL::Chain::prepend ( Residue & residue )

Prepend a Residue at position 0.

Parameters:
residue the Residue to prepend

void BALL::Chain::prepend ( SecondaryStructure & secondary_structure )

Prepend a SecondaryStructure at position 0.

Parameters:
secondary_structure the SecondaryStructure to prepend

bool BALL::Chain::remove ( Residue & residue )

Remove a Residue.

Parameters:
residue the Residue to remove

bool BALL::Chain::remove ( SecondaryStructure & secondary_structure )

Remove a SecondaryStructure.

Parameters:
secondary_structure the SecondaryStructure to remove

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

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 BALL::Chain::splice ( Chain & chain )

Move the children of chain into this chain.

The children of chain are inserted using spliceBefore .

void BALL::Chain::spliceAfter ( Chain & chain )

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

Parameters:
chain the chain to access

void BALL::Chain::spliceBefore ( Chain & chain )

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

Parameters:
chain the chain to access

void BALL::Chain::swap ( Chain & chain )

Swapping of chains.

Parameters:
chain the chain this instance is being swapped with

Generated on Thu Aug 6 18:30:31 2009 for BALL by doxygen 1.5.8