Logo Search packages:      
Sourcecode: ball version File versions

BALL::PDBAtom Class Reference

#include <PDBAtom.h>

Inheritance diagram for BALL::PDBAtom:

BALL::Atom BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable

List of all members.


Detailed Description

Atom class with additional attributes. This class represents atoms read from PDB files. It contains additional attributes to hold the crystallographic properties of atoms from a PDB file (e.g., temperature factor, occupancy). For details on the PDB format and the detailed meaning of those fields, please refer to the PDB documentation at http://www.rcsb.org
See also:
PDBFile

Definition at line 40 of file PDBAtom.h.


Efficient handling of atom attributes

typedef std::list< PositionAtomIndexList
typedef std::list< Atom * > AtomPtrList
const StaticAtomAttributes * getAttributePtr () const
StaticAtomAttributes * getAttributePtr ()
Position getIndex () const
static Position compact (const AtomIndexList &indices) throw (Exception::OutOfRange)
static AttributeVector & getAttributes ()
static const PreciseTimegetAttributesModificationTime ()

External iteration

typedef
ConstRandomAccessIterator
< Atom, Bond,
BondIteratorPosition,
BondIteratorTraits > 
BondConstIterator
 Constant random access iterator for bonds.
typedef std::reverse_iterator
< BondConstIterator
BondConstReverseIterator
 Constant reverse random access iterator for bonds.
typedef RandomAccessIterator
< Atom, Bond,
BondIteratorPosition,
BondIteratorTraits > 
BondIterator
typedef Index BondIteratorPosition
typedef std::reverse_iterator
< BondIterator
BondReverseIterator
 Reverse random access iterator for bonds.
class BondIteratorTraits
BondConstIterator beginBond () const
 Return a constant bond iterator pointing to the first bond.
BondIterator beginBond ()
 Return a bond iterator pointing to the first bond of the atom.
BondConstIterator endBond () const
 Return a constant past-the-end bond iterator.
BondIterator endBond ()
 Return a past-the-end bond iterator.
BondConstReverseIterator rbeginBond () const
 Return a constant reverse bond iterator pointing to the first atom.
BondReverseIterator rbeginBond ()
 Return a reverse bond iterator pointing to the last bond.
BondConstReverseIterator rendBond () const
 Return a constant past-the-end bond iterator for reverse traversal.
BondReverseIterator rendBond ()
 Return a past-the-end bond iterator for reverse traversal.

Modifying and Accessing the Tree

void appendChild (Composite &composite)
Size count (const KernelPredicateType &predicate) const
Size countDescendants () const
virtual void deselect ()
void get (Composite &composite, bool deep=true) const
template<typename T>
const T * getAncestor (const T &) const
template<typename T>
T * getAncestor (const T &)
const CompositegetChild (Index index) const
CompositegetChild (Index index)
Size getDegree () const
Size getDepth () const
const CompositegetFirstChild () const
CompositegetFirstChild ()
Size getHeight () const
const CompositegetLastChild () const
CompositegetLastChild ()
const CompositegetLowestCommonAncestor (const Composite &composite) const
CompositegetLowestCommonAncestor (const Composite &composite)
const PreciseTimegetModificationTime () const
template<typename T>
const T * getNext (const T &dummy) const
template<typename T>
T * getNext (const T &)
const CompositegetParent () const
CompositegetParent ()
Size getPathLength (const Composite &composite) const
template<typename T>
const T * getPrevious (const T &dummy) const
template<typename T>
T * getPrevious (const T &)
const CompositegetRoot () const
CompositegetRoot ()
const PreciseTimegetSelectionTime () const
const CompositegetSibling (Index index) const
CompositegetSibling (Index index)
void insertAfter (Composite &composite)
void insertBefore (Composite &composite)
void prependChild (Composite &composite)
bool removeChild (Composite &child)
Size removeSelected ()
Size removeUnselected ()
void replace (Composite &composite)
virtual void select ()
void set (const Composite &composite, bool deep=true)
void splice (Composite &composite)
void spliceAfter (Composite &composite)
void spliceBefore (Composite &composite)
void stamp (StampType stamp=BOTH)
void swap (Composite &composite)
static bool insertParent (Composite &parent, Composite &first, Composite &last, bool destroy_parent=true)

