Loading...
Searching...
No Matches
BALL::Protein Class Reference
Kernel Classes » Molecular Datastructures

`#include <BALL/KERNEL/protein.h>`

Inheritance diagram for BALL::Protein:

## Public Types

Enums
enum | Property { NUMBER_OF_PROPERTIES = Molecule::NUMBER_OF_PROPERTIES }
Public Types inherited from BALL::Molecule
enum | Property { IS_SOLVENT = AtomContainer::NUMBER_OF_PROPERTIES , 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< Composite > | KernelPredicateType
typedef ForwardIterator< Composite, Composite, Composite *, AncestorIteratorTraits > | AncestorIterator
typedef ConstForwardIterator< Composite, Composite, Composite *, AncestorIteratorTraits > | AncestorConstIterator
typedef BidirectionalIterator< Composite, Composite, Composite *, ChildCompositeIteratorTraits > | ChildCompositeIterator
typedef ConstBidirectionalIterator< Composite, Composite, Composite *, ChildCompositeIteratorTraits > | ChildCompositeConstIterator
typedef std::reverse_iterator< ChildCompositeIterator > | ChildCompositeReverseIterator
typedef std::reverse_iterator< ChildCompositeConstIterator > | ChildCompositeConstReverseIterator
typedef BidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraits > | CompositeIterator
typedef ConstBidirectionalIterator< Composite, Composite, Composite *, CompositeIteratorTraits > | CompositeConstIterator
typedef std::reverse_iterator< CompositeIterator > | CompositeReverseIterator
typedef std::reverse_iterator< CompositeConstIterator > | CompositeConstReverseIterator

## Public Member Functions

Constructors and Destructors
| Protein ()
| Default constructor.
| Protein (const Protein &protein, bool deep=true)
| Copy constructor.
| Protein (const String &name, const String &id=BALL_PROTEIN_DEFAULT_ID)
| Detailled constructor.
virtual | ~Protein ()
| Destructor.
virtual void | clear ()
| Clears the contents of the protein.
virtual void | destroy ()
Persistence
void | persistentWrite (PersistenceManager &pm, const char *name=0) const
void | persistentRead (PersistenceManager &pm)
Assignment Methods
void | set (const Protein &protein, bool deep=true)
Protein & | operator= (const Protein &protein)
void | get (Protein &protein, bool deep=true) const
void | swap (Protein &protein)
bool | operator== (const Protein &protein) const
bool | operator!= (const Protein &protein) const
Accessors
Chain * | getChain (Position position)
const Chain * | getChain (Position position) const
SecondaryStructure * | getSecondaryStructure (Position position)
const SecondaryStructure * | getSecondaryStructure (Position position) const
Residue * | getResidue (Position position)
const Residue * | getResidue (Position position) const
Residue * | getResidueByID (String residue_ID)
const Residue * | getResidueByID (String residue_ID) const
Residue * | getNTerminal ()
const Residue * | getNTerminal () const
Residue * | getCTerminal ()
const Residue * | getCTerminal () const
PDBAtom * | getPDBAtom (Position position)
const PDBAtom * | getPDBAtom (Position position) const
void | setID (const String &id)
const String & | getID () const
Size | countChains () const
Size | countSecondaryStructures () const
Size | countResidues () const
Size | countPDBAtoms () const
void | prepend (Atom &atom)
void | prepend (AtomContainer &atom_container)
void | prepend (Molecule &molecule)
void | append (Atom &atom)
void | append (AtomContainer &atom_container)
void | append (Molecule &molecule)
void | insert (Atom &atom)
void | insert (AtomContainer &atom_container)
void | insert (Molecule &molecule)
void | insertBefore (Atom &atom, Composite &before)
void | insertBefore (AtomContainer &atom_container, Composite &before)
void | insertBefore (Molecule &molecule, Composite &composite)
void | insertAfter (Atom &atom, Composite &after)
void | insertAfter (AtomContainer &atom_container, Composite &after)
void | insertAfter (Molecule &molecule, Composite &composite)
bool | remove (Atom &atom)
bool | remove (AtomContainer &atom_container)
bool | remove (Molecule &molecule)
void | splice (AtomContainer &atom_container)
void | spliceBefore (AtomContainer &atom_container)
void | spliceAfter (AtomContainer &atom_container)
Type predicates
virtual bool | isProtein () const
Public Member Functions inherited from BALL::Molecule
| Molecule ()
| Molecule (const Molecule &molecule, bool deep=true)
| Molecule (const AtomContainer &atomContainer, bool deep=true)
| Molecule (const String &name)
virtual | ~Molecule ()
void | set (const Molecule &molecule, bool deep=true)
Molecule & | operator= (const Molecule &molecule)
void | get (Molecule &molecule, bool deep=true) const
void | swap (Molecule &molecule)
System * | getSystem ()
const System * | getSystem () 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)
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)
virtual bool | isMolecule () const
bool | operator== (const Molecule &molecule) const
bool | operator!= (const Molecule &molecule) 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)
AtomContainer & | operator= (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 String & | getName () const
AtomContainer * | getSuperAtomContainer ()
const AtomContainer * | getSuperAtomContainer () const
AtomContainer * | getAtomContainer (Position position)
const AtomContainer * | getAtomContainer (Position position) const
Atom * | getAtom (Position position)
const Atom * | getAtom (Position position) const
Atom * | getAtom (const String &name)
const Atom * | getAtom (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 | isFragment () const
virtual bool | isResidue () 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)
Composite & | operator= (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
Composite & | getRoot ()
const Composite & | getRoot () const
Composite * | getLowestCommonAncestor (const Composite &composite)
const Composite * | getLowestCommonAncestor (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
Composite * | getParent ()
const Composite * | getParent () const
Composite * | getChild (Index index)
const Composite * | getChild (Index index) const
Composite * | getSibling (Index index)
const Composite * | getSibling (Index index) const
Composite * | getFirstChild ()
const Composite * | getFirstChild () const
Composite * | getLastChild ()
const Composite * | getLastChild () const
const PreciseTime & | getModificationTime () const
const PreciseTime & | getSelectionTime () 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 ()
PersistenceManager & | operator>> (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 Object & | operator= (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 Selectable & | operator= (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 PropertyManager & | operator= (const PropertyManager &property_manager)
void | get (PropertyManager &property_manager) const
void | swap (PropertyManager &property_manager)
BitVector & | getBitVector ()
const BitVector & | getBitVector () const
| operator BitVector & ()
void | setProperty (Property property)
void | clearProperty (Property property)
void | toggleProperty (Property property)
Size | countProperties () const
const NamedProperty & | getNamedProperty (Position index) const
NamedProperty & | getNamedProperty (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 NamedProperty & | getProperty (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< Composite > | DEFAULT_PROCESSOR
static KernelPredicateType | DEFAULT_UNARY_PREDICATE
Molecule * | getMolecule ()
const Molecule * | getMolecule () const
AtomContainer * | getSuperAtomContainer ()
const AtomContainer * | getSuperAtomContainer () const
void | prepend (Molecule &molecule)
void | append (Molecule &molecule)
void | insert (Molecule &molecule)
void | insertBefore (Molecule &molecule, Composite &composite)
void | insertAfter (Molecule &molecule, Composite &composite)
bool | remove (Molecule &molecule)
bool | isSubAtomContainerOf (const AtomContainer &atom_container) const
| AutoDeletable ()
| AutoDeletable (const AutoDeletable &auto_deletable, bool deep=false)
bool | selected_

## Detailed Description

Protein Class. This class is used to represent proteins. A protein may contain several Chain , SecondaryStructure , and Residue .

Definition at line 28 of file protein.h.

## Member Enumeration Documentation

## Property

enum BALL::Protein::Property

Enumerator
NUMBER_OF_PROPERTIES |

Definition at line 41 of file protein.h.

## Constructor & Destructor Documentation

## Protein() [1/3]

BALL::Protein::Protein | ( |  | ) |

Default constructor.

## Protein() [2/3]

BALL::Protein::Protein | ( | const Protein & | protein,
|  | bool | deep = true )

Copy constructor.

## Protein() [3/3]

BALL::Protein::Protein | ( | const String & | name,
|  | const String & | id = BALL_PROTEIN_DEFAULT_ID )

Detailled constructor.

## ~Protein()

virtual BALL::Protein::~Protein | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## append() [1/3]

void BALL::Molecule::append | ( | Atom & | atom | ) |

Insert an atom as the last child.

Parameters

  atom | the atom to add

## append() [2/3]

void BALL::Molecule::append | ( | AtomContainer & | atom_container | ) |

Append an AtomContainer as the last child.

Parameters

  atom_container | the AtomContainer to add

## append() [3/3]

void BALL::Molecule::append | ( | Molecule & | molecule | ) |

## clear()

virtual void BALL::Protein::clear | ( |  | ) |

virtual

Clears the contents of the protein.

Reimplemented from BALL::AtomContainer.

## countChains()

Size BALL::Protein::countChains | ( |  | ) | const

Count the child chains.

Returns
  Size the number of chains

## countPDBAtoms()

Size BALL::Protein::countPDBAtoms | ( |  | ) | const

Count the child PDB-Atoms.

Returns
  Size the number of PDB-Atoms

## countResidues()

Size BALL::Protein::countResidues | ( |  | ) | const

Count the child Residues.

Returns
  Size the number of Residues

## countSecondaryStructures()

Size BALL::Protein::countSecondaryStructures | ( |  | ) | const

Count the child SecondaryStructures.

Returns
  Size the number of SecondaryStructures

## destroy()

virtual void BALL::Protein::destroy | ( |  | ) |

virtual

Clear the contents of this instance of AtomContainer and removes it from parent composite structures. This methods clears the base fragment's name, destroys all its children (as in Composite::destroy ), and removes it from its parent composite structures.

Reimplemented from BALL::AtomContainer.

## dump()

virtual void BALL::Protein::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::Molecule.

## get()

void BALL::Protein::get | ( | Protein & | protein,
|  | bool | deep = true ) const

Copy this instance to protein . The assignment is either deep or shallow (default).

Parameters

  protein | the Protein to be assigned to

## getChain() [1/2]

Chain * BALL::Protein::getChain | ( | Position | position | ) |

Get a pointer to a child chain at a given position. The pointer is 0 if this instance does not have a chain at the given position.

Parameters

  position | the position of the child chain

Returns
  Chain* - mutable pointer to the child

## getChain() [2/2]

const Chain * BALL::Protein::getChain | ( | Position | position | ) | const

Get a pointer to a child chain at a given position. The pointer is 0 if this instance does not have a chain at the given position.

Parameters

  position | the position of the child chain

Returns
  Chain* - constant pointer to the child

## getCTerminal() [1/2]

Residue * BALL::Protein::getCTerminal | ( |  | ) |

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

## getCTerminal() [2/2]

const Residue * BALL::Protein::getCTerminal | ( |  | ) | const

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

## getID()

const String & BALL::Protein::getID | ( |  | ) | const

Retrieve the ID of the NucleicAcid.

Returns
  String the ID

## getNTerminal() [1/2]

Residue * BALL::Protein::getNTerminal | ( |  | ) |

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

## getNTerminal() [2/2]

const Residue * BALL::Protein::getNTerminal | ( |  | ) | const

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

## getPDBAtom() [1/2]

PDBAtom * BALL::Protein::getPDBAtom | ( | Position | position | ) |

Get a pointer to a child PDB-Atom at a given position. The pointer is 0 if this instance does not have a PDB-Atom at the given position.

Parameters

  position | the position of the child PDB-Atom

Returns
  Residue* - mutable pointer to the child

## getPDBAtom() [2/2]

const PDBAtom * BALL::Protein::getPDBAtom | ( | Position | position | ) | const

Get a pointer to a child PDB-Atom at a given position. The pointer is 0 if this instance does not have a PDB-Atom at the given position.

Parameters

  position | the position of the child PDB-Atom

Returns
  Residue* - constant pointer to the child

## getResidue() [1/2]

Residue * BALL::Protein::getResidue | ( | Position | position | ) |

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

## getResidue() [2/2]

const Residue * BALL::Protein::getResidue | ( | Position | position | ) | const

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

## getResidueByID() [1/2]

Residue * BALL::Protein::getResidueByID | ( | String | residue_ID | ) |

Get a pointer to a child Residue with the given ID. The pointer is 0 if this instance does not have a Residue with the given ID.

Parameters

  residue_ID | the ID of the residue

Returns
  Residue* - pointer to the child

## getResidueByID() [2/2]

const Residue * BALL::Protein::getResidueByID | ( | String | residue_ID | ) | const

Get a pointer to a child Residue with the given ID. The pointer is 0 if this instance does not have a Residue with the given ID.

Parameters

  residue_ID | the ID of the residue

Returns
  Residue* - constant pointer to the child

## getSecondaryStructure() [1/2]

SecondaryStructure * BALL::Protein::getSecondaryStructure | ( | Position | position | ) |

Get a pointer to a child SecondaryStructure at a given position. The pointer is 0 if this instance does not have a SecondaryStructure at the given position.

Parameters

  position | the position of the child SecondaryStructure

Returns
  SecondaryStructure* - mutable pointer to the child

## getSecondaryStructure() [2/2]

const SecondaryStructure * BALL::Protein::getSecondaryStructure | ( | Position | position | ) | const

Get a pointer to a child SecondaryStructure at a given position. The pointer is 0 if this instance does not have a SecondaryStructure at the given position.

Parameters

  position | the position of the child SecondaryStructure

Returns
  SecondaryStructure* - constant pointer to the child

## insert() [1/3]

void BALL::Molecule::insert | ( | Atom & | atom | ) |

Insert an atom as the last child.

Parameters

  atom | the atom to add

## insert() [2/3]

void BALL::Molecule::insert | ( | AtomContainer & | atom_container | ) |

Insert an AtomContainer as the last child.

Parameters

  atom_container | the AtomContainer to add

## insert() [3/3]

void BALL::Molecule::insert | ( | Molecule & | molecule | ) |

## insertAfter() [1/3]

void BALL::Molecule::insertAfter | ( | Atom & | atom,
|  | Composite & | after )

Insert an atom after a Composite object.

Parameters

  atom | the atom to insert
  after | the Composite object to insert after

## insertAfter() [2/3]

void BALL::Molecule::insertAfter | ( | AtomContainer & | atom_container,
|  | Composite & | after )

Insert an AtomContainer after a given Composite object.

Parameters

  atom_container | the AtomContainer to insert
  after | the Composite object to insert after

## insertAfter() [3/3]

void BALL::Molecule::insertAfter | ( | Molecule & | molecule,
|  | Composite & | composite )

## insertBefore() [1/3]

void BALL::Molecule::insertBefore | ( | Atom & | atom,
|  | Composite & | before )

Insert an atom before a Composite object.

Parameters

  atom | the atom to insert
  before | the Composite object to insert before

## insertBefore() [2/3]

void BALL::Molecule::insertBefore | ( | AtomContainer & | atom_container,
|  | Composite & | before )

Insert an AtomContainer before a given Composite object.

Parameters

  atom_container | the AtomContainer to insert
  before | the Composite object to insert before

## insertBefore() [3/3]

void BALL::Molecule::insertBefore | ( | Molecule & | molecule,
|  | Composite & | composite )

## isProtein()

virtual bool BALL::Protein::isProtein | ( |  | ) | const

inline virtual

Test if the Composite is a Protein

Reimplemented from BALL::Composite.

Definition at line 274 of file protein.h.

## isValid()

virtual bool BALL::Protein::isValid | ( |  | ) | const

virtual

Internal state and consistency self-validation.

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

Reimplemented from BALL::AtomContainer.

## operator!=()

bool BALL::Protein::operator!= | ( | const Protein & | protein | ) | const

Inequality operator

See also
  operator ==

## operator=()

Protein & BALL::Protein::operator= | ( | const Protein & | protein | ) |

Assignment operator.

Parameters

  protein | the Protein to be copied (cloned)

Returns
  Protein& - this instance

## operator==()

bool BALL::Protein::operator== | ( | const Protein & | protein | ) | const

Equality operator. Two proteins are equal if they have the same handle.

See also
  Object::operator ==.

## persistentRead()

void BALL::Protein::persistentRead | ( | PersistenceManager & | pm | ) |

virtual

Reads a Protein object from a persistent stream.

Parameters

  pm | the persistence manager

Reimplemented from BALL::Molecule.

## persistentWrite()

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

virtual

Writes a Protein object to a persistent stream.

Parameters

  pm | the persistence manager

Reimplemented from BALL::Molecule.

## prepend() [1/3]

void BALL::Molecule::prepend | ( | Atom & | atom | ) |

Insert an atom as the first child.

Parameters

  atom | the atom to add

## prepend() [2/3]

void BALL::Molecule::prepend | ( | AtomContainer & | atom_container | ) |

Insert an AtomContainer as the first child.

Parameters

  atom_container | the AtomContainer to add

## prepend() [3/3]

void BALL::Molecule::prepend | ( | Molecule & | molecule | ) |

## remove() [1/3]

bool BALL::Molecule::remove | ( | Atom & | atom | ) |

Remove an atom.

Parameters

  atom | the atom to remove

## remove() [2/3]

bool BALL::Molecule::remove | ( | AtomContainer & | atom_container | ) |

Remove an AtomContainer.

Parameters

  atom_container | the AtomContainer to remove

## remove() [3/3]

bool BALL::Molecule::remove | ( | Molecule & | molecule | ) |

## set()

void BALL::Protein::set | ( | const Protein & | protein,
|  | bool | deep = true )

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

Parameters

  protein | the Protein to be copied (cloned)
  deep | make a deep (=true) or shallow (=false) copy

## setID()

void BALL::Protein::setID | ( | const String & | id | ) |

Set the ID of the NucleicAcid.

Parameters

  id | the new ID

## splice()

void BALL::Molecule::splice | ( | AtomContainer & | atom_container | ) |

Move the children of atom_container into this molecule. The children of atom_container are inserted at the position of atom_container if it is a child of this. Otherwise the children are inserted using spliceBefore .

## spliceAfter()

void BALL::Molecule::spliceAfter | ( | AtomContainer & | atom_container | ) |

Cut all children of atom_container and append them after the children of this molecule.

Parameters

  atom_container | the AtomContainer to access

## spliceBefore()

void BALL::Molecule::spliceBefore | ( | AtomContainer & | atom_container | ) |

Cut all children of atom_container and prepend them before the children of this molecule.

Parameters

  atom_container | the AtomContainer to access

## swap()

void BALL::Protein::swap | ( | Protein & | protein | ) |

Swapping of two proteins.

Parameters

  protein | to swap with this instance