BALL 1.5.0
Loading...
Searching...
No Matches
BALL::Residue Class Reference

#include <BALL/KERNEL/residue.h>

Inheritance diagram for BALL::Residue:
BALL::Fragment BALL::AtomContainer BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable

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
}
enum  FullNameType { NO_VARIANT_EXTENSIONS , ADD_VARIANT_EXTENSIONS , ADD_RESIDUE_ID , ADD_VARIANT_EXTENSIONS_AND_ID }
Public Types inherited from BALL::Fragment
enum  Property { NUMBER_OF_PROPERTIES = AtomContainer::NUMBER_OF_PROPERTIES }
Public Types inherited from BALL::AtomContainer
enum  Property { NUMBER_OF_PROPERTIES = 0 }
 The number of predefined properties for AtomContainer. More...
Public Types inherited from BALL::Composite
enum  StampType { MODIFICATION = 1 , SELECTION = 2 , BOTH = 3 }
typedef UnaryPredicate< CompositeKernelPredicateType
typedef ForwardIterator< Composite, Composite, Composite *, AncestorIteratorTraitsAncestorIterator
typedef ConstForwardIterator< Composite, Composite, Composite *, AncestorIteratorTraitsAncestorConstIterator
typedef BidirectionalIterator< Composite, Composite, Composite *, ChildCompositeIteratorTraitsChildCompositeIterator
typedef ConstBidirectionalIterator< Composite, Composite, Composite *, ChildCompositeIteratorTraitsChildCompositeConstIterator
typedef std::reverse_iterator< ChildCompositeIteratorChildCompositeReverseIterator
typedef std::reverse_iterator< ChildCompositeConstIteratorChildCompositeConstReverseIterator
typedef BidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraitsCompositeIterator
typedef ConstBidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraitsCompositeConstIterator
typedef std::reverse_iterator< CompositeIteratorCompositeReverseIterator
typedef std::reverse_iterator< CompositeConstIteratorCompositeConstReverseIterator

Public Member Functions

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
void persistentRead (PersistenceManager &pm)
Assignment
void set (const Residue &residue, bool deep=true)
Residueoperator= (const Residue &residue)
void get (Residue &residue, bool deep=true) const
void swap (Residue &residue)
bool operator== (const Residue &residue) const
bool operator!= (const Residue &residue) const
Accessors
String getFullName (FullNameType type=ADD_VARIANT_EXTENSIONS) const
bool hasTorsionPhi () const
Angle getTorsionPhi () const
bool hasTorsionPsi () const
Angle getTorsionPsi () const
bool hasTorsionOmega () const
Angle getTorsionOmega () const
ProteingetProtein ()
const ProteingetProtein () const
ChaingetChain ()
const ChaingetChain () const
SecondaryStructuregetSecondaryStructure ()
const SecondaryStructuregetSecondaryStructure () const
PDBAtomgetPDBAtom (Position position)
const PDBAtomgetPDBAtom (Position position) const
void setID (const String &id)
const StringgetID () const
void setInsertionCode (char insertion_code)
void unsetInsertionCode ()
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
Type predicates
virtual bool isResidue () const
Public Member Functions inherited from BALL::Fragment
 Fragment ()
 Fragment (const Fragment &fragment, bool deep=true)
 Fragment (const String &name)
virtual ~Fragment ()
Fragmentoperator= (const Fragment &fragment)
bool operator== (const Fragment &fragment) const
bool operator!= (const Fragment &fragment) const
virtual bool isFragment () const
Public Member Functions inherited from BALL::AtomContainer
 AtomContainer ()
 AtomContainer (const AtomContainer &atom_container, bool deep=true)
 AtomContainer (const String &name)
virtual ~AtomContainer ()
void set (const AtomContainer &atom_container, bool deep=true)
AtomContaineroperator= (const AtomContainer &atom_container)
void get (AtomContainer &atom_container, bool deep=true) const
void swap (AtomContainer &atom_container)
bool operator== (const AtomContainer &atom_container) const
bool operator!= (const AtomContainer &atom_container) const
bool isSubAtomContainerOf (const AtomContainer &atom_container) const
bool isSuperAtomContainerOf (const AtomContainer &atom_container) const
void setName (const String &name)
const StringgetName () const
AtomContainergetSuperAtomContainer ()
const AtomContainergetSuperAtomContainer () const
AtomContainergetAtomContainer (Position position)
const AtomContainergetAtomContainer (Position position) const
AtomgetAtom (Position position)
const AtomgetAtom (Position position) const
AtomgetAtom (const String &name)
const AtomgetAtom (const String &name) const
Size countAtomContainers () const
Size countAtoms () const
Size countBonds () const
Size countInterBonds () const
Size countIntraBonds () 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)
Size removeHavingProperty (BALL::Property p)
Size removeNotHavingProperty (BALL::Property p)
Size removeHavingProperty (const string &name)
Size removeNotHavingProperty (const string &name)
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)
void destroyBonds ()
bool applyIntraBond (UnaryProcessor< Bond > &processor)
 Apply to all bonds connecting two atoms inside this AtomContainer.
