BALL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Classes | Private Member Functions
BALL::Atom Class Reference

#include <BALL/KERNEL/atom.h>

Inheritance diagram for BALL::Atom:
BALL::Composite BALL::PropertyManager BALL::PersistentObject BALL::Selectable BALL::Object BALL::AutoDeletable BALL::PDBAtom BALL::SmilesParser::SPAtom

List of all members.

Classes

class  BondIteratorTraits

Public Types

Enumerations
enum  { UNKNOWN_TYPE = -1, ANY_TYPE = 0, MAX_NUMBER_OF_BONDS = 12 }
enum  Property { NUMBER_OF_PROPERTIES = 0 }
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
}
Efficient handling of atom attributes
typedef std::list< Atom * > AtomPtrList
typedef std::list< PositionAtomIndexList

Public Member Functions

Constructors
 Atom ()
 Atom (const Atom &atom, bool deep=true)
 Atom (Element &element, const String &name, const String &type_name=BALL_ATOM_DEFAULT_TYPE_NAME, 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, Index formal_charge=BALL_ATOM_DEFAULT_FORMAL_CHARGE)
Destructors
virtual ~Atom ()
virtual void clear ()
virtual void destroy ()
Persistence
virtual void persistentWrite (PersistenceManager &pm, const char *name=0) const
virtual void persistentRead (PersistenceManager &pm)
Assignment methods
void set (const Atom &atom, bool deep=true)
void get (Atom &atom, bool deep=true) const
Atomoperator= (const Atom &atom)
void swap (Atom &atom)
bool operator== (const Atom &atom) const
bool operator!= (const Atom &atom) const
Accessors
void setElement (const Element &element)
 Assign the atom's element.
const ElementgetElement () const
 Return the atom's element.
void setCharge (float charge)
float getCharge () const
void setFormalCharge (Index formal_charge)
 Set the atom's formal charge.
Index getFormalCharge () const
 Return the atom's formal charge.
const MoleculegetMolecule () const
MoleculegetMolecule ()
 Return the molecule the atom is contained in (mutable)
const FragmentgetFragment () const
FragmentgetFragment ()
 Return the fragment the atom is contained in (mutable)
const ResiduegetResidue () const
ResiduegetResidue ()
 Return the residue the atom is contained in (mutable)
const SecondaryStructuregetSecondaryStructure () const
SecondaryStructuregetSecondaryStructure ()
 Return the secondary structure the atom is contained in (mutable)
const ChaingetChain () const
ChaingetChain ()
 Return the chain the atom is contained in (mutable)
void setName (const String &name)
 Set the atom name.
const StringgetName () const
 Return the atom name.
String getFullName (FullNameType type=ADD_VARIANT_EXTENSIONS) const
void setPosition (const Vector3 &position)
Vector3getPosition ()
 Return the atom coordinates (mutable)
const Vector3getPosition () const
 Return the atom coordinates (const)
void setRadius (float radius)
float getRadius () const
 Return the atom radius.
void setType (Type atom_type)
 Assign the numerical atom type.
Type getType () const
 Return the (numerical) atom type.
String getTypeName () const
 Return the atom type name.
void setTypeName (const String &name)
 Assign the atom type name.
void setVelocity (const Vector3 &velocity)
Vector3getVelocity ()
const Vector3getVelocity () const
void setForce (const Vector3 &force)
const Vector3getForce () const
 Return the atom's force vector (const)
Vector3getForce ()
 Return the atom's force vector (mutable)
Size countBonds () const
 Return the number of bonds.
BondgetBond (Position index)
const BondgetBond (Position index) const
BondgetBond (const Atom &atom)
const BondgetBond (const Atom &atom) const
Miscellaneous
BondcreateBond (Atom &atom)
BondcreateBond (Bond &bond, Atom &atom)
BondcloneBond (Bond &bond, Atom &atom)
bool destroyBond (const Atom &atom)
void destroyBonds ()
AtomgetPartnerAtom (Position i)
const AtomgetPartnerAtom (Position i) const
float getDistance (const Atom &a) const
Predicates
bool hasBond (const Bond &bond) const
bool isBoundTo (const Atom &atom) const
bool isBound () const
bool isGeminal (const Atom &atom) const
bool isVicinal (const Atom &atom) const
Debuggers and diagnostics
virtual bool isValid () const
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
Internal iteration
bool applyBonds (UnaryProcessor< Bond > &processor)

