BALL::Chain Class Reference
[Molecular Datastructures]

#include <BALL/KERNEL/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.

More...

Public Member Functions

bool operator== (const Chain &chain) const
bool operator!= (const Chain &chain) const
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
void persistentRead (PersistenceManager &pm)
Assignment

void set (const Chain &chain, bool deep=true)
Chainoperator= (const Chain &chain)
void get (Chain &chain, bool deep=true) const
void swap (Chain &chain)
Accessors

ProteingetProtein ()
const ProteingetProtein () const
SecondaryStructuregetSecondaryStructure (Position position)
const SecondaryStructuregetSecondaryStructure (Position position) const
ResiduegetResidue (Position position)
const ResiduegetResidue (Position position) const
ResiduegetNTerminal ()
const ResiduegetNTerminal () const
ResiduegetCTerminal ()
const ResiduegetCTerminal () const
PDBAtomgetPDBAtom (Position position)
const PDBAtomgetPDBAtom (Position position) const
Size countSecondaryStructures () const
Size countResidues () const
Size countPDBAtoms () const
void prepend (SecondaryStructure &secondary_structure)
void append (SecondaryStructure &secondary_structure)
void insert (SecondaryStructure &secondary_structure)
void insertBefore (SecondaryStructure &secondary_structure, Composite &before)
void insertAfter (SecondaryStructure &secondary_structure, Composite &after)
bool remove (SecondaryStructure &secondary_structure)
void prepend (Residue &residue)
void append (Residue &residue)
void insert (Residue &residue)
void insertBefore (Residue &residue, Composite &before)
void insertAfter (Residue &residue, Composite &after)
bool remove (Residue &residue)
void spliceBefore (Chain &chain)
void spliceAfter (Chain &chain)
void splice (Chain &chain)
Debugging and Diagnostics

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

Private Member Functions

AtomContainergetAtomContainer (Position position)
const AtomContainergetAtomContainer (Position position) const
AtomgetAtom (Position position)
const AtomgetAtom (Position position) const
void prepend (Atom &atom)
void append (Atom &atom)
void insert (Atom &atom)
void insertBefore (Atom &atom, Composite &before)
void insertAfter (Atom &atom, Composite &after)
bool remove (Atom &atom)
void prepend (AtomContainer &atom_container)
void append (AtomContainer &atom_container)
void insert (AtomContainer &atom_container)
void insertBefore (AtomContainer &atom_container, Composite &before)
void insertAfter (AtomContainer &atom_container, Composite &after)
void spliceBefore (AtomContainer &atom_container)
void spliceAfter (AtomContainer &atom_container)
void splice (AtomContainer &atom_container)
bool remove (AtomContainer &atom_container)

Detailed Description

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

Definition at line 30 of file chain.h.


Member Enumeration Documentation

The number of predefined properties for AtomContainer.

Enumerator:
NUMBER_OF_PROPERTIES 

Reimplemented from BALL::AtomContainer.

Definition at line 43 of file chain.h.


Constructor & Destructor Documentation

BALL::Chain::Chain (  ) 

Default constrcutor.

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

Copy constructor.

BALL::Chain::Chain ( const String name  ) 

Detailled constructor.

virtual BALL::Chain::~Chain (  )  [virtual]

Destructor.


Member Function Documentation

void BALL::Chain::append ( AtomContainer atom_container  )  [private]

Append an AtomContainer at the last position.

Parameters:
atom_container the AtomContainer to prepend

Reimplemented from BALL::AtomContainer.

void BALL::Chain::append ( Atom atom  )  [private]

Append an atom to the last position.

Parameters:
atom the atom to append

Reimplemented from BALL::AtomContainer.

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 Atom* BALL::Chain::getAtom ( Position  position  )  const [private]

Get a pointer to a child atom at a given position. The pointer is 0 if this instance does not have an atom at the given position.

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

Reimplemented from BALL::AtomContainer.

Atom* BALL::Chain::getAtom ( Position  position  )  [private]

Get a pointer to a child atom at a given position. The pointer is 0 if this instance does not have an atom at the given position.

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

Reimplemented from BALL::AtomContainer.

const AtomContainer* BALL::Chain::getAtomContainer ( Position  position  )  const [private]

Get a constant pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.

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

Reimplemented from BALL::AtomContainer.

AtomContainer* BALL::Chain::getAtomContainer ( Position  position  )  [private]

Get a pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.

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

Reimplemented from BALL::AtomContainer.

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 ( AtomContainer atom_container  )  [private]

Insert an AtomContainer at the last position.

Parameters:
atom_container the AtomContainer to insert

Reimplemented from BALL::AtomContainer.

void BALL::Chain::insert ( Atom atom  )  [private]

Insert an atom to the last position.

Parameters:
atom the atom to insert

Reimplemented from BALL::AtomContainer.

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 ( AtomContainer atom_container,
Composite after 
) [private]

Insert an AtomContainer after a given Composite object.

Parameters:
atom_container the AtomContainer to insert
after the Composite object to insert after

Reimplemented from BALL::AtomContainer.

void BALL::Chain::insertAfter ( Atom atom,
Composite after 
) [private]

Insert an atom after a given Composite object.

Parameters:
atom the atom to insert
after the Composite object to insert after

Reimplemented from BALL::AtomContainer.

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 ( AtomContainer atom_container,
Composite before 
) [private]

Insert an AtomContainer before a given Composite object.

Parameters:
atom_container the AtomContainer to insert
before the Composite object to insert before

Reimplemented from BALL::AtomContainer.

void BALL::Chain::insertBefore ( Atom atom,
Composite before 
) [private]

Insert an atom before a given Composite object.

Parameters:
atom the atom to insert
before the Composite object to insert before

Reimplemented from BALL::AtomContainer.

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  )  [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 [virtual]

Writes a Chain object to a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from BALL::AtomContainer.

void BALL::Chain::prepend ( AtomContainer atom_container  )  [private]

Prepend an AtomContainer at position 0.

Parameters:
atom_container the AtomContainer to prepend

Reimplemented from BALL::AtomContainer.

void BALL::Chain::prepend ( Atom atom  )  [private]

Prepend an atom at position 0.

Parameters:
atom the atom to prepend

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 ( AtomContainer atom_container  )  [private]

Remove an AtomContainer

Parameters:
atom_container the AtomContainer to remove
Returns:
false if {atom_container} could not be removed

Reimplemented from BALL::AtomContainer.

bool BALL::Chain::remove ( Atom atom  )  [private]

Remove an atom

Parameters:
atom the atom to remove

Reimplemented from BALL::AtomContainer.

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 ( AtomContainer atom_container  )  [private]

Move the children of {atom_container} into this instance. The children of atom_container are inserted at its position if it is is a child of this. Otherwise the children are inserted using spliceBefore .

Reimplemented from BALL::AtomContainer.

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 ( AtomContainer atom_container  )  [private]

Cut all children of atom_container and append them after the children of this instance.

Parameters:
atom_container the AtomContainer to access

Reimplemented from BALL::AtomContainer.

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 ( AtomContainer atom_container  )  [private]

Cut all children of atom_container and prepend them before the children of this instance.

Parameters:
atom_container the AtomContainer to access

Reimplemented from BALL::AtomContainer.

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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3