BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Protected Attributes | Private Member Functions
BALL::SecondaryStructure Class Reference

#include <BALL/KERNEL/secondaryStructure.h>

Inheritance diagram for BALL::SecondaryStructure:
BALL::AtomContainer BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable

List of all members.

Public Types

Enums
enum  Type {
  HELIX, COIL, STRAND, TURN,
  UNKNOWN, NUMBER_OF_TYPES
}

Public Member Functions

Constructors and Destructors
 SecondaryStructure ()
 Default constructor.
 SecondaryStructure (const SecondaryStructure &secondary_structure, bool deep=true)
 Copy constructor.
 SecondaryStructure (const String &name)
virtual ~SecondaryStructure ()
 Destructor.
virtual void clear ()
 Clear the contents of the secondary structure.
virtual void destroy ()
 Clear the contents of the secondary structure and remove it from all composite structures.
Predicates
bool operator== (const SecondaryStructure &secondary_structure) const
bool operator!= (const SecondaryStructure &secondary_structure) const
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const
void persistentRead (PersistenceManager &pm)
Assignment
void set (const SecondaryStructure &secondary_structure, bool deep=true)
SecondaryStructureoperator= (const SecondaryStructure &secondary_structure)
void get (SecondaryStructure &secondary_structure, bool deep=true) const
void swap (SecondaryStructure &secondary_structure)
Accessors
Type getType () const
 Return the type of secondary structure.
void setType (Type type)
 Set the type of secondary structure.
ProteingetProtein ()
const ProteingetProtein () const
ChaingetChain ()
const ChaingetChain () 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 countResidues () const
Size countPDBAtoms () const
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 (SecondaryStructure &secondary_structure)
void spliceAfter (SecondaryStructure &secondary_structure)
void splice (SecondaryStructure &secondary_structure)
Debugging and Diagnostics
virtual bool isValid () const
virtual void dump (std::ostream &s=std::cout, Size depth=0) const

Protected Attributes

Type type_
 The secondary structure type (helix, strand, coil, turn)

Private Member Functions