Private Member Functions

void clear_ ()
void swapLastBond_ (const Atom *atom)

Class friends

- class Bond

typedef short Type
class Bond

External iteration

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

Attributes

static AtomIndexList free_list_
String name_
String type_name_
const Elementelement_
float radius_
Type type_
unsigned char number_of_bonds_
Bondbond_ [MAX_NUMBER_OF_BONDS]
Index formal_charge_
Vector3 position_
float charge_
Vector3 velocity_
Vector3 force_

Detailed Description

Atom class. A class representing atoms. During each runtime instance of a program an atom is unique and identified by a Object::Handle . Atom equality is defined as atom identity, so there cannot be any two identical atoms. A linear ordering of atoms is defined as the linear order of the Object::Handle s.

Two atoms can be connected via a Bond . There can be only one bond between any two atoms (double bonds etc. are expressed via the bond order attribute of the bond) and the total number of bonds of an atom is limited to eight (can be changed at compile time, see MAX_NUMBER_OF_BONDS ).
Since Atom is derived from ProperyManager , it may contain arbitrary, user-defined properties. An atom may be inserted in a Fragment instance ("parent fragment"). The "state" of an atom is defined by its attributes:

Definition at line 86 of file atom.h.


Member Typedef Documentation

typedef std::list<Position> BALL::Atom::AtomIndexList

Definition at line 938 of file atom.h.

typedef std::list<Atom*> BALL::Atom::AtomPtrList

Definition at line 935 of file atom.h.

Constant random access iterator for bonds.

Definition at line 885 of file atom.h.

Constant reverse random access iterator for bonds.

Definition at line 915 of file atom.h.

Random access iterator for bonds.

Definition at line 868 of file atom.h.

Definition at line 707 of file atom.h.

typedef std::reverse_iterator<BondIterator> BALL::Atom::BondReverseIterator

Reverse random access iterator for bonds.

Definition at line 900 of file atom.h.

typedef short BALL::Atom::Type

Atom type.

Definition at line 102 of file atom.h.


Member Enumeration Documentation

anonymous enum

Unnamed enumeration of all non-categorized constants.

Enumerator:
UNKNOWN_TYPE 

Unknown atom type. The type assigned for default-constructed atoms.

ANY_TYPE 

Any atom type. Used as a wild card in the context of forcefields mainly

MAX_NUMBER_OF_BONDS 

Maximum number of bonds of an atom.

Definition at line 110 of file atom.h.

The type of name used for getFullName.

See also:
getFullName
Enumerator:
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 

Definition at line 137 of file atom.h.

Predefined properties. Enumeration of all properties that are used by the BALL kernel.

Enumerator:
NUMBER_OF_PROPERTIES 

Reimplemented in BALL::PDBAtom.

Definition at line 129 of file atom.h.


Constructor & Destructor Documentation

Default constructor. The state of this instance is:

BALL::Atom::Atom ( const Atom atom,
bool  deep = true 
)

Copy constructor. The copy is either deep (default) or shallow.

Note: Deep copying of atoms does not include bond cloning.
Parameters:
atomthe atom to be copied (cloned)
deepmake a deep (=true) or shallow (=false) copy of atom
Returns:
Atom - new constructed atom cloned from atom
See also:
Composite::Composite
PropertyManager::PropertyManager
BALL::Atom::Atom ( Element element,
const String name,
const String type_name = BALL_ATOM_DEFAULT_TYPE_NAME,
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,
Index  formal_charge = BALL_ATOM_DEFAULT_FORMAL_CHARGE 
)

Detailed state initializing constructor. The item bond table is empty (atom has no bonds).

