Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

Miscellaneous
[Kernel Classes]


Modules

group  Periodic Table of Elements
 These classes represent elements and the periodic table of elements.

Classes

class  Bond
 Bond class. More...
class  ExpressionParser
 Expression Parser. More...
class  ExpressionTree
 Expression tree class. More...
class  Element
 Element class. More...
class  SecondaryStructure
 Secondary structure class. More...

Convenient iteration macros

#define BALL_FOREACH_MOLECULE(molecule_container, molecule_iterator)
 Molecule iterator macro.
#define BALL_FOREACH_FRAGMENT(fragment_container, fragment_iterator)
 Fragment iterator macro.
#define BALL_FOREACH_ATOMCONTAINER(atom_containers, atom_container_iterator)
 AtomContainer iterator macro.
#define BALL_FOREACH_ATOM(atom_container, atom_iterator)
 Atom iterator macro.
#define BALL_FOREACH_ATOM_BOND(bond_container, bond_iterator)
 Atom bond iterator macro.
#define BALL_FOREACH_ATOM_PAIR(atom_container, first_atom_iterator, second_atom_iterator)
 Atom pair iterator macro.
#define BALL_FOREACH_BOND(atom_container, atom_iterator, bond_iterator)
 Bond iterator macro.
#define BALL_FOREACH_INTERBOND(atom_container, atom_iterator, bond_iterator)
 Intermolecular bond iterator macro.
#define BALL_FOREACH_INTRABOND(atom_container, atom_iterator, bond_iterator)
 Intramolecular bond iterator macro.
#define BALL_FOREACH_PROTEIN(protein_container, protein_iterator)
 Protein iterator macro.
#define BALL_FOREACH_CHAIN(chain_container, chain_iterator)
 Chain iterator macro.
#define BALL_FOREACH_SECONDARYSTRUCTURE(secondary_structure_container, secondary_structure_iterator)
 SecondaryStructure iterator macro.
#define BALL_FOREACH_RESIDUE(residue_container, residue_iterator)
 Residue iterator macro.
#define BALL_FOREACH_PDBATOM(pdb_atom_container, pdb_atom_iterator)
 PDBAtom iterator macro.

[NOHEADER]

typedef std::list< Atom * > AtomList
typedef std::list< Bond * > BondList
typedef std::list< AtomContainer * > AtomContainerList
typedef std::list< PDBAtom * > PDBAtomList
typedef std::list< Residue * > ResidueList
typedef std::list< Fragment * > FragmentList
typedef std::list< Molecule * > MoleculeList
typedef std::list< Protein * > ProteinList
typedef std::list< SecondaryStructure * > SecondaryStructureList
typedef std::list< Chain * > ChainList
typedef std::list< Nucleotide * > NucleotideList
typedef std::list< NucleicAcid * > NucleicAcidList

[NOHEADER]

BALL_EXPORT AtomList atoms (const AtomContainer &fragment, const String &expression=String())
 Extract atoms matching an expression.
BALL_EXPORT AtomList atoms (const AtomList &atoms, const String &expression)
 Extract atoms matching an expression.
BALL_EXPORT PDBAtomList PDBAtoms (const AtomContainer &fragment, const String &expression=String())
 Extract PDB atoms matching an expression.
BALL_EXPORT BondList bonds (const AtomContainer &fragment, bool selected_only=false)
 Extract all bonds from a kernel data structure.
BALL_EXPORT BondList bonds (const Atom &atom)
 Extract all bonds from an atom.
BALL_EXPORT AtomContainerList atomContainers (const AtomContainer &fragment, bool selected_only=false)
 Extract all base fragments from a kernel data structure.
BALL_EXPORT ResidueList residues (const AtomContainer &fragment, bool selected_only=false)
 Extract all residues from a kernel data structure.
BALL_EXPORT FragmentList fragments (const AtomContainer &fragment, bool selected_only=false)
 Extract all fragments from a kernel data structure.
BALL_EXPORT MoleculeList molecules (const AtomContainer &fragment, bool selected_only=false)
 Extract all molecules from a kernel data structure.
BALL_EXPORT ProteinList proteins (const AtomContainer &fragment, bool selected_only=false)
 Extract all proteins from a kernel data structure.
BALL_EXPORT SecondaryStructureList secondaryStructures (const AtomContainer &fragment, bool selected_only=false)
 Extract all secondary structures from a kernel data structure.
