|
| Periodic Table of Elements |
| These classes represent elements and the periodic table of elements. The Element class is used to describe common properties of atoms (e.g., mass, nuclear charge, element symbol). Elements can be retrieved from the PTE object (Periodic Table of Elements) which is a global instance of PTE_ .
|
|
Further classes and functions related to the kernel classes
◆ AtomList
Kernel object list classes. 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 .
Definition at line 35 of file extractors.h.
◆ atoms()
Extraction functions for external iteration. The following set of functions can by used from python to compile lists of objects from BALL kernel data structures. 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) |
◆ cloneBonds()
template<class AtomContainerType >
void BALL::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 |
Definition at line 57 of file KERNEL/global.h.
◆ clone_bonds
Global static variable needed for the cloning of kernel objects containing bonds. Namespace: BALL
- See also
- cloneBonds
◆ PTE
Global static instance of the periodic table.