Parameters:
elementelement type of the constructed atom
namename of the constructed atom
type_nametype name name of the constructed atom
atom_typetype of the constructed atom
positionposition of the constructed atom
velocityvelocity of the constructed atom
forceforce acting upon the constructed atom
chargecharge of the constructed atom
formal_chargeformal charge of the constructed atom
radiusradius of the constructed atom
Returns:
Atom - new constructed atom
See also:
Composite::Composite
PropertyManager::PropertyManager
virtual BALL::Atom::~Atom ( ) [virtual]

Destructor. If the atom has bonds in common with an other atom that atom is disconnected and the associated Bond instance is destroyed. Calls Atom::destroy .

See also:
Atom::destroy

Member Function Documentation

Application of an unary processor on every contained bond.

Parameters:
processora typed unary processor for Bond instances
Returns:
bool - true if application has been terminated successfully, false otherwise

Return a bond iterator pointing to the first bond of the atom.

Definition at line 871 of file atom.h.

Return a constant bond iterator pointing to the first bond.

Definition at line 888 of file atom.h.

virtual void BALL::Atom::clear ( ) [virtual]

Explicit default initialization. Calls Composite::clear and resets the attributes to the default values. In contrast to destroy , the atom is not removed from any composite structure, i.e. its parent fragment pointer remains unchanged.

See also:
Composite::clear
destroy

Reimplemented from BALL::Composite.

Reimplemented in BALL::PDBAtom.

void BALL::Atom::clear_ ( ) [private]

Reimplemented in BALL::PDBAtom.

Bond* BALL::Atom::cloneBond ( Bond bond,
Atom atom 
)

Create a copy of a bond. This is mostly for internal use and should not be required by most users.

Return the number of bonds.

Create a new bond to an atom. Create a new instance of Bond connecting this instance to atom . Calls Bond::createBond . The state of the bond is initialized to the default values.

Returns:
Bond* - default initialized Bond instance that connects this instance to atom
Exceptions:
Exception::TooManyBondsif one of the atom already possesses Atom::MAX_NUMBER_OF_BONDS bonds.
See also:
Bond::createBond
Bond* BALL::Atom::createBond ( Bond bond,
Atom atom 
)

Create a new bond from an already existing instance of Bond. Initialize the bond bond to connect this instance to atom . Calls Bond::createBond . The state of the bond is initialzed to the default values.

Note: This method is recommended for use if a subclass of the Bond is to be used as the new bond. This permits extensibility of bonds to the framework client.
Returns:
Bond* - default initialized bond bond that connects this instance to atom
Exceptions:
Exception::TooManyBondsif one of the atom already possesses Atom::MAX_NUMBER_OF_BONDS bonds.
See also:
Bond::createBond
virtual void BALL::Atom::destroy ( ) [virtual]

Explicit destructor. Destroy this instance explicitly and reset its attributes to the default values.

See also:
Composite::clear

Reimplemented from BALL::Composite.

Reimplemented in BALL::PDBAtom.

bool BALL::Atom::destroyBond ( const Atom atom)

Explicit bond destruction. Destroy the bond connecting {*this atom} and atom explicitly. If the bond is auto-deletable the default destructor is called otherwise Bond::destroy .

Note: This method is recommended to destroy a bond of an atom explicitly instead of using the keyword delete. This is due to erroneous explicit destruction of statically allocated bonds.
Parameters:
atomthe atom that should be disconnected from this instance
See also:
AutoDeletable
Bond::destroy

Explicit bond table destruction. Destroy all the bonds connecting {*this atom} with another atom explicitly. If the bonds are auto-deletable the default destructors are called otherwise Bond::destroy .

Note: This method is recommended to destroy all bonds of an atom explicitly instead of using the keyword delete. This is due to erroneous explicit destruction of statically allocated bonds.
Parameters:
atomthe atom that should be disconnected from this instance
See also:
AutoDeletable
Bond::destroy
virtual void BALL::Atom::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 . For debugging purposes only.

Parameters:
s- output stream where to output the internal state
depth- the dumping depth

Reimplemented from BALL::Composite.

Reimplemented in BALL::PDBAtom.

Return a past-the-end bond iterator.

Definition at line 877 of file atom.h.

Return a constant past-the-end bond iterator.

Definition at line 894 of file atom.h.

