BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
BALL::NucleicAcid Class Reference

#include <BALL/KERNEL/nucleicAcid.h>

Inheritance diagram for BALL::NucleicAcid:
BALL::Molecule BALL::AtomContainer BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable

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
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
enum  StampType { MODIFICATION = 1, SELECTION = 2, BOTH = 3 }
typedef UnaryPredicate< Composite > KernelPredicateType

Public Member Functions

bool operator== (const NucleicAcid &nucleic_acid) const
bool operator!= (const NucleicAcid &nucleic_acid) const
Constructors and Destructors
 NucleicAcid ()
 NucleicAcid (const NucleicAcid &nucleic_acid, bool deep=true)
 NucleicAcid (const String &name, const String &id=BALL_NUCLEICACID_DEFAULT_ID)
virtual ~NucleicAcid ()
virtual void clear ()
virtual void destroy ()
Persistence
void persistentWrite (PersistenceManager &pm, const char *name=0) const
void persistentRead (PersistenceManager &pm)
Assignment Methods
void set (const NucleicAcid &nucleic_acid, bool deep=true)
NucleicAcid & operator= (const NucleicAcid &nucleic_acid)
void get (NucleicAcid &nucleic_acid, bool deep=true) const
void swap (NucleicAcid &nucleic_acid)
Accessors
Nucleotide * getNucleotide (Position position)
const Nucleotide * getNucleotide (Position position) const
Nucleotide * get3Prime ()
const Nucleotide * get3Prime () const
Nucleotide * get5Prime ()
const Nucleotide * get5Prime () const
void setID (const String &id)
const String & getID () const
Size countNucleotides () const
Debugging and Diagnostics
virtual bool isValid () const
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
- Public Member Functions inherited from BALL::Molecule
bool operator== (const Molecule &molecule) const
bool operator!= (const Molecule &molecule) const
 Molecule ()
 Molecule (const Molecule &molecule, 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)
- 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 isSuperAtomContainerOf (const AtomContainer &atom_container) const
void setName (const String &name)
const String & getName () 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
Size removeHavingProperty (BALL::Property p)
Size removeNotHavingProperty (BALL::Property p)
Size removeHavingProperty (const string &name)
Size removeNotHavingProperty (const string &name)
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
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)
 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
void host (Visitor< Composite > &visitor)
template<typename T >
bool applyAncestor (UnaryProcessor< T > &processor)
template<typename T >
bool applyChild (UnaryProcessor< T > &processor)
template<typename T >
bool applyDescendantPreorder (UnaryProcessor< T > &processor)
template<typename T >
bool applyDescendantPostorder (UnaryProcessor< T > &processor)
template<typename T >
bool applyDescendant (UnaryProcessor< T > &processor)
template<typename T >
bool applyPreorder (UnaryProcessor< T > &processor)
template<typename T >
bool applyPostorder (UnaryProcessor< T > &processor)
template<typename T >
bool apply (UnaryProcessor< T > &processor)
template<typename T >
bool applyLevel (UnaryProcessor< T > &processor, long level)
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 string &name)
void setProperty (const string &name, bool value)
void setProperty (const string &name, int value)
void setProperty (const string &name, unsigned int value)
void setProperty (const string &name, float value)
void setProperty (const string &name, double value)
void setProperty (const string &name, const string &value)
void setProperty (const string &name, const PersistentObject &value)
const NamedProperty & getProperty (const string &name) const
NamedPropertyIterator beginNamedProperty ()
NamedPropertyIterator endNamedProperty ()
void clearProperty (const string &name)
Size countNamedProperties () const
bool hasProperty (Property property) const
 Query for an unnamed property.