Handle Management



Handle getHandle () const
static Handle getNewHandle ()
static Handle getNextHandle ()

Mutators

void setAutoDeletable (bool enable)
static void clearLastPtr ()

Attributes

static PreciseTime attributes_changed_time_
 time of the last resize of the attributes vector
static AtomIndexList free_list_
static AttributeVector static_attributes_
Bondbond_ [MAX_NUMBER_OF_BONDS]
const Elementelement_
Position index_
String name_
unsigned char number_of_bonds_
float radius_
String type_name_

Public Types

typedef ConstForwardIterator
< Composite, Composite,
Composite
*, AncestorIteratorTraits > 
AncestorConstIterator
typedef ForwardIterator
< Composite, Composite,
Composite
*, AncestorIteratorTraits > 
AncestorIterator
typedef
ConstBidirectionalIterator
< Composite, Composite,
Composite
*, ChildCompositeIteratorTraits > 
ChildCompositeConstIterator
typedef std::reverse_iterator
< ChildCompositeConstIterator
ChildCompositeConstReverseIterator
typedef BidirectionalIterator
< Composite, Composite,
Composite
*, ChildCompositeIteratorTraits > 
ChildCompositeIterator
typedef std::reverse_iterator
< ChildCompositeIterator
ChildCompositeReverseIterator
typedef
ConstBidirectionalIterator
< Composite, Composite,
Composite
*, CompositeIteratorTraits > 
CompositeConstIterator
typedef std::reverse_iterator
< CompositeConstIterator
CompositeConstReverseIterator
typedef BidirectionalIterator
< Composite, Composite,
Composite
*, CompositeIteratorTraits > 
CompositeIterator
typedef std::reverse_iterator
< CompositeIterator
CompositeReverseIterator
Enumerations
enum  { UNKNOWN_TYPE = -1, ANY_TYPE = 0, MAX_NUMBER_OF_BONDS = 12 }
enum  FullNameType {
  NO_VARIANT_EXTENSIONS, ADD_VARIANT_EXTENSIONS, ADD_RESIDUE_ID, ADD_VARIANT_EXTENSIONS_AND_ID,
  ADD_CHAIN_RESIDUE_ID, ADD_VARIANT_EXTENSIONS_AND_CHAIN_RESIDUE_ID
}
Type Definitions and Enums
typedef UnaryPredicate< CompositeKernelPredicateType
enum  StampType { MODIFICATION = 1, SELECTION = 2, BOTH = 3 }
Enums
enum  Property { NUMBER_OF_PROPERTIES = Atom::NUMBER_OF_PROPERTIES }
enum  RemotenessIndicator {
  REMOTENESS_INDICATOR__UNKNOWN = BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR, REMOTENESS_INDICATOR__ALPHA = 'A', REMOTENESS_INDICATOR__alpha = 'a', REMOTENESS_INDICATOR__BETA = 'B',
  REMOTENESS_INDICATOR__beta = 'b', REMOTENESS_INDICATOR__GAMMA = 'G', REMOTENESS_INDICATOR__gamma = 'g', REMOTENESS_INDICATOR__DELTA = 'D',
  REMOTENESS_INDICATOR__delta = 'd', REMOTENESS_INDICATOR__EPSILON = 'E', REMOTENESS_INDICATOR__epsilon = 'e', REMOTENESS_INDICATOR__ZETA = 'Z',
  REMOTENESS_INDICATOR__zeta = 'z', REMOTENESS_INDICATOR__ETA = 'H', REMOTENESS_INDICATOR__eta = 'h', NUMBER_OF_REMOTENESS_INDICATORS
}
Class friends