bool applyInterBond (UnaryProcessor< Bond > &processor)
 Apply to all bonds connected to atoms outside this AtomContainer.
Public Member Functions inherited from BALL::Composite
template<typename T>
BALL_INLINE bool apply (UnaryProcessor< T > &processor)
template<typename T>
BALL_INLINE bool apply (ConstUnaryProcessor< T > &processor) const
template<typename T>
BALL_INLINE T * getAncestor (const T &)
template<typename T>
BALL_INLINE const T * getAncestor (const T &) const
template<typename T>
BALL_INLINE T * getPrevious (const T &)
template<typename T>
BALL_INLINE const T * getPrevious (const T &dummy) const
template<typename T>
BALL_INLINE T * getNext (const T &)
template<typename T>
BALL_INLINE const T * getNext (const T &dummy) const
template<typename T>
BALL_INLINE bool hasAncestor (const T &dummy) const
 Composite ()
 Composite (const Composite &composite, bool deep=true)
virtual ~Composite ()
void destroy (bool virtual_destroy)
void * clone (Composite &root) const
bool operator== (const Composite &composite) const
bool operator!= (const Composite &composite) const
bool isEmpty () const
bool isRoot () const
bool isRootOf (const Composite &composite) const
bool isInterior () const
bool hasChild () const
bool isChildOf (const Composite &composite) const
bool isFirstChild () const
bool isFirstChildOf (const Composite &composite) const
bool isLastChild () const
bool isLastChildOf (const Composite &composite) const
bool hasParent () const
bool isParentOf (const Composite &composite) const
bool hasSibling () const
bool isSiblingOf (const Composite &composite) const
bool hasPreviousSibling () const
bool isPreviousSiblingOf (const Composite &composite) const
bool hasNextSibling () const
bool isNextSiblingOf (const Composite &composite) const
bool isDescendantOf (const Composite &composite) const
template<typename T>
bool hasAncestor (const T &dummy) const
bool isAncestorOf (const Composite &composite) const
bool isRelatedWith (const Composite &composite) const
bool isHomomorph (const Composite &composite) const
bool containsSelection () const
virtual bool isAtom () const
virtual bool isMolecule () const
virtual bool isProtein () const
virtual bool isChain () const
void host (Visitor< Composite > &visitor)
template<typename T>
bool applyAncestor (UnaryProcessor< T > &processor)
template<typename T>
bool applyAncestor (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyChild (UnaryProcessor< T > &processor)
template<typename T>
bool applyChild (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyDescendantPreorder (UnaryProcessor< T > &processor)
template<typename T>
bool applyDescendantPreorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyDescendantPostorder (UnaryProcessor< T > &processor)
template<typename T>
bool applyDescendantPostorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyDescendant (UnaryProcessor< T > &processor)
template<typename T>
bool applyDescendant (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyPreorder (UnaryProcessor< T > &processor)
template<typename T>
bool applyPreorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyPostorder (UnaryProcessor< T > &processor)
template<typename T>
bool applyPostorder (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool apply (UnaryProcessor< T > &processor)
template<typename T>
bool apply (ConstUnaryProcessor< T > &processor) const
template<typename T>
bool applyLevel (UnaryProcessor< T > &processor, long level)
template<typename T>
bool applyLevel (ConstUnaryProcessor< T > &processor, long level) const
AncestorIterator beginAncestor ()
AncestorIterator endAncestor ()
AncestorConstIterator beginAncestor () const
AncestorConstIterator endAncestor () const
ChildCompositeIterator beginChildComposite ()
ChildCompositeIterator endChildComposite ()
ChildCompositeConstIterator beginChildComposite () const
ChildCompositeConstIterator endChildComposite () const
ChildCompositeReverseIterator rbeginChildComposite ()
ChildCompositeReverseIterator rendChildComposite ()
ChildCompositeConstReverseIterator rbeginChildComposite () const
ChildCompositeConstReverseIterator rendChildComposite () const
CompositeIterator beginComposite ()
CompositeIterator endComposite ()
CompositeConstIterator beginComposite () const
CompositeConstIterator endComposite () const
CompositeReverseIterator rbeginComposite ()
CompositeReverseIterator rendComposite ()
CompositeConstReverseIterator rbeginComposite () const
CompositeConstReverseIterator rendComposite () const
void deleteChildrenList_ (std::list< Composite * > &composites)
void set (const Composite &composite, bool deep=true)
Compositeoperator= (const Composite &composite)
void get (Composite &composite, bool deep=true) const
Size getDegree () const
Size count (const KernelPredicateType &predicate) const
Size countDescendants () const
Size getPathLength (const Composite &composite) const
Size getDepth () const
Size getHeight () const
CompositegetRoot ()
const CompositegetRoot () const
CompositegetLowestCommonAncestor (const Composite &composite)
const CompositegetLowestCommonAncestor (const Composite &composite) const
template<typename T>
T * getAncestor (const T &)
template<typename T>
const T * getAncestor (const T &) const
template<typename T>
T * getPrevious (const T &)
template<typename T>
const T * getPrevious (const T &dummy) const
template<typename T>
T * getNext (const T &)
template<typename T>
const T * getNext (const T &dummy) const
CompositegetParent ()
const CompositegetParent () const
CompositegetChild (Index index)
const CompositegetChild (Index index) const
CompositegetSibling (Index index)
const CompositegetSibling (Index index) const
CompositegetFirstChild ()
const CompositegetFirstChild () const
CompositegetLastChild ()
const CompositegetLastChild () const
const PreciseTimegetModificationTime () const
const PreciseTimegetSelectionTime () const
void stamp (StampType stamp=BOTH)
void prependChild (Composite &composite)
void appendChild (Composite &composite)
void insertBefore (Composite &composite)
void insertAfter (Composite &composite)
void spliceBefore (Composite &composite)
void spliceAfter (Composite &composite)
void splice (Composite &composite)
bool removeChild (Composite &child)
Size removeSelected ()
Size removeUnselected ()
void replace (Composite &composite)
void swap (Composite &composite)
virtual void select ()
virtual void deselect ()
Public Member Functions inherited from BALL::PersistentObject
 PersistentObject ()
virtual ~PersistentObject ()
PersistenceManageroperator>> (PersistenceManager &pm) const
virtual void finalize ()
Public Member Functions inherited from BALL::Object
 Object ()
 Default constructor.
 Object (const Object &object)
 Copy constructor.
virtual ~Object ()
 Destructor.
const Objectoperator= (const Object &)
bool operator== (const Object &object) const
bool operator!= (const Object &object) const
bool operator< (const Object &object) const
bool operator<= (const Object &object) const
bool operator>= (const Object &object) const
bool operator> (const Object &object) const
int compare (const Object &object) const
virtual void dump (::std::ostream &s=std::cout, Size depth=0) const
Handle getHandle () const
Public Member Functions inherited from BALL::AutoDeletable
virtual ~AutoDeletable ()
void * operator new (size_t size)
void operator delete (void *ptr)
void * operator new (size_t size, void *ptr)
void operator delete (void *ptr, void *)
bool isAutoDeletable () const
void setAutoDeletable (bool enable)
Public Member Functions inherited from BALL::Selectable
 Selectable ()
 Selectable (const Selectable &selectable, bool deep=true)
virtual ~Selectable ()
void set (const Selectable &selectable, bool deep=true)
const Selectableoperator= (const Selectable &selectable)
void get (Selectable &selectable, bool deep=true) const
void swap (Selectable &selectable)
virtual void setSelected (bool selected)
bool isSelected () const
bool operator== (const Selectable &selectable) const
bool operator!= (const Selectable &selectable) const
void write (PersistenceManager &pm) const
bool read (PersistenceManager &pm)
virtual void dump (::std::ostream &s=std::cout, Size depth=0) const
Public Member Functions inherited from BALL::PropertyManager
BALL_INLINE PropertyManager ()
 Default constructor.
BALL_INLINE PropertyManager (const PropertyManager &property_manager)
 Copy constructor.
virtual ~PropertyManager ()
 Destructor.
void set (const PropertyManager &property_manager)
const PropertyManageroperator= (const PropertyManager &property_manager)
void get (PropertyManager &property_manager) const
void swap (PropertyManager &property_manager)
BitVectorgetBitVector ()
const BitVectorgetBitVector () const
 operator BitVector & ()
void setProperty (Property property)
void clearProperty (Property property)
void toggleProperty (Property property)
Size countProperties () const
const NamedPropertygetNamedProperty (Position index) const
NamedPropertygetNamedProperty (Position index)
void setProperty (const NamedProperty &property)
void setProperty (const std::string &name)
void setProperty (const std::string &name, bool value)
void setProperty (const std::string &name, int value)
void setProperty (const std::string &name, unsigned int value)
void setProperty (const std::string &name, float value)
void setProperty (const std::string &name, double value)
void setProperty (const std::string &name, const std::string &value)
void setProperty (const std::string &name, const PersistentObject &value)
const NamedPropertygetProperty (const std::string &name) const
NamedPropertyIterator beginNamedProperty ()
NamedPropertyIterator endNamedProperty ()
void clearProperty (const std::string &name)
Size countNamedProperties () const
bool hasProperty (Property property) const
 Query for an unnamed property.
bool hasProperty (const std::string &name) const
 Query for a named property.
bool operator== (const PropertyManager &pm) const
bool operator!= (const PropertyManager &pm) const
 Inequality operator.
void write (PersistenceManager &pm) const
 Persistent stream writing.
bool read (PersistenceManager &pm)
 Persistent stream reading.
bool isValid () const
void dump (std::ostream &s=std::cout, Size depth=0) const

Debugging and Diagnostics

virtual bool isValid () const
virtual void dump (std::ostream &s=std::cout, Size depth=0) const

Additional Inherited Members

static bool insertParent (Composite &parent, Composite &first, Composite &last, bool destroy_parent=true)
static Handle getNextHandle ()
static Handle getNewHandle ()
static void clearLastPtr ()
static UnaryProcessor< CompositeDEFAULT_PROCESSOR
static KernelPredicateType DEFAULT_UNARY_PREDICATE
 AutoDeletable ()
 AutoDeletable (const AutoDeletable &auto_deletable, bool deep=false)
bool selected_

Detailed Description

Residue class. This class is used to represent residues in proteins.

Definition at line 36 of file residue.h.

Member Enumeration Documentation

◆ FullNameType

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).

ADD_RESIDUE_ID 
ADD_VARIANT_EXTENSIONS_AND_ID 

Definition at line 76 of file residue.h.

◆ Property

Enumerator
PROPERTY__NON_STANDARD 
PROPERTY__AMINO_ACID 
PROPERTY__WATER 
PROPERTY__HAS_SSBOND 
PROPERTY__C_TERMINAL 
PROPERTY__N_TERMINAL 
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.

NUMBER_OF_PROPERTIES 

Definition at line 48 of file residue.h.

Constructor & Destructor Documentation

◆ Residue() [1/3]

BALL::Residue::Residue ( )

Default constructor.

◆ Residue() [2/3]

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

Copy constructor.

◆ Residue() [3/3]

BALL::Residue::Residue ( const String & name,
const String & id = BALL_RESIDUE_DEFAULT_ID,
char insertion_code = BALL_RESIDUE_DEFAULT_INSERTION_CODE )

Detailled constructor.

◆ ~Residue()

virtual BALL::Residue::~Residue ( )
virtual

Destructor.

Member Function Documentation

◆ append()

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

Append a PDBAtom at the last position.

Parameters
atomthe PDBAtom to append

◆ clear()

virtual void BALL::Residue::clear ( )
virtual

Clears the contents of this instance.

Reimplemented from BALL::AtomContainer.

◆ countPDBAtoms()

Size BALL::Residue::countPDBAtoms ( ) const

Count the child PDBAtoms.

Returns
Size the number of PDBAtoms

◆ destroy()

virtual void BALL::Residue::destroy ( )
virtual

Clears the contents of this instance and removes it from all composite structures.

Reimplemented from BALL::AtomContainer.

◆ dump()

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
soutput stream where to output the internal state
depththe dumping depth

Reimplemented from BALL::Fragment.

◆ get()

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

Assign a Residue object from another instance.

◆ getChain() [1/2]

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

◆ getChain() [2/2]

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

◆ getFullName()

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
typeif type is set to NO_VARIANT_EXTENSIONS, the variant extension (-XX) is omitted.
Returns
String the full fragment name

◆ getID()

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

Retrieve the ID.

Returns
String the ID

◆ getInsertionCode()

char BALL::Residue::getInsertionCode ( ) const

Get the insertion code.

Returns
char the insertion code

◆ getPDBAtom() [1/2]

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
positionthe position of the child PDBAtom
Returns
PDBAtom* - mutable pointer to the child

◆ getPDBAtom() [2/2]

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
positionthe position of the child PDBAtom
Returns
PDBAtom* - constant pointer to the child

◆ getProtein() [1/2]

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

◆ getProtein() [2/2]

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

◆ getSecondaryStructure() [1/2]

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

◆ getSecondaryStructure() [2/2]

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

◆ getTorsionOmega()

Angle BALL::Residue::getTorsionOmega ( ) const

Calculate the torsion angle psi.

Returns
Angle - the torsion angle phi

◆ getTorsionPhi()

Angle BALL::Residue::getTorsionPhi ( ) const

Calculate the torsion angle phi.

Returns
Angle - the torsion angle phi

◆ getTorsionPsi()

Angle BALL::Residue::getTorsionPsi ( ) const

Calculate the torsion angle psi.

Returns
Angle - the torsion angle phi

◆ hasTorsionOmega()

bool BALL::Residue::hasTorsionOmega ( ) const

Check whether the torsion angle omega is defined.

Returns
bool

◆ hasTorsionPhi()

bool BALL::Residue::hasTorsionPhi ( ) const

Check whether the torsion angle phi is defined.

Returns
bool

◆ hasTorsionPsi()

bool BALL::Residue::hasTorsionPsi ( ) const

Check whether the torsion angle psi is defined.

Returns
bool

◆ insert()

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

Insert a PDBAtom at the last position.

Parameters
atomthe PDBAtom to append

◆ insertAfter()

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

Insert a PDBAtom after a given Composite object.

Parameters
atomthe PDBAtom to insert
afterthe Composite object to insert after

◆ insertBefore()

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

Insert a PDBAtom before a given Composite object.

Parameters
atomthe PDBAtom to insert
beforethe Composite object to insert before

◆ isAminoAcid()

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

◆ isCTerminal()

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

◆ isNTerminal()

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

◆ isResidue()

virtual bool BALL::Residue::isResidue ( ) const
inlinevirtual

Test if the Composite is a Residue

Reimplemented from BALL::Composite.

Definition at line 389 of file residue.h.

◆ isTerminal()

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

◆ isValid()

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.

◆ operator!=()

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

Inequality operator

See also
operator ==

◆ operator=()

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

Assignment operator

◆ 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 ==

◆ persistentRead()

void BALL::Residue::persistentRead ( PersistenceManager & pm)
virtual

Reads a Residue object from a persistent stream.

Parameters
pmthe persistence manager

Reimplemented from BALL::Fragment.

◆ persistentWrite()

void BALL::Residue::persistentWrite ( PersistenceManager & pm,
const char * name = 0 ) const
virtual

Writes a Residue object to a persistent stream.

Parameters
pmthe persistence manager

Reimplemented from BALL::Fragment.

◆ prepend()

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

Prepend a PDBAtom at position 0.

Parameters
atomthe PDBAtom to prepend

◆ remove()

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

Remove a PDBAtom.

Parameters
atomthe PDBAtom to remove

◆ set()

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

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

Parameters
residuethe Residue to be copied (cloned)
deepmake a deep (=true) or shallow (=false) copy

◆ setID()

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

Set the ID.

Parameters
idthe new ID

◆ setInsertionCode()

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

Set the insertion code.

An insertion code is a visible ASCII character as well as the space character ' '.

Parameters
insertion_codethe new insertion code
Exceptions
InvalidArgumentif an unsupported insertion code has been specified.

◆ splice()

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

Move the children of residue into this instance. The children are inserted using spliceBefore .

◆ spliceAfter()

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

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

Parameters
residuethe residue to access

◆ spliceBefore()

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

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

Parameters
residuethe residue to access

◆ swap()

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

Swap the contents of two Residue objects.

◆ unsetInsertionCode()

void BALL::Residue::unsetInsertionCode ( )

Unset the current insertion code.

This is equivalent to calling setInsertionCode(' ').