BALL::Residue Class Reference
[Molecular Datastructures]

Residue class. More...

#include <residue.h>

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

List of all members.


Public Types

Enums
enum Property {
PROPERTY__NON_STANDARD = Fragment::NUMBER_OF_PROPERTIES + 1, PROPERTY__AMINO_ACID, PROPERTY__WATER, PROPERTY__HAS_SSBOND,
PROPERTY__C_TERMINAL, PROPERTY__N_TERMINAL, PROPERTY__CYCLIC, NUMBER_OF_PROPERTIES
}
The number of predefined properties for AtomContainer. More...
enum FullNameType { NO_VARIANT_EXTENSIONS, ADD_VARIANT_EXTENSIONS, ADD_RESIDUE_ID, ADD_VARIANT_EXTENSIONS_AND_ID }
Enum used to describe the kind of name constructed by getFullName . More...

Public Member Functions

bool operator== (const Residue &residue) const
Equality operator.
bool operator!= (const Residue &residue) const
Inequality operator.
Constructors and Destructors
Residue ()
Default constructor.
Residue (const Residue &residue, bool deep=true)
Copy constructor.
Residue (const String &name, const String &id=BALL_RESIDUE_DEFAULT_ID, char insertion_code=BALL_RESIDUE_DEFAULT_INSERTION_CODE)
Detailled constructor.
virtual ~Residue ()
Destructor.
virtual void clear ()
Clears the contents of this instance.
virtual void destroy ()
Clears the contents of this instance and removes it from all composite structures.
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
Writes a Residue object to a persistent stream.
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
Reads a Residue object from a persistent stream.
Assignment
void set (const Residue &residue, bool deep=true)
Assignment with cloning facility.
Residue & operator= (const Residue &residue)
Assignment operator.
void get (Residue &residue, bool deep=true) const
Assign a Residue object from another instance.
void swap (Residue &residue)
Swap the contents of two Residue objects.
Accessors
String getFullName (FullNameType type=ADD_VARIANT_EXTENSIONS) const
Return the fully qualified name.
bool hasTorsionPhi () const
Check whether the torsion angle phi is defined.
Angle getTorsionPhi () const
Calculate the torsion angle phi.
bool hasTorsionPsi () const
Check whether the torsion angle psi is defined.
Angle getTorsionPsi () const
Calculate the torsion angle psi.
Protein * getProtein ()
Get a pointer to the parent protein.
const Protein * getProtein () const
Get a constant pointer to the parent protein.
Chain * getChain ()
Get a pointer to the parent chain.
const Chain * getChain () const
Get a pointer to the parent chain.
SecondaryStructure * getSecondaryStructure ()
Get a pointer to the parent secondary structure.
const SecondaryStructure * getSecondaryStructure () const
Get a pointer to the parent secondary structure.
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.
void setID (const String &id)
Set the ID.
const String & getID () const
Retrieve the ID.
void setInsertionCode (char insertion_code)
Set the insertion code.
char getInsertionCode () const
Get the insertion code.
Size countPDBAtoms () const
Count the child PDBAtoms.
void prepend (PDBAtom &atom)
Prepend a PDBAtom at position 0.
void append (PDBAtom &atom)
Append a PDBAtom at the last position.
void insert (PDBAtom &atom)
Insert a PDBAtom at the last position.
void insertBefore (PDBAtom &atom, Composite &before)
Insert a PDBAtom before a given Composite object.
void insertAfter (PDBAtom &atom, Composite &after)
Insert a PDBAtom after a given Composite object.
bool remove (PDBAtom &atom)
Remove a PDBAtom.
void spliceBefore (Residue &residue)
Cut all children of residue and prepend them before the children of this instance.
void spliceAfter (Residue &residue)
Cut all children of residue and append them after the children of this instance.
void splice (Residue &residue)
Move the children of residue into this instance.
Predicates
bool isAminoAcid () const
Test if this residue is an amino acid.
bool isTerminal () const
Test if this residue is terminal.
bool isNTerminal () const
Test if this residue is N-terminal.
bool isCTerminal () const
Test if this residue is C-terminal.
Debugging and Diagnostics
virtual bool isValid () const
Internal state and consistency self-validation.
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
Internal state dump.

Detailed Description

Residue class.

This class is used to represent residues in proteins.


Member Enumeration Documentation

Enum used to describe the kind of name constructed by getFullName .

Enumerator:
NO_VARIANT_EXTENSIONS This returns the unmodified residue name only.
ADD_VARIANT_EXTENSIONS Add the residue variant extensions (e.g. '-C' for C-terminal residues).

The number of predefined properties for AtomContainer.

Enumerator:
PROPERTY__CYCLIC Property for cyclic peptides.

This property is set by the build bonds processor, if an atom of the first and an atom of the last residue in a chain share a bond.

Reimplemented from BALL::Fragment.


Member Function Documentation

void BALL::Residue::append ( PDBAtom & atom )

Append a PDBAtom at the last position.

Parameters:
atom the PDBAtom to append

Size BALL::Residue::countPDBAtoms ( ) const