typedef short Type

Public Member Functions

AncestorConstIterator beginAncestor () const
AncestorIterator beginAncestor ()
ChildCompositeConstIterator beginChildComposite () const
ChildCompositeIterator beginChildComposite ()
CompositeConstIterator beginComposite () const
CompositeIterator beginComposite ()
void deleteChildrenList_ (std::list< Composite * > &composites)
AncestorConstIterator endAncestor () const
AncestorIterator endAncestor ()
ChildCompositeConstIterator endChildComposite () const
ChildCompositeIterator endChildComposite ()
CompositeConstIterator endComposite () const
CompositeIterator endComposite ()
ChildCompositeConstReverseIterator rbeginChildComposite () const
ChildCompositeReverseIterator rbeginChildComposite ()
CompositeConstReverseIterator rbeginComposite () const
CompositeReverseIterator rbeginComposite ()
ChildCompositeConstReverseIterator rendChildComposite () const
ChildCompositeReverseIterator rendChildComposite ()
CompositeConstReverseIterator rendComposite () const
CompositeReverseIterator rendComposite ()
Application and Hosting


template<typename T>
bool apply (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyAncestor (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyChild (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyDescendant (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyDescendantPostorder (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyDescendantPreorder (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyLevel (UnaryProcessor< T > &processor, long level) throw (Exception::GeneralException)
template<typename T>
bool applyPostorder (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
template<typename T>
bool applyPreorder (UnaryProcessor< T > &processor) throw (Exception::GeneralException)
void host (Visitor< Composite > &visitor) throw (Exception::GeneralException)
Internal iteration
bool applyBonds (UnaryProcessor< Bond > &processor)
Assignment
virtual void clear ()
void get (PDBAtom &pdb_atom, bool deep=true) const
PDBAtomoperator= (const PDBAtom &pdb_atom)
void set (const PDBAtom &pdb_atom, bool deep=true)
void swap (PDBAtom &pdb_atom)
Handling named properties
PropertyManager contains an vector of NamedProperty objects. Each of the NamedProeprty objects has to have a unique name. The setProperty methods ensure the uniqueness of this name. If a setProperty method is called for an existing name, the existing object is destructed prior to the insertion of the new object.

void clearProperty (const string &name)
Size countNamedProperties () const
NamedPropertygetNamedProperty (Position index) throw (Exception::IndexOverflow)
const NamedPropertygetNamedProperty (Position index) const throw (Exception::IndexOverflow)
const NamedPropertygetProperty (const string &name) const
void setProperty (const string &name, const PersistentObject &value)
void setProperty (const string &name, const string &value)
void setProperty (const string &name, double value)
void setProperty (const string &name, float value)
void setProperty (const string &name, unsigned int value)
void setProperty (const string &name, int value)
void setProperty (const string &name, bool value)
void setProperty (const string &name)
void setProperty (const NamedProperty &property)
Handling unnamed bit properties
void clearProperty (Property property)
Size countProperties () const
void setProperty (Property property)
void toggleProperty (Property property)
Construction and Destruction
void * clone (Composite &root) const
void destroy (bool virtual_destroy)
Miscellaneous
BondcloneBond (Bond &bond, Atom &atom)
BondcreateBond (Bond &bond, Atom &atom) throw (Exception::TooManyBonds)
BondcreateBond (Atom &atom) throw (Exception::TooManyBonds)
bool destroyBond (const Atom &atom)
void destroyBonds ()
float getDistance (const Atom &a) const
const AtomgetPartnerAtom (Position i) const throw (Exception::IndexOverflow)
AtomgetPartnerAtom (Position i) throw (Exception::IndexOverflow)
Comparison operators


int compare (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
bool operator>= (const Object &object) const
Predicates


bool containsSelection () const
template<typename T>
bool hasAncestor (const T &dummy) const
bool hasChild () const
bool hasNextSibling () const
bool hasParent () const
bool hasPreviousSibling () const
bool hasSibling () const
bool isAncestorOf (const Composite &composite) const
bool isChildOf (const Composite &composite) const
bool isDescendantOf (const Composite &composite) const
bool isEmpty () const
bool isFirstChild () const
bool isFirstChildOf (const Composite &composite) const
bool isHomomorph (const Composite &composite) const
bool isInterior () const
bool isLastChild () const
bool isLastChildOf (const Composite &composite) const
bool isNextSiblingOf (const Composite &composite) const
bool isParentOf (const Composite &composite) const
bool isPreviousSiblingOf (const Composite &composite) const
bool isRelatedWith (const Composite &composite) const
bool isRoot () const
bool isRootOf (const Composite &composite) const
bool isSiblingOf (const Composite &composite) const
bool operator!= (const Composite &composite) const
bool operator== (const Composite &composite) const
Accessors
Size countBonds () const
 Return the number of bonds.
const BondgetBond (const Atom &atom) const
BondgetBond (const Atom &atom)
const BondgetBond (Position index) const throw (Exception::IndexOverflow)
BondgetBond (Position index) throw (Exception::IndexOverflow)
float getCharge () const
const ElementgetElement () const
 Return the atom's element.
Vector3getForce ()
 Return the atom's force vector (mutable).
const Vector3getForce () const
 Return the atom's force vector (const).
Index getFormalCharge () const
 Return the atom's formal charge.
FragmentgetFragment ()
 Return the fragment the atom is contained in (mutable).
const FragmentgetFragment () const
String getFullName (FullNameType type=ADD_VARIANT_EXTENSIONS) const
MoleculegetMolecule ()
 Return the molecule the atom is contained in (mutable).
const MoleculegetMolecule () const
const StringgetName () const
 Return the atom name.
const Vector3getPosition () const
 Return the atom coordinates (const).
Vector3getPosition ()
 Return the atom coordinates (mutable).
float getRadius () const
 Return the atom radius.
SecondaryStructuregetSecondaryStructure ()
 Return the secondary structure the atom is contained in (mutable).
const SecondaryStructuregetSecondaryStructure () const
Type getType () const
 Return the (numerical) atom type.
String getTypeName () const
 Return the atom type name.
const Vector3getVelocity () const
void setCharge (float charge)
void setElement (const Element &element)
 Assign the atom's element.
void setForce (const Vector3 &force)
void setFormalCharge (Index formal_charge)
 Set the atom's formal charge.
void setName (const String &name)
 Set the atom name.
void setPosition (const Vector3 &position)
void setRadius (float radius)
void setType (Type atom_type)
 Assign the numerical atom type.
void setTypeName (const String &name)
 Assign the atom type name.
void setVelocity (const Vector3 &velocity)
Constructors and Destructors
virtual void destroy ()
 PDBAtom (Element &element, const String &name, const String &type_name=BALL_ATOM_DEFAULT_TYPE_NAME, Atom::Type atom_type=BALL_ATOM_DEFAULT_TYPE, const Vector3 &position=Vector3(BALL_ATOM_DEFAULT_POSITION), const Vector3 &velocity=Vector3(BALL_ATOM_DEFAULT_VELOCITY), const Vector3 &force=Vector3(BALL_ATOM_DEFAULT_FORCE), float charge=BALL_ATOM_DEFAULT_CHARGE, float radius=BALL_ATOM_DEFAULT_RADIUS, char branch_designator=BALL_PDBATOM_DEFAULT_BRANCH_DESIGNATOR, char remoteness_indicator=BALL_PDBATOM_DEFAULT_REMOTENESS_INDICATOR, char alternate_location_indicator=BALL_PDBATOM_DEFAULT_ALTERNATE_LOCATION_INDICATOR, float occupancy=BALL_PDBATOM_DEFAULT_OCCUPANCY, float temperature_factor=BALL_PDBATOM_DEFAULT_TEMPERATURE_FACTOR)
 Detailed constructor.
 PDBAtom (const String &name)
 Constructor.
 PDBAtom (const PDBAtom &pdb_atom, bool deep=true)
 Copy constructor.
 PDBAtom ()
 Default constructor.
virtual ~PDBAtom ()
 Destructor.
Debugging and Diagnostics
virtual void dump (::std::ostream &s=std::cout, Size depth=0) const
Debugging and Diagnostics
virtual void dump (::std::ostream &s=std::cout, Size depth=0) const
Debugging and Diagnostics
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
Persistent Writing and Reading
virtual void finalize () throw (Exception::GeneralException)
PersistenceManageroperator>> (PersistenceManager &pm) const throw (Exception::GeneralException)
Assignment
void get (PropertyManager &property_manager) const
void set (const PropertyManager &property_manager)
void swap (PropertyManager &property_manager)
Assignment
void get (Selectable &selectable, bool deep=true) const
void set (const Selectable &selectable, bool deep=true)
void swap (Selectable &selectable)
Assignment methods
void get (Atom &atom, bool deep=true) const
void set (const Atom &atom, bool deep=true)
void swap (Atom &atom)
Accessors
char getAlternateLocationIndicator () const
char getBranchDesignator () const
const ChaingetChain () const
ChaingetChain ()
float getOccupancy () const
const ProteingetProtein () const
ProteingetProtein ()
char getRemotenessIndicator () const
const ResiduegetResidue () const
ResiduegetResidue ()
float getTemperatureFactor () const
void setAlternateLocationIndicator (char alternate_location_indicator)
void setBranchDesignator (char branch_designator)
void setOccupancy (float occupancy)
void setRemotenessIndicator (char remoteness_indicator)
void setTemperatureFactor (float temperature_factor)
Accessors
const BitVectorgetBitVector () const
BitVectorgetBitVector ()
Predicates
bool hasBond (const Bond &bond) const
bool isBound () const
bool isBoundTo (const Atom &atom) const
bool isGeminal (const Atom &atom) const
bool isVicinal (const Atom &atom) const
Predicates
bool hasProperty (const string &name) const
 Query for a named property.
bool hasProperty (Property property) const
 Query for an unnamed property.
bool operator!= (const PropertyManager &pm) const
 Inequality operator.
bool operator== (const PropertyManager &pm) const
Predicates
bool isAutoDeletable () const
Predicates
bool isSelected () const
bool operator!= (const Selectable &selectable) const
bool operator== (const Selectable &selectable) const
Debuggers and diagnostics
virtual bool isValid () const
Converters
 operator BitVector & ()
Constructors and Destructors
The constructors of this class are protected.

void operator delete (void *ptr, void *)
void operator delete (void *ptr)
void * operator new (size_t size, void *ptr)
void * operator new (size_t size)
bool operator!= (const Atom &atom) const
bool operator== (const Atom &atom) const
Predicates
bool operator!= (const PDBAtom &pdb_atom) const
bool operator== (const PDBAtom &pdb_atom) const
Persistence
void persistentRead (PersistenceManager &pm) throw (Exception::GeneralException)
void persistentWrite (PersistenceManager &pm, const char *name=0) const throw (Exception::GeneralException)
Storable Interface
bool read (PersistenceManager &pm)
 Persistent stream reading.
void write (PersistenceManager &pm) const
 Persistent stream writing.
Storable interface.
bool read (PersistenceManager &pm)
void write (PersistenceManager &pm) const
virtual void setSelected (bool selected)

Static Public Attributes

static UnaryProcessor< CompositeDEFAULT_PROCESSOR
static KernelPredicateType DEFAULT_UNARY_PREDICATE

Protected Attributes

bool selected_

Private Member Functions

void clear_ ()

Private Attributes

char alternate_location_indicator_
char branch_designator_
float occupancy_
char remoteness_indicator_
float temperature_factor_

Friends

class AncestorIteratorTraits
class Bond
class ChildCompositeIteratorTraits
class CompositeIteratorTraits

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index