#include <residue.h>
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. |
This class is used to represent residues in proteins.
Enum used to describe the kind of name constructed by getFullName .
The number of predefined properties for AtomContainer.
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.
void BALL::Residue::append | ( | PDBAtom & | atom | ) |
Size BALL::Residue::countPDBAtoms | ( | ) | const |
Count the child 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 .
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.
Chain* BALL::Residue::getChain | ( | ) |
Get a pointer to the parent chain.
The pointer is 0 if this instance does not have a 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)type | if type is set to
NO_VARIANT_EXTENSIONS , the variant
extension (-XX ) is omitted. |
char BALL::Residue::getInsertionCode | ( | ) | const |
Get the insertion code.
const PDBAtom* BALL::Residue::getPDBAtom | ( | Position | position | ) | const |
PDBAtom* BALL::Residue::getPDBAtom | ( | Position | position | ) |
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.
Protein* BALL::Residue::getProtein | ( | ) |
Get a pointer to the parent protein.
The pointer is 0 if this instance does not have a 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.
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.
Angle BALL::Residue::getTorsionPhi | ( | ) | const |
Calculate the torsion angle phi.
Angle BALL::Residue::getTorsionPsi | ( | ) | const |
Calculate the torsion angle psi.
bool BALL::Residue::hasTorsionPhi | ( | ) | const |
Check whether the torsion angle phi is defined.
bool BALL::Residue::hasTorsionPsi | ( | ) | const |
Check whether the torsion angle psi is defined.
void BALL::Residue::insert | ( | PDBAtom & | atom | ) |
bool BALL::Residue::isAminoAcid | ( | ) | const |
Test if this residue is an amino acid.
Returns true, if this instance has the property "PROPERTY__AMINO_ACID".
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.
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.
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.
virtual bool BALL::Residue::isValid | ( | ) | const [virtual] |
Internal state and consistency self-validation.
true
if the internal state is
correct (self-validated) and consistent,
false
otherwiseReimplemented from BALL::AtomContainer.
bool BALL::Residue::operator!= | ( | const Residue & | residue | ) | const |
Inequality operator.
bool BALL::Residue::operator== | ( | const Residue & | residue | ) | const |
Equality operator.
Two residues are equal if they have the same handle.
void BALL::Residue::persistentRead | ( | PersistenceManager & | pm | ) | throw (Exception::GeneralException)
[virtual] |
Reads a Residue object from a persistent stream.
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.
pm | the persistence manager |
Reimplemented from BALL::Fragment.
void BALL::Residue::prepend | ( | PDBAtom & | atom | ) |
bool BALL::Residue::remove | ( | PDBAtom & | atom | ) |
void BALL::Residue::set | ( | const Residue & | residue, | |
bool | deep =
true |
|||
) |
Assignment with cloning facility.
The assignment is either deep or shallow (default).
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.
id | the new ID |
void BALL::Residue::setInsertionCode | ( | char | insertion_code | ) |
Set the insertion code.
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.
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.
residue | the residue to access |