BALL_EXPORT ChainList chains (const AtomContainer &fragment, bool selected_only=false)
 Extract all chains from a kernel data structure.
BALL_EXPORT NucleicAcidList nucleicAcids (const AtomContainer &fragment, bool selected_only=false)
 Extract all nucleic acids from a kernel data structure.
BALL_EXPORT NucleotideList nucleotides (const AtomContainer &fragment, bool selected_only=false)
 Extract all nucleotides from a kernel data structure.

Functions

template<class AtomContainerType>
void cloneBonds (const AtomContainerType &atom_container, AtomContainerType &cloned)
 Bond cloning method.

Variables

bool clone_bonds
 Global static variable needed for the cloning of kernel objects containing bonds.
BALL_EXPORT PTE_ PTE
 Global static instance of the periodic table.

Detailed Description

Further classes and functions related to the kernel classes

Define Documentation

#define BALL_FOREACH_ATOM atom_container,
atom_iterator   ) 
 

Value:

for (atom_iterator = (atom_container).beginAtom(); \
     !atom_iterator.isEnd(); ++atom_iterator)
Atom iterator macro.

Convenience macro for easy iteration over all atoms of {atom_container}.

Parameters:
atom_container container of Atom instances
atom_iterator AtomIterator instance
See also:
Atom

AtomIterator

#define BALL_FOREACH_ATOM_BOND bond_container,
bond_iterator   ) 
 

Value:

for (bond_iterator = (bond_container).beginBond(); \
     !bond_iterator.isEnd(); ++bond_iterator)
Atom bond iterator macro.

Convenience macro for easy iteration over all bonds of {bond_container}.

Parameters:
bond_container Atom instance container of Bond instances
bond_iterator AtomBondIterator instance
See also:
Atom

Bond

AtomBondIterator

#define BALL_FOREACH_ATOM_PAIR atom_container,
first_atom_iterator,
second_atom_iterator   ) 
 

Value:

for (first_atom_iterator = (atom_container).beginAtom(); \
     !first_atom_iterator.isEnd(); ++first_atom_iterator) \
  for (second_atom_iterator = (atom_container).beginAtom(); \
       !second_atom_iterator.isEnd(); ++second_atom_iterator) \
    if ((*first_atom_iterator) < (*second_atom_iterator))
Atom pair iterator macro.

Convenience macro for easy iteration over all atom pairs of {atom_container}.

Parameters:
atom_container container of Atom instances
first_atom_iterator first AtomIterator instance
second_atom_iterator second AtomIterator instance
See also:
Atom

AtomIterator

#define BALL_FOREACH_ATOMCONTAINER atom_containers,
atom_container_iterator   ) 
 

Value:

for (atom_container_iterator = (atom_containers).beginAtomContainer(); \
     !atom_container_iterator.isEnd(); ++atom_container_iterator)
AtomContainer iterator macro.

Convenience macro for easy iteration over all atom containers of {atom_container}.

Parameters:
atom_containers container of AtomContainer instances
atom_container_iterator AtomContainerIterator instance
See also:
AtomContainer

AtomContainerIterator

#define BALL_FOREACH_BOND atom_container,
atom_iterator,
bond_iterator   ) 
 

Value:

for (atom_iterator = (atom_container).beginAtom(); \
     !atom_iterator.isEnd(); ++atom_iterator) \
  for (bond_iterator = (*atom_iterator).beginBond(); \
       !bond_iterator.isEnd(); ++bond_iterator) \
    if ((*bond_iterator).getFirstAtom() == &(*atom_iterator) \
        || !(atom_container).isAncestorOf(*(*bond_iterator).getFirstAtom()))
Bond iterator macro.

Convenience macro for easy iteration over all bonds of all atoms in {atom_container}.

Parameters:
atom_container container of Atom instances
atom_iterator AtomIterator instance which is the container of Bond instances
bond_iterator AtomBondIterator instance
See also:
Atom

Bond

AtomIterator

AtomBondIterator

#define BALL_FOREACH_CHAIN chain_container,
chain_iterator   ) 
 

Value:

for (chain_iterator = (chain_container).beginChain(); \
     !chain_iterator.isEnd(); ++chain_iterator)
Chain iterator macro.

Convenience macro for easy iteration over all chains of {chain_container}.

Parameters:
chain_container container of Chain instances
chain_iterator ChainIterator instance

#define BALL_FOREACH_FRAGMENT fragment_container,
fragment_iterator   ) 
 