bool hasProperty (const 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.

Private Attributes

String id_

Additional Inherited Members

- Static Public Member Functions inherited from BALL::Composite
static bool insertParent (Composite &parent, Composite &first, Composite &last, bool destroy_parent=true)
- Static Public Member Functions inherited from BALL::Object
static Handle getNextHandle ()
static Handle getNewHandle ()
- Static Public Member Functions inherited from BALL::AutoDeletable
static void clearLastPtr ()
- Static Public Attributes inherited from BALL::Composite
static UnaryProcessor< Composite > DEFAULT_PROCESSOR
static KernelPredicateType DEFAULT_UNARY_PREDICATE
- Protected Member Functions inherited from BALL::Molecule
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
- Protected Attributes inherited from BALL::Selectable
bool selected_

Detailed Description

Nucleic acid class.

Definition at line 27 of file nucleicAcid.h.

Member Enumeration Documentation

Enumerator:
NUMBER_OF_PROPERTIES 

Definition at line 40 of file nucleicAcid.h.

Constructor & Destructor Documentation

BALL::NucleicAcid::NucleicAcid ( )

Default constructor.

BALL::NucleicAcid::NucleicAcid ( const NucleicAcid &  nucleic_acid,
bool  deep = true 
)

Copy constructor.

BALL::NucleicAcid::NucleicAcid ( const String &  name,
const String &  id = BALL_NUCLEICACID_DEFAULT_ID 
)

Detailed constructor.

virtual BALL::NucleicAcid::~NucleicAcid ( )
virtual

Destructor.

Member Function Documentation

virtual void BALL::NucleicAcid::clear ( )
virtual

Clear the contents of the nucleic acid.

Reimplemented from BALL::AtomContainer.

Size BALL::NucleicAcid::countNucleotides ( ) const

Return the number of Nucleotides contained in this instance NucleicAcid.

Returns
Size - number of Nucleotides
virtual void BALL::NucleicAcid::destroy ( )
virtual

Clear the contents of the nucleic acid and remove it from parent kernel objects.

Reimplemented from BALL::AtomContainer.

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

Internal state dump. Dump the current internal state of this instance to the output ostream s with dumping depth depth .

Parameters
s- output stream where to output the internal state of this instance
depth- the dumping depth

Reimplemented from BALL::Molecule.

void BALL::NucleicAcid::get ( NucleicAcid &  nucleic_acid,
bool  deep = true 
) const

Assign a NucleicAcid object from another.

Nucleotide* BALL::NucleicAcid::get3Prime ( )

Retrieve a pointer to the Nucleotide at the 3'-end of this instance. The pointer is 0 if this instance does not have a Nucleotide.

Returns
Nucleotide* - mutable pointer to the first child Nucleotide
const Nucleotide* BALL::NucleicAcid::get3Prime ( ) const

Retrieve a const pointer to the nucleotide at the 3'-end of this instance. The pointer is 0 if this instance does not have a Nucleotide.

Returns
Nucleotide* - constant pointer to the first child Nucleotide
Nucleotide* BALL::NucleicAcid::get5Prime ( )

Retrieve a pointer to the Nucleotide at the 5'-end of this instance. The pointer is 0 if this instance does not have a Nucleotide.

Returns
Nucleotide* - mutable pointer to the last child Nucleotide
const Nucleotide* BALL::NucleicAcid::get5Prime ( ) const

Retrieve a const pointer to the Nucleotide at the 5'-end of this instance. The pointer is 0 if this instance does not have a Nucleotide.

Returns
Nucleotide* - constant pointer to the last child Nucleotide
const String& BALL::NucleicAcid::getID ( ) const

Retrieve the ID of the NucleicAcid.

Returns
String the ID
Nucleotide* BALL::NucleicAcid::getNucleotide ( Position  position)

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

Parameters
positionthe position of the child Nucleotide
Returns
Nucleotide* - mutable pointer to the child Nucleotide at positon
const Nucleotide* BALL::NucleicAcid::getNucleotide ( Position  position) const

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

Parameters
positionthe position of the child Nucleotide
Returns
Nucleotide* - constant pointer to the child Nucleotide at positon
virtual bool BALL::NucleicAcid::isValid ( ) const
virtual

Internal state and consistency self-validation.

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

Reimplemented from BALL::AtomContainer.

bool BALL::NucleicAcid::operator!= ( const NucleicAcid &  nucleic_acid) const

Inequality operator

See Also
operator ==
NucleicAcid& BALL::NucleicAcid::operator= ( const NucleicAcid &  nucleic_acid)

Assignment operator.

bool BALL::NucleicAcid::operator== ( const NucleicAcid &  nucleic_acid) const

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

See Also
Object::operator ==.
void BALL::NucleicAcid::persistentRead ( PersistenceManager &  pm)
virtual

Reads a NucleicAcid object from a persistent stream.

Parameters
pmthe persistence manager

Reimplemented from BALL::Molecule.

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

Writes a NucleicAcid object to a persistent stream.

Parameters
pmthe persistence manager

Reimplemented from BALL::Molecule.

void BALL::NucleicAcid::set ( const NucleicAcid &  nucleic_acid,
bool  deep = true 
)

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

Parameters
nucleic_acidthe NucleicAcid to be copied (cloned)
deepmake a deep (=true) or shallow (=false) copy
void BALL::NucleicAcid::setID ( const String &  id)

Set the ID of the NucleicAcid.

Parameters
idthe new ID
void BALL::NucleicAcid::swap ( NucleicAcid &  nucleic_acid)

Swap the contents of two NucleicAcid objects.

Member Data Documentation

String BALL::NucleicAcid::id_
private

Definition at line 231 of file nucleicAcid.h.