#include <BALL/KERNEL/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 } |
Public Member Functions | |
bool | operator== (const Residue &residue) const |
bool | operator!= (const Residue &residue) const |
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) |
void | persistentRead (PersistenceManager &pm) throw (Exception::GeneralException) |
Assignment | |
void | set (const Residue &residue, bool deep=true) |
Residue & | operator= (const Residue &residue) |
void | get (Residue &residue, bool deep=true) const |
void | swap (Residue &residue) |
Accessors | |
String | getFullName (FullNameType type=ADD_VARIANT_EXTENSIONS) const |
bool | hasTorsionPhi () const |
Angle | getTorsionPhi () const |
bool | hasTorsionPsi () const |
Angle | getTorsionPsi () const |
Protein * | getProtein () |
const Protein * | getProtein () const |
Chain * | getChain () |
const Chain * | getChain () const |
SecondaryStructure * | getSecondaryStructure () |
const SecondaryStructure * | getSecondaryStructure () const |
PDBAtom * | getPDBAtom (Position position) |
const PDBAtom * | getPDBAtom (Position position) const |
void | setID (const String &id) |
const String & | getID () const |
void | setInsertionCode (char insertion_code) |
char | getInsertionCode () const |
Size | countPDBAtoms () const |
void | prepend (PDBAtom &atom) |
void | append (PDBAtom &atom) |
void | insert (PDBAtom &atom) |
void | insertBefore (PDBAtom &atom, Composite &before) |
void | insertAfter (PDBAtom &atom, Composite &after) |
bool | remove (PDBAtom &atom) |
void | spliceBefore (Residue &residue) |
void | spliceAfter (Residue &residue) |
void | splice (Residue &residue) |
Predicates | |
bool | isAminoAcid () const |
bool | isTerminal () const |
bool | isNTerminal () const |
bool | isCTerminal () const |
Debugging and Diagnostics | |
virtual bool | isValid () const |
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const |
Private Member Functions | |
AtomContainer * | getAtomContainer (Position position) |
const AtomContainer * | getAtomContainer (Position position) const |
Size | countAtomContainers () const |
void | prepend (AtomContainer &atom_container) |
void | append (AtomContainer &atom_container) |
void | insert (AtomContainer &atom_container) |
void | insertBefore (AtomContainer &atom_container, Composite &composite) |
void | insertAfter (AtomContainer &atom_container, Composite &composite) |
void | spliceBefore (AtomContainer &atom_container) |
void | spliceAfter (AtomContainer &base_ragment) |
void | splice (AtomContainer &AtomContainer) |
bool | remove (AtomContainer &AtomContainer) |
bool | isSuperAtomContainerOf (const AtomContainer &atom_container) const |
Private Attributes | |
String | id_ |
char | insertion_code_ |
Residue class. This class is used to represent residues in proteins.
Definition at line 38 of file residue.h.
Enum used to describe the kind of name constructed by getFullName .
The number of predefined properties for AtomContainer.
Reimplemented from BALL::Fragment.
BALL::Residue::Residue | ( | ) |
Default constructor.
BALL::Residue::Residue | ( | const String & | name, | |
const String & | id = BALL_RESIDUE_DEFAULT_ID , |
|||
char | insertion_code = BALL_RESIDUE_DEFAULT_INSERTION_CODE | |||
) |
Detailled constructor.
virtual BALL::Residue::~Residue | ( | ) | [virtual] |
Destructor.
void BALL::Residue::append | ( | AtomContainer & | atom_container | ) | [private] |
Append an AtomContainer at the last position.
atom_container | the AtomContainer to prepend |
Reimplemented from BALL::AtomContainer.
void BALL::Residue::append | ( | PDBAtom & | atom | ) |
virtual void BALL::Residue::clear | ( | ) | [virtual] |
Clears the contents of this instance.
Reimplemented from BALL::AtomContainer.
Size BALL::Residue::countAtomContainers | ( | ) | const [private] |
Count the child AtomContainers.
Reimplemented from BALL::AtomContainer.
Size BALL::Residue::countPDBAtoms | ( | ) | const |
Count the child PDBAtoms.
virtual void BALL::Residue::destroy | ( | ) | [virtual] |
Clears the contents of this instance and removes it from all composite structures.
Reimplemented from BALL::AtomContainer.
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.
Assign a Residue object from another instance.
const AtomContainer* BALL::Residue::getAtomContainer | ( | Position | position | ) | const [private] |
Get a constant pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.
position | of the child AtomContainer |
Reimplemented from BALL::AtomContainer.
AtomContainer* BALL::Residue::getAtomContainer | ( | Position | position | ) | [private] |
Get a pointer to a child AtomContainer at a given position. The pointer is 0 if this instance does not have an AtomContainer at the given position.
position | of the child AtomContainer |
Reimplemented from BALL::AtomContainer.
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 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 | ( | AtomContainer & | atom_container | ) | [private] |
Insert an AtomContainer at the last position.
atom_container | the AtomContainer to insert |
Reimplemented from BALL::AtomContainer.
void BALL::Residue::insert | ( | PDBAtom & | atom | ) |
void BALL::Residue::insertAfter | ( | AtomContainer & | atom_container, | |
Composite & | after | |||
) | [private] |
Insert an AtomContainer after a given Composite object.
atom_container | the AtomContainer to insert | |
after | the Composite object to insert after |
Reimplemented from BALL::AtomContainer.
void BALL::Residue::insertBefore | ( | AtomContainer & | atom_container, | |
Composite & | before | |||
) | [private] |
Insert an AtomContainer before a given Composite object.
atom_container | the AtomContainer to insert | |
before | the Composite object to insert before |
Reimplemented from BALL::AtomContainer.
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::isSuperAtomContainerOf | ( | const AtomContainer & | atom_container | ) | const [private] |
Test if an AtomContainer is the parent.
atom_container | the AtomContainer to test |
Reimplemented from BALL::AtomContainer.
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
otherwise Reimplemented from BALL::AtomContainer.
Inequality operator
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 | ( | AtomContainer & | atom_container | ) | [private] |
Prepend an AtomContainer at position 0.
atom_container | the AtomContainer to prepend |
Reimplemented from BALL::AtomContainer.
void BALL::Residue::prepend | ( | PDBAtom & | atom | ) |
bool BALL::Residue::remove | ( | AtomContainer & | atom_container | ) | [private] |
Remove an AtomContainer
atom_container | the AtomContainer to remove |
Reimplemented from BALL::AtomContainer.
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 | ( | 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::Residue::splice | ( | Residue & | residue | ) |
Move the children of residue
into this instance. The children are inserted using spliceBefore .
void BALL::Residue::spliceAfter | ( | AtomContainer & | atom_container | ) | [private] |
Cut all children of atom_container
and append them after the children of this instance.
atom_container | the AtomContainer to access |
Reimplemented from BALL::AtomContainer.
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 | ( | AtomContainer & | atom_container | ) | [private] |
Cut all children of atom_container
and prepend them before the children of this instance.
atom_container | the AtomContainer to access |
Reimplemented from BALL::AtomContainer.
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 |
String BALL::Residue::id_ [private] |
char BALL::Residue::insertion_code_ [private] |