Value:

for (fragment_iterator = (fragment_container).beginFragment(); \
     !fragment_iterator.isEnd(); ++fragment_iterator)
Fragment iterator macro.

Convenience macro for easy iteration over all fragments of {fragment_container}.

Parameters:
fragment_container container of Fragment instances
fragment_iterator FragmentIterator instance
See also:
Fragment

FragmentIterator

#define BALL_FOREACH_INTERBOND atom_container,
atom_iterator,
bond_iterator   ) 
 

Value:

for (atom_iterator = (atom_container).beginAtom(); \
     !atom_iterator.isEnd(); ++atom_iterator) \
  for (bond_iterator = (*atom_iterator).beginBond(); \
       !bond_iterator.isEnd(); ++bond_iterator) \
    if (((*bond_iterator).getFirstAtom() == &(*atom_iterator) \
         && !(atom_container).isAncestorOf(*(*bond_iterator).getSecondAtom())) \
         || !(atom_container).isAncestorOf(*(*bond_iterator).getFirstAtom()))
Intermolecular bond iterator macro.

Convenience macro for easy iteration over all intermolecular bonds of atoms in {atom_container}.

Parameters:
atom_container container of Atom instances
atom_iterator AtomIterator instance which is the container of Bond instances
bond_iterator AtomBondIterator instance

#define BALL_FOREACH_INTRABOND atom_container,
atom_iterator,
bond_iterator   ) 
 

Value:

for (atom_iterator = (atom_container).beginAtom(); \
     !atom_iterator.isEnd(); ++atom_iterator) \
  for (bond_iterator = (*atom_iterator).beginBond(); \
       !bond_iterator.isEnd(); ++bond_iterator) \
    if ((*bond_iterator).getFirstAtom() == &(*atom_iterator) \
        && (atom_container).isAncestorOf(*(*bond_iterator).getSecondAtom()))
Intramolecular bond iterator macro.

Convenience macro for easy iteration over all intramolecular (internal) bonds of {atom_container}.

Parameters:
atom_container container of Atom instances
atom_iterator AtomIterator instance which is the container of Bond instances
bond_iterator AtomBondIterator instance

#define BALL_FOREACH_MOLECULE molecule_container,
molecule_iterator   ) 
 

Value:

for (molecule_iterator = (molecule_container).beginMolecule(); \
     !molecule_iterator.isEnd(); ++molecule_iterator)
Molecule iterator macro.

Convenience macro for easy iteration over all molecules of {molecule_container}.

Parameters:
molecule_container container of Molecule instances
molecule_iterator MoleculeIterator instance
See also:
Molecule

MoleculeIterator

#define BALL_FOREACH_PDBATOM pdb_atom_container,
pdb_atom_iterator   ) 
 

Value:

for (pdb_atom_iterator = (pdb_atom_container).beginPDBAtom(); \
     !pdb_atom_iterator.isEnd(); ++pdb_atom_iterator)
PDBAtom iterator macro.

Convenience macro for easy iteration over all PDBAtom s of {pdb_atom_container}.

Parameters:
pdb_atom_container container of PDBAtom instances
pdb_atom_iterator PDBAtomIterator instance

#define BALL_FOREACH_PROTEIN protein_container,
protein_iterator   ) 
 

Value:

for (protein_iterator = (protein_container).beginProtein(); \
     !protein_iterator.isEnd(); ++protein_iterator)
Protein iterator macro.

Convenience macro for easy iteration over all proteins of {protein_container}.

Parameters:
protein_container container of Protein instances
protein_iterator ProteinIterator instance
See also:
Protein

#define BALL_FOREACH_RESIDUE residue_container,
residue_iterator   ) 
 

Value:

for (residue_iterator = (residue_container).beginResidue(); \
     !residue_iterator.isEnd(); \
     ++residue_iterator)
Residue iterator macro.

Convenience macro for easy iteration over all residues of {residue_container}.

Parameters:
residue_container container of Residue instances
residue_iterator ResidueIterator instance

#define BALL_FOREACH_SECONDARYSTRUCTURE secondary_structure_container,
secondary_structure_iterator   ) 
 

Value:

for (secondary_structure_iterator = (secondary_structure_container).beginSecondaryStructure(); \
     !secondary_structure_iterator.isEnd(); ++secondary_structure_iterator)
SecondaryStructure iterator macro.

Convenience macro for easy iteration over all secondary structures of {secondary_structure_container}.

