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

SecondaryStructure Class Reference
[Miscellaneous]

Secondary structure class. More...

#include <secondaryStructure.h>

Inheritance diagram for SecondaryStructure:

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

Public Types

Enums
enum  Type {
  HELIX, COIL, STRAND, TURN,
  UNKNOWN, NUMBER_OF_TYPES
}
 Secondary structure type.

Public Member Functions

Constructors and Destructors
 SecondaryStructure () throw ()
 Default constructor.
 SecondaryStructure (const SecondaryStructure &secondary_structure, bool deep=true) throw ()
 Copy constructor.
 SecondaryStructure (const String &name) throw ()
virtual ~SecondaryStructure () throw ()
 Destructor.
virtual void clear () throw ()
 Clear the contents of the secondary structure.
virtual void destroy () throw ()
 Clear the contents of the secondary structure and remove it from all composite structures.
Predicates
bool operator== (const SecondaryStructure &secondary_structure) const throw ()
 Equality operator.
bool operator!= (const SecondaryStructure &secondary_structure) const throw ()
 Inequality operator.
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) throw ()
 Assignment.
SecondaryStructureoperator= (const SecondaryStructure &secondary_structure) throw ()
 Assignment operator.
void get (SecondaryStructure &secondary_structure, bool deep=true) const throw ()
 Assignment.
void swap (SecondaryStructure &secondary_structure) throw ()
 Swapping of two secondary structures.
Accessors
Type getType () const throw ()
 Return the type of secondary structure.
void setType (Type type) throw ()
 Set the type of secondary structure.
ProteingetProtein () throw ()
 Get a pointer to the parent protein.
const ProteingetProtein () const throw ()
 Get a pointer to the parent protein.
ChaingetChain () throw ()
 Get a pointer to the parent chain.
const ChaingetChain () const throw ()
 Get a pointer to the parent chain.
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 pointer to the N-terminal Residue.
ResiduegetCTerminal () throw ()
 Get a pointer to the C-terminal Residue.
const ResiduegetCTerminal () const throw ()
 Get a 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 countResidues () const throw ()
 Count the Residues.
Size countPDBAtoms () const throw ()
 Count the PDBAtoms.
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 (SecondaryStructure &secondary_structure) throw ()
 Move the children of secondary_structure into this instance.
void spliceAfter (SecondaryStructure &secondary_structure) throw ()
 Move the children of secondary_structure into this instance.
void splice (SecondaryStructure &secondary_structure) throw ()
 Move the children of secondary_structure into this instance.
Debugging and Diagnostics
virtual bool isValid () const throw ()
 Internal state and consistency self-validation.
virtual void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
 Internal state dump.

Protected Attributes

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

Detailed Description

Secondary structure class.

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


Member Function Documentation

void SecondaryStructure::append Residue residue  )  throw ()
 

Append a Residue after the last position.

Parameters:
residue the Residue to append

Size SecondaryStructure::countPDBAtoms  )  const throw ()
 

Count the PDBAtoms.

Returns:
Size the number of PDBAtoms

Size SecondaryStructure::countResidues  )  const throw ()
 

Count the Residues.

Returns:
Size the number of residues

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

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

Assignment.

The assignment is either deep or shallow (default).

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

const Chain* SecondaryStructure::getChain  )  const throw ()
 

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

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* SecondaryStructure::getCTerminal  )  const 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* - constant pointer to the C-terminal Residue

Residue* SecondaryStructure::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* SecondaryStructure::getNTerminal  )  const 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* - constant pointer to the N-terminal Residue

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

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

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* SecondaryStructure::getProtein  )  const throw ()
 

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

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

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

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

void SecondaryStructure::insert Residue residue  )  throw ()
 

Insert a Residue after the last position.

Parameters:
residue the Residue to insert

void SecondaryStructure::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 before

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

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

Internal state and consistency self-validation.

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

Reimplemented from AtomContainer.

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

Inequality operator.

See also:
operator ==

SecondaryStructure& SecondaryStructure::operator= const SecondaryStructure secondary_structure  )  throw ()
 

Assignment operator.

Parameters:
secondary_structure the SecondaryStructure to be copied (cloned)
Returns:
Secondary_structure& - this instance
See also:
SecondaryStructure::set

bool SecondaryStructure::operator== const SecondaryStructure secondary_structure  )  const throw ()
 

Equality operator.

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

See also:
Object::operator ==

void SecondaryStructure::prepend Residue residue  )  throw ()
 

Prepend a Residue at position 0.

Parameters:
residue the Residue to prepend

bool SecondaryStructure::remove Residue residue  )  throw ()
 

Remove a Residue.

Parameters:
residue the Residue to remove

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

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

Move the children of secondary_structure into this instance.

The children are inserted using spliceBefore .

void SecondaryStructure::spliceAfter SecondaryStructure secondary_structure  )  throw ()
 

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

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

Swapping of two secondary structures.

Parameters:
secondary_structure to swap with this instance