FragmentgetFragment (Position position)
const FragmentgetFragment (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

Secondary structure class. This class is used to represent secondary structure elements of protein chains.

Definition at line 29 of file secondaryStructure.h.


Member Enumeration Documentation

Secondary structure type

Enumerator:
HELIX 
COIL 
STRAND 
TURN 
UNKNOWN 
NUMBER_OF_TYPES 

Definition at line 42 of file secondaryStructure.h.


Constructor & Destructor Documentation

Default constructor.

BALL::SecondaryStructure::SecondaryStructure ( const SecondaryStructure secondary_structure,
bool  deep = true 
)

Copy constructor.

Destructor.


Member Function Documentation

Append a Residue after the last position.

Parameters:
residuethe Residue to append
void BALL::SecondaryStructure::append ( Atom atom) [private]

Append an atom to the last position.

Parameters:
atomthe atom to append

Reimplemented from BALL::AtomContainer.

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

Append an AtomContainer at the last position.

Parameters:
atom_containerthe AtomContainer to prepend

Reimplemented from BALL::AtomContainer.

virtual void BALL::SecondaryStructure::clear ( ) [virtual]

Clear the contents of the secondary structure.

Reimplemented from BALL::AtomContainer.

Count the PDBAtoms.

Returns:
Size the number of PDBAtoms

Count the Residues.

Returns:
Size the number of residues
virtual void BALL::SecondaryStructure::destroy ( ) [virtual]

Clear the contents of the secondary structure and remove it from all composite structures.

Reimplemented from BALL::AtomContainer.

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

Internal state dump. Dump the current internal state of this instance to the output ostream s with dumping depth depth .

Parameters:
soutput stream where to output the internal state of this instance
depththe dumping depth

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::get ( SecondaryStructure secondary_structure,
bool  deep = true 
) const

Assignment. The assignment is either deep or shallow (default).

Parameters:
secondary_structurethe SecondaryStructure to be assigned to
See also:
secondary_structure::set

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:
positionthe position of the child atom
Returns:
Atom* - mutable pointer to the child

Reimplemented from BALL::AtomContainer.

const Atom* BALL::SecondaryStructure::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:
positionthe position of the child atom
Returns:
Atom* - constant pointer to the child

Reimplemented from BALL::AtomContainer.

Get a pointer to the parent chain. The pointer is 0 if this instance does not have a parent chain.

Returns:
Protein* - mutable pointer to the parent chain

Get a pointer to the parent chain. The pointer is 0 if this instance does not have a parent chain.

Returns:
Protein* - constant pointer to the parent chain

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

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
const Fragment* BALL::SecondaryStructure::getFragment ( Position  position) const [private]

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

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

Get a pointer to a child PDBAtom at a given position. The pointer is 0 if this instance residue does not have a PDBAtom at this position.

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

Get a pointer to a child PDBAtom at a given position. The pointer is 0 if this instance residue does not have a PDBAtom at this position.

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

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

Get a 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

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:
positionthe position of the child Residue
Returns:
Residue* - mutable pointer to the child

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:
positionthe position of the child Residue
Returns:
Residue* - constant pointer to the child

Return the type of secondary structure.

Definition at line 150 of file secondaryStructure.h.

Insert a Residue after the last position.

Parameters:
residuethe Residue to insert
void BALL::SecondaryStructure::insert ( Atom atom) [private]

Insert an atom to the last position.

Parameters:
atomthe atom to insert

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::insert ( AtomContainer atom_container) [private]

Insert an AtomContainer at the last position.

Parameters:
atom_containerthe AtomContainer to insert

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::insertAfter ( Residue residue,
Composite after 
)

Insert a Residue after a given Composite object.

Parameters:
residuethe Residue to insert
afterthe Composite object to insert before
void BALL::SecondaryStructure::insertAfter ( Atom atom,
Composite after 
) [private]

Insert an atom after a given Composite object.

Parameters:
atomthe atom to insert
afterthe Composite object to insert after

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::insertAfter ( AtomContainer atom_container,
Composite after 
) [private]

Insert an AtomContainer after a given Composite object.

Parameters:
atom_containerthe AtomContainer to insert
afterthe Composite object to insert after

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::insertBefore ( Residue residue,
Composite before 
)

Insert a Residue before a given Composite object.

Parameters:
residuethe Residue to insert
beforethe Composite object to insert before
void BALL::SecondaryStructure::insertBefore ( Atom atom,
Composite before 
) [private]

Insert an atom before a given Composite object.

Parameters:
atomthe atom to insert
beforethe Composite object to insert before

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::insertBefore ( AtomContainer atom_container,
Composite before 
) [private]

Insert an AtomContainer before a given Composite object.

Parameters:
atom_containerthe AtomContainer to insert
beforethe Composite object to insert before

Reimplemented from BALL::AtomContainer.

virtual bool BALL::SecondaryStructure::isValid ( ) const [virtual]

Internal state and consistency self-validation.

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

Reimplemented from BALL::AtomContainer.

bool BALL::SecondaryStructure::operator!= ( const SecondaryStructure secondary_structure) const

Inequality operator

See also:
operator ==
SecondaryStructure& BALL::SecondaryStructure::operator= ( const SecondaryStructure secondary_structure)

Assignment operator.

Parameters:
secondary_structurethe SecondaryStructure to be copied (cloned)
Returns:
Secondary_structure& - this instance
See also:
SecondaryStructure::set
bool BALL::SecondaryStructure::operator== ( const SecondaryStructure secondary_structure) const

Equality operator. Two instance of SecondaryStructure are equal if they have the same handle.

See also:
Object::operator ==

Read a SecondaryStructure object from a persistent stream

Parameters:
pmthe persistence manager

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::persistentWrite ( PersistenceManager pm,
const char *  name = 0 
) const [virtual]

Write a SecondaryStructure object to a persistent stream

Parameters:
pmthe persistence manager

Reimplemented from BALL::AtomContainer.

Prepend a Residue at position 0.

Parameters:
residuethe Residue to prepend
void BALL::SecondaryStructure::prepend ( Atom atom) [private]

Prepend an atom at position 0.

Parameters:
atomthe atom to prepend

Reimplemented from BALL::AtomContainer.

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

Prepend an AtomContainer at position 0.

Parameters:
atom_containerthe AtomContainer to prepend

Reimplemented from BALL::AtomContainer.

Remove a Residue.

Parameters:
residuethe Residue to remove

Remove an atom

Parameters:
atomthe atom to remove

Reimplemented from BALL::AtomContainer.

bool BALL::SecondaryStructure::remove ( AtomContainer atom_container) [private]

Remove an AtomContainer

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

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::set ( const SecondaryStructure secondary_structure,
bool  deep = true 
)

Assignment. The assignment is either deep or shallow (default).

Parameters:
secondary_structurethe SecondaryStructure to be copied (cloned)
deepmake a deep (=true) or shallow (=false) copy
void BALL::SecondaryStructure::setType ( Type  type) [inline]

Set the type of secondary structure.

Definition at line 153 of file secondaryStructure.h.

void BALL::SecondaryStructure::splice ( SecondaryStructure secondary_structure)

Move the children of secondary_structure into this instance. The children are inserted using spliceBefore .

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

Move the children of secondary_structure into this instance. Cut all children of secondary_structure and append them after the children of this instance.

Parameters:
secondary_structurethe SecondaryStructure to access
void BALL::SecondaryStructure::spliceAfter ( AtomContainer atom_container) [private]

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

Parameters:
atom_containerthe AtomContainer to access

Reimplemented from BALL::AtomContainer.

Move the children of secondary_structure into this instance. Cut all children of secondary_structure and prepend them before the children of this instance.

Parameters:
secondary_structurethe SecondaryStructure to access
void BALL::SecondaryStructure::spliceBefore ( AtomContainer atom_container) [private]

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

Parameters:
atom_containerthe AtomContainer to access

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::swap ( SecondaryStructure secondary_structure)

Swapping of two secondary structures.

Parameters:
secondary_structureto swap with this instance

Member Data Documentation

The secondary structure type (helix, strand, coil, turn)

Definition at line 323 of file secondaryStructure.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines