|
Classes |
class | BALL::Bond |
class | BALL::ExpressionParser |
class | BALL::ExpressionTree |
class | BALL::Element |
class | BALL::SecondaryStructure |
Modules |
| Periodic Table of Elements |
Functions |
template<class AtomContainerType > |
void | BALL::cloneBonds (const AtomContainerType &atom_container, AtomContainerType &cloned) |
Variables |
bool | BALL::clone_bonds |
BALL_EXPORT PTE_ | BALL::PTE |
typedef std::list< Atom * > | BALL::AtomList |
typedef std::list< Bond * > | BALL::BondList |
typedef std::list
< AtomContainer * > | BALL::AtomContainerList |
typedef std::list< PDBAtom * > | BALL::PDBAtomList |
typedef std::list< Residue * > | BALL::ResidueList |
typedef std::list< Fragment * > | BALL::FragmentList |
typedef std::list< Molecule * > | BALL::MoleculeList |
typedef std::list< Protein * > | BALL::ProteinList |
typedef std::list
< SecondaryStructure * > | BALL::SecondaryStructureList |
typedef std::list< Chain * > | BALL::ChainList |
typedef std::list< Nucleotide * > | BALL::NucleotideList |
typedef std::list< NucleicAcid * > | BALL::NucleicAcidList |
BALL_EXPORT AtomList | BALL::atoms (const AtomContainer &fragment, const String &expression=String()) |
BALL_EXPORT AtomList | BALL::atoms (const AtomList &atoms, const String &expression) |
BALL_EXPORT PDBAtomList | BALL::PDBAtoms (const AtomContainer &fragment, const String &expression=String()) |
BALL_EXPORT BondList | BALL::bonds (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT BondList | BALL::bonds (const Atom &atom) |
BALL_EXPORT AtomContainerList | BALL::atomContainers (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT ResidueList | BALL::residues (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT FragmentList | BALL::fragments (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT MoleculeList | BALL::molecules (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT ProteinList | BALL::proteins (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT SecondaryStructureList | BALL::secondaryStructures (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT ChainList | BALL::chains (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT NucleicAcidList | BALL::nucleicAcids (const AtomContainer &fragment, bool selected_only=false) |
BALL_EXPORT NucleotideList | BALL::nucleotides (const AtomContainer &fragment, bool selected_only=false) |
template<class AtomContainerType >
void BALL::cloneBonds |
( |
const AtomContainerType & |
atom_container, |
|
|
AtomContainerType & |
cloned | |
|
) |
| | [inline] |
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 |
References BALL::Bond::createBond(), BALL::Bond::finalize(), BALL::Bond::setFirstAtom(), and BALL::Bond::setSecondAtom().