void BALL::Atom::get ( Atom atom,
bool  deep = true 
) const

Deep/shallow assignment. The inverse operation to set , behaves identically.

Parameters:
atomthe atom to be assigned to
See also:
Atom::set

Return a bond by its index (mutable). The reference is 0 if this instance does not have a bond with index index .

Note: No corresponding mutator Atom::setBond exists to consider design of contract - an atom may not insert a bond in its bond table at a given index. The atom's bond table is an implementation detail that is not relevant to and should not be relied on by the client programmer. A bond must always be created via Bond::Bond or Atom::createBond .
Parameters:
indexthe index of the bond to be accessed to
Returns:
Bond* - mutable pointer to the bond that is indexed in this instance's bond table, 0 if this instance does not have a bond with index index
Exceptions:
IndexOverflowif index >= MAX_NUMBER_OF_BONDS
const Bond* BALL::Atom::getBond ( Position  index) const

Return a bond by its index (const).

Exceptions:
IndexOverflowif index >= MAX_NUMBER_OF_BONDS
Bond* BALL::Atom::getBond ( const Atom atom)

Return a bond by its partner atom (const). The reference is 0 if this instance does not have a bond with atom .

Parameters:
atomthe atom that is considered to have a bond with this instance
Returns:
Bond* - mutable pointer to the bond that connects atom with this instance, 0 if this instance does not have a bond with atom
See also:
Atom::createBond
const Bond* BALL::Atom::getBond ( const Atom atom) const

Return a bond by its partner atom (mutable) The reference is 0 if this instance does not have a bond with atom .

Parameters:
atomthe atom that is considered to have a bond with this instance
Returns:
Bond* - constant pointer to the bond that connects atom with this instance, 0 if this instance does not have a bond with atom
See also:
Atom::createBond
const Chain* BALL::Atom::getChain ( ) const

Return the chain the atom is contained in (const). A NULL pointer is returned if this atom is not part of a chain.

Returns:
Chain* - constant pointer to the chain

Reimplemented in BALL::PDBAtom.

Return the chain the atom is contained in (mutable)

Reimplemented in BALL::PDBAtom.

Return the atom's (partial) charge. Charges should be assigned in multiples of the proton charge (elementary charge).

float BALL::Atom::getDistance ( const Atom a) const

A convenience function for computing the distance between two atoms. This is equivalent to calling this->getPosition().getDistance(a.getPosition())

Parameters:
athe atom to which to compute the distance
const Element& BALL::Atom::getElement ( ) const

Return the atom's element.

const Vector3& BALL::Atom::getForce ( ) const

Return the atom's force vector (const)

Return the atom's force vector (mutable)

Return the atom's formal charge.

Reimplemented in BALL::SmilesParser::SPAtom.

Return the fragment the atom is contained in (const). A NULL pointer is returned if this atom is not part of a fragment.

Use Fragment::insert to insert an atom into a fragment and Fragment::remove to remove it.
Returns:
Fragment* - constant pointer to the fragment

Return the fragment the atom is contained in (mutable)

Assemble a fully specified atom name. This method returns at fully specified atom name as used for charge and type assignments. The name consists of the name of the residue the atom is contained in, a colon, and the atom name. Blanks are removed from both names. For example, for the alpha carbon atom of isoleucine getFullName will return the name ILE:CA. For N terminal residues, -N is appended to the residue name, for C terminal residues -C. If the residue is a CYS involved in a disulphide bridge, an additional -S or S (for terminal residue) is appended. For single amino acids (C and N terminal) -M is added.

If the atom is not contained in a residue, the name of the parent fragment is taken instead of the residue name. If there is no parent fragment, the name of the parent molecule is taken. If the atom is not contained in any superstructure, getFullname returns getName.
Overview of the returned strings:
  • <residue>:<atom> -- if contained in a residue
  • <residue>-C:<atom> -- for C terminal residues
  • <residue>-N:<atom> -- for N terminal residues
  • CYS-S:<atom> -- for CYS residues involved in a SS bond
  • CYS-NS:<atom> -- for N terminal CYS residues involved in a SS bond
  • CYS-CS:<atom> -- for C terminal CYS residues involved in a SS bond
  • <fragment>:atom -- for atoms contained in a fragment, but not in a residue
  • <molecule>:atom -- for atoms contained in a molecule, but not in a fragment