Parameters:
secondary_structure_container container of SecondaryStructure instances
secondary_structure_iterator SecondaryStructureIterator instance


Typedef Documentation

typedef std::list<Atom*> AtomList
 

These classes can be used to hold pointers to kernel objects. They are returned by kernel extractors. These lists are a convenient way to execute operations on subsets of kernel structures and an often convenient, albeit slower, alternative to iterators. They are just convenient tyepdefs, so they will behave exactly as any STL list. In order to create these lists from kernel objects, use extractors .


Function Documentation

BALL_EXPORT AtomContainerList atomContainers const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all base fragments from a kernel data structure.

BALL_EXPORT AtomList atoms const AtomList atoms,
const String &  expression
 

Extract atoms matching an expression.

This method extracts all atoms from an atom list that match the Expression expression.

Parameters:
atoms the AtomContainer containing the atoms
expression the expression that selects the atoms

BALL_EXPORT AtomList atoms const AtomContainer &  fragment,
const String &  expression = String()
 

Extract atoms matching an expression.

This method extracts all atoms of a kernel data structure into a list that match the Expression expression. If no expression is given, all atoms will be extracted.

Parameters:
fragment the AtomContainer containing the atoms.
expression the expression that selects the atoms (default: no expression)

BALL_EXPORT BondList bonds const Atom &  atom  ) 
 

Extract all bonds from an atom.

This function returns all bonds of an atom.

BALL_EXPORT BondList bonds const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all bonds from a kernel data structure.

This function extracts all bonds from the atoms contained in the base fragment. If selected_only is set to true, only bonds are extracted where both atoms are selected.

BALL_EXPORT ChainList chains const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all chains from a kernel data structure.

template<class AtomContainerType>
void cloneBonds const AtomContainerType &  atom_container,
AtomContainerType &  cloned
 

Bond cloning method.

This template function implements the cloning of Bond s in AtomContainers. As Bonds are not integrated in the Composite tree structure of kernel objects, a simple deep cloning of a composite only copies all composites down to atoms. Bonds are not included because they are not children of the atoms but stored in a bond array. However, cloning of any kernel objects should naturally clone bonds, too. The implementation of this {cloning-with-bonds} is divided in two parts: first, a deep (recursive) cloning of all composites is performed. Second, the root composite (which is always an AtomContainer) calls cloneBonds for the cloned system to copy the bonds.

The trouble with this implementation is that each clone method must have the possibility to call cloneBonds, but only the first clone method in the recursive call tree is allowed to call it. This is guaranteed by the use of a global static variable clone_bonds . The first clone method called sets clone_bonds to false thereby forbidding the use of cloneBonds to all subsequently called clone methods. Then, it calls cloneBonds and resets clone_bonds to true.
This method assumes that the second argument (the composite without bonds) is a deep copy of the first argument (the composite containing the atoms). If the tree structures of both composites are not isomorphous, bonds are created in an unpredictable way.
Namespace: BALL
Parameters:
atom_container the atom_container containing the bonds
cloned a deep copy of atom_container

BALL_EXPORT FragmentList fragments const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all fragments from a kernel data structure.

BALL_EXPORT MoleculeList molecules const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all molecules from a kernel data structure.

BALL_EXPORT NucleicAcidList nucleicAcids const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all nucleic acids from a kernel data structure.

BALL_EXPORT NucleotideList nucleotides const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all nucleotides from a kernel data structure.

BALL_EXPORT PDBAtomList PDBAtoms const AtomContainer &  fragment,
const String &  expression = String()
 

Extract PDB atoms matching an expression.

This method extracts all PDB atoms of a kernel data structure into a list that match the Expression expression. If no expression is given, all PDB atoms will be returned.

Parameters:
fragment the AtomContainer containing the atoms
expression the expression that selects the atoms (default: no expression)

BALL_EXPORT ProteinList proteins const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all proteins from a kernel data structure.

BALL_EXPORT ResidueList residues const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all residues from a kernel data structure.

BALL_EXPORT SecondaryStructureList secondaryStructures const AtomContainer &  fragment,
bool  selected_only = false
 

Extract all secondary structures from a kernel data structure.


Variable Documentation

bool clone_bonds
 

Global static variable needed for the cloning of kernel objects containing bonds.

Namespace: BALL

See also:
cloneBonds

BALL_EXPORT PTE_ PTE
 

Global static instance of the periodic table.