Count the child PDBAtoms.

Returns:
Size the number of PDBAtoms

virtual void BALL::Residue::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::Fragment.

const Chain* BALL::Residue::getChain ( ) const

Get a pointer to the parent chain.

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

Returns:
Chain* - constant pointer to the parent chain

Chain* BALL::Residue::getChain ( )

Get a pointer to the parent chain.

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

Returns:
Chain* - mutable pointer to the parent chain

String BALL::Residue::getFullName ( FullNameType type = ADD_VARIANT_EXTENSIONS ) const

Return the fully qualified name.

Residue names are modified as follows:

  • -N is added for N terminal residues
  • -C is added for C terminal residue
  • [-]S is added for CYS involved in a disulphide bridge
  • -M is added for individual amino acids (C and N terminal)
Parameters:
type if type is set to NO_VARIANT_EXTENSIONS, the variant extension (-XX) is omitted.
Returns:
String the full fragment name

const String& BALL::Residue::getID ( ) const

Retrieve the ID.

Returns:
String the ID

char BALL::Residue::getInsertionCode ( ) const

Get the insertion code.

Returns:
char the insertion code

const PDBAtom* BALL::Residue::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* BALL::Residue::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

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

Get a pointer to the parent secondary structure.

The pointer is 0 if this instance does not have a parent secondary structure.

Returns:
SecondaryStructure* - mutable pointer to the parent chain

SecondaryStructure* BALL::Residue::getSecondaryStructure ( )

Get a pointer to the parent secondary structure.

The pointer is 0 if this instance does not have a parent secondary structure.

Returns:
SecondaryStructure* - mutable pointer to the parent chain

Angle BALL::Residue::getTorsionPhi ( ) const

Calculate the torsion angle phi.

Returns:
Angle - the torsion angle phi

Angle BALL::Residue::getTorsionPsi ( ) const

Calculate the torsion angle psi.

Returns:
Angle - the torsion angle phi

bool BALL::Residue::hasTorsionPhi ( ) const

Check whether the torsion angle phi is defined.

Returns:
bool

bool BALL::Residue::hasTorsionPsi ( ) const

Check whether the torsion angle psi is defined.

Returns:
bool

void BALL::Residue::insert ( PDBAtom & atom )

Insert a PDBAtom at the last position.

Parameters:
atom the PDBAtom to append

void BALL::Residue::insertAfter ( PDBAtom & atom,
Composite & after
)

Insert a PDBAtom after a given Composite object.

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

void BALL::Residue::insertBefore ( PDBAtom & atom,
Composite & before
)

Insert a PDBAtom before a given Composite object.

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

bool BALL::Residue::isAminoAcid ( ) const

Test if this residue is an amino acid.

Returns true, if this instance has the property "PROPERTY__AMINO_ACID".

Returns:
bool

bool BALL::Residue::isCTerminal ( ) const

Test if this residue is C-terminal.

Returns true, if this instance has the property "PROPERTY__AMINO_ACID" and is the last amino acid residue in its parent chain.

Returns:
bool

bool BALL::Residue::isNTerminal ( ) const

Test if this residue is N-terminal.

Returns true, if this instance has the property "PROPERTY__AMINO_ACID" and is the first amino acid residue in its parent chain.

Returns:
bool

bool BALL::Residue::isTerminal ( ) const

Test if this residue is terminal.

Returns true, if this instance has the property "PROPERTY__AMINO_ACID" and is the first or last amino acid residue in its parent chain.

Returns:
bool

virtual bool BALL::Residue::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::Residue::operator!= ( const Residue & residue ) const

Inequality operator.

See also:
operator ==

bool BALL::Residue::operator== ( const Residue & residue ) const

Equality operator.

Two residues are equal if they have the same handle.

See also:
Object::operator ==

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

Reads a Residue object from a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from BALL::Fragment.

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

Writes a Residue object to a persistent stream.

Parameters:
pm the persistence manager

Reimplemented from BALL::Fragment.

void BALL::Residue::prepend ( PDBAtom & atom )

Prepend a PDBAtom at position 0.

Parameters:
atom the PDBAtom to prepend

bool BALL::Residue::remove ( PDBAtom & atom )

Remove a PDBAtom.

Parameters:
atom the PDBAtom to remove

void BALL::Residue::set ( const Residue & residue,
bool deep = true
)

Assignment with cloning facility.

The assignment is either deep or shallow (default).

Parameters:
residue the Residue to be copied (cloned)
deep make a deep (=true) or shallow (=false) copy

void BALL::Residue::setID ( const String & id )

Set the ID.

Parameters:
id the new ID

void BALL::Residue::setInsertionCode ( char insertion_code )

Set the insertion code.

Parameters:
insertion_code the new insertion code

void BALL::Residue::splice ( Residue & residue )

Move the children of residue into this instance.

The children are inserted using spliceBefore .

void BALL::Residue::spliceAfter ( Residue & residue )

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

Parameters:
residue the residue to access

void BALL::Residue::spliceBefore ( Residue & residue )

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

Parameters:
residue the residue to access

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