Parameters:
typeif type is set to Atom::NO_VARIANT_EXTENSIONS, the variant extension (-XX) is omitted
Returns:
String the full name

Return the molecule the atom is contained in (const). A NULL pointer is returned if this atom is not part of a molecule.

Use Molecule::insert to insert an atom into a molecule and Molecule::remove to remove it.
Returns:
Molecule* - constant pointer to the parent molecule

Return the molecule the atom is contained in (mutable)

const String& BALL::Atom::getName ( ) const

Return the atom name.

Returns the Atom bound at the i-th bond. This is a convenience function for: getBond(i)->getBoundAtom(*this)

Parameters:
iThe index of the partner atom
Exceptions:
Exception::IndexOverflowis thrown if i >= countBonds(). This exception originates from getBond(i)

Returns the Atom bound at the i-th bond. This is a convenience function for: getBond(i)->getBoundAtom(*this)

Parameters:
iThe index of the partner atom
Exceptions:
Exception::IndexOverflowis thrown if i >= countBonds(). This exception originates from getBond(i)

Return the atom coordinates (mutable)

const Vector3& BALL::Atom::getPosition ( ) const

Return the atom coordinates (const)

Return the atom radius.

const Residue* BALL::Atom::getResidue ( ) const

Return the residue the atom is contained in (const). A NULL pointer is returned if this atom is not part of a residue.

Use Residue::insert to insert an atom into a residue and Residue::remove to remove it.
Returns:
Residue* - constant pointer to the residue

Reimplemented in BALL::PDBAtom.

Return the residue the atom is contained in (mutable)

Reimplemented in BALL::PDBAtom.

Return the secondary structure the atom is contained in (const). A NULL pointer is returned if this atom is not part of a secondary structure.

Returns:
SecondaryStructure* - constant pointer to the secondary structure

Return the secondary structure the atom is contained in (mutable)

Return the (numerical) atom type.

Return the atom type name.

Return the atom velocity. BALL uses units of $ {\AA}/ps $ for the velocity.

const Vector3& BALL::Atom::getVelocity ( ) const

Return the atom velocity. BALL uses units of $ {\AA}/ps $ for the velocity.

bool BALL::Atom::hasBond ( const Bond bond) const

Determine whether the atom takes part in a certain bond.

Parameters:
bondthe bond in question
Returns:
bool true if the bond bond connects this instance with another atom, false otherwise
See also:
Atom::hasBond

Determine whether the atom has any bond.

Returns:
bool - true if an atom is bound to this instance, false otherwise
See also:
Atom::hasBond
bool BALL::Atom::isBoundTo ( const Atom atom) const

Determine whether there exists a bond to another atom. Calls Atom::getBond . Hydrogen bonds (type = Bond::TYPE__HYDROGEN) are ignored.

Parameters:
atomthe atom in question
Returns:
bool - true if bond connects atom with {*this atom}, false otherwise
See also:
Atom::getBond
bool BALL::Atom::isGeminal ( const Atom atom) const

True if the two atoms are geminal. Two atoms are geminal if they do not share a common bond but both have a bond to a third atom. For example the two hydrogen atoms in water are geminal. Hydrogen bonds (type = Bond::TYPE__HYDROGEN) are ignored.

Parameters:
atomthe second atom
Returns:
bool - true if atom is geminal to this instance
virtual bool BALL::Atom::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::Composite.

bool BALL::Atom::isVicinal ( const Atom atom) const

True if the two atoms are vicinal. Two atoms are vicinal if they are separated by three bonds (1-4 position). Hydrogen bonds (type = Bond::TYPE__HYDROGEN) are ignored.

Parameters:
atomthe second atom
Returns:
bool - true if atom is vicinal to this instance
bool BALL::Atom::operator!= ( const Atom atom) const

Inequality operator

See also:
operator ==
Atom& BALL::Atom::operator= ( const Atom atom)

