BALL::SecondaryStructure Class Reference
[Miscellaneous]

#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 throw (Exception::GeneralException)
 

Write a SecondaryStructure object to a persistent stream.


void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
 

Read a SecondaryStructure object from a persistent stream.


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.


Member Enumeration Documentation

Secondary structure type

Enumerator:
HELIX 
COIL 
STRAND 
TURN 
UNKNOWN 
NUMBER_OF_TYPES 

Constructor & Destructor Documentation

BALL::SecondaryStructure::SecondaryStructure (  ) 

Default constructor.

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

Copy constructor.

BALL::SecondaryStructure::SecondaryStructure ( const String name  ) 
virtual BALL::SecondaryStructure::~SecondaryStructure (  )  [virtual]

Destructor.


Member Function Documentation

void BALL::SecondaryStructure::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::SecondaryStructure::append ( Atom atom  )  [private]

Append an atom to the last position.

Parameters:
atom the atom to append

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::append ( Residue residue  ) 

Append a Residue after the last position.

Parameters:
residue the Residue to append
virtual void BALL::SecondaryStructure::clear (  )  [virtual]

Clear the contents of the secondary structure.

Reimplemented from BALL::AtomContainer.

Size BALL::SecondaryStructure::countPDBAtoms (  )  const

Count the PDBAtoms.

Returns:
Size the number of PDBAtoms
Size BALL::SecondaryStructure::countResidues (  )  const

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:
s output stream where to output the internal state of this instance
depth the 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_structure the SecondaryStructure to be assigned to
See also:
secondary_structure::set
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:
position the position of the child atom
Returns:
Atom* - constant pointer to the child

Reimplemented from BALL::AtomContainer.

Atom* BALL::SecondaryStructure::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 Chain* BALL::SecondaryStructure::getChain (  )  const

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

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

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

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

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:
position the position of the child PDBAtom
Returns:
PDBAtom* - mutable pointer to the child
PDBAtom* BALL::SecondaryStructure::getPDBAtom ( Position  position  ) 

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:
position the position of the child PDBAtom
Returns:
PDBAtom* - constant pointer to the child
const Protein* BALL::SecondaryStructure::getProtein (  )  const

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
Protein* BALL::SecondaryStructure::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::SecondaryStructure::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 the given position.

Parameters:
position the position of the child Residue
Returns:
Residue* - constant pointer to the child
Residue* BALL::SecondaryStructure::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 the given position.

Parameters:
position the position of the child Residue
Returns:
Residue* - mutable pointer to the child
Type BALL::SecondaryStructure::getType (  )  const [inline]

Return the type of secondary structure.

void BALL::SecondaryStructure::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::SecondaryStructure::insert ( Atom atom  )  [private]

Insert an atom to the last position.

Parameters:
atom the atom to insert

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::insert ( Residue residue  ) 

Insert a Residue after the last position.

Parameters:
residue the Residue to insert
void BALL::SecondaryStructure::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::SecondaryStructure::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::SecondaryStructure::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 before
void BALL::SecondaryStructure::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::SecondaryStructure::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::SecondaryStructure::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
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_structure the 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 ==
void BALL::SecondaryStructure::persistentRead ( PersistenceManager pm  )  throw (Exception::GeneralException) [virtual]

Read a SecondaryStructure object from a persistent stream.

Reimplemented from BALL::AtomContainer.

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

Write a SecondaryStructure object to a persistent stream.

Reimplemented from BALL::AtomContainer.

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

Prepend an AtomContainer at position 0.

Parameters:
atom_container the AtomContainer to prepend

Reimplemented from BALL::AtomContainer.

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

Prepend an atom at position 0.

Parameters:
atom the atom to prepend

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::prepend ( Residue residue  ) 

Prepend a Residue at position 0.

Parameters:
residue the Residue to prepend
bool BALL::SecondaryStructure::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::SecondaryStructure::remove ( Atom atom  )  [private]

Remove an atom

Parameters:
atom the atom to remove

Reimplemented from BALL::AtomContainer.

bool BALL::SecondaryStructure::remove ( Residue residue  ) 

Remove a Residue.

Parameters:
residue the Residue to remove
void BALL::SecondaryStructure::set ( const SecondaryStructure secondary_structure,
bool  deep = true 
)

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

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

Set the type of secondary structure.

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.

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::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::SecondaryStructure::spliceAfter ( SecondaryStructure secondary_structure  ) 

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_structure the 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_container the AtomContainer to access

Reimplemented from BALL::AtomContainer.

void BALL::SecondaryStructure::spliceBefore ( SecondaryStructure secondary_structure  ) 

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_structure the SecondaryStructure to access
void BALL::SecondaryStructure::swap ( SecondaryStructure secondary_structure  ) 

Swapping of two secondary structures.

Parameters:
secondary_structure to swap with this instance

Member Data Documentation

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