Assignment operator. The assignment is always deep. Calls Atom::set .

Note: Bonds are not copied
Parameters:
atomthe atom to be copied
Returns:
Atom& - this instance
See also:
Atom::set
bool BALL::Atom::operator== ( const Atom atom) const

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

See also:
Object::operator ==
virtual void BALL::Atom::persistentRead ( PersistenceManager pm) [virtual]

Read an Atom from a persistent stream.

Parameters:
pmthe persistence manager

Reimplemented from BALL::Composite.

Reimplemented in BALL::PDBAtom.

virtual void BALL::Atom::persistentWrite ( PersistenceManager pm,
const char *  name = 0 
) const [virtual]

Write an Atom to a persistent stream.

Parameters:
pmthe persistence manager

Reimplemented from BALL::Composite.

Reimplemented in BALL::PDBAtom.

Return a reverse bond iterator pointing to the last bond.

Definition at line 903 of file atom.h.

Return a constant reverse bond iterator pointing to the first atom.

Definition at line 918 of file atom.h.

Return a past-the-end bond iterator for reverse traversal.

Definition at line 909 of file atom.h.

Return a constant past-the-end bond iterator for reverse traversal.

Definition at line 924 of file atom.h.

void BALL::Atom::set ( const Atom atom,
bool  deep = true 
)

Deep/shallow assignment. The assignment is either deep or shallow (default is deep). In the case of a deep assignment, all composites contained in atom are copied as well.

Caveat: Bonds are not copied!
Parameters:
atomthe atom to be copied
deepmake a deep (=true) or shallow (=false) copy of atom
void BALL::Atom::setCharge ( float  charge)

Set the atom's (partial) charge. Charges should be assigned in multiples of the proton charge (elementary charge).

void BALL::Atom::setElement ( const Element element)

Assign the atom's element.

void BALL::Atom::setForce ( const Vector3 force)

Assign the atom's force vevtor. BALL uses units of Newton (1 N = 1 J/m) as the unit of force.

void BALL::Atom::setFormalCharge ( Index  formal_charge)

Set the atom's formal charge.

Reimplemented in BALL::SmilesParser::SPAtom.

void BALL::Atom::setName ( const String name)

Set the atom name.

void BALL::Atom::setPosition ( const Vector3 position)

Assign the atom coordinates. BALL uses units of Angstrom for atom coordinates.

void BALL::Atom::setRadius ( float  radius)

Set the atom radius. BALL uses units of Angstrom for the atom radii.

void BALL::Atom::setType ( Type  atom_type)

Assign the numerical atom type.

void BALL::Atom::setTypeName ( const String name)

Assign the atom type name.

void BALL::Atom::setVelocity ( const Vector3 velocity)

Set the atom velocity BALL uses units of $ {\AA}/ps $ for the velocity.

void BALL::Atom::swap ( Atom atom)

Swap the contents of two atoms. The static attributes are swapped by exchanging the indices of the two atoms!

Parameters:
atomthe atom being swapped with this instance
void BALL::Atom::swapLastBond_ ( const Atom atom) [private]

Friends And Related Function Documentation

friend class Bond [friend]

Reimplemented in BALL::PDBAtom.

Definition at line 96 of file atom.h.

friend class BondIteratorTraits [friend]

Definition at line 862 of file atom.h.


Member Data Documentation

Definition at line 963 of file atom.h.

Definition at line 969 of file atom.h.

const Element* BALL::Atom::element_ [protected]

Definition at line 955 of file atom.h.

Definition at line 973 of file atom.h.

Reimplemented in BALL::SmilesParser::SPAtom.

Definition at line 965 of file atom.h.

Definition at line 948 of file atom.h.

Definition at line 951 of file atom.h.

unsigned char BALL::Atom::number_of_bonds_ [protected]

Definition at line 961 of file atom.h.

Definition at line 967 of file atom.h.

Definition at line 957 of file atom.h.

Type BALL::Atom::type_ [protected]

Definition at line 959 of file atom.h.

Definition at line 953 of file atom.h.

Definition at line 971 of file atom.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines