forEach.h File Reference

Go to the source code of this file.

Namespaces

namespace  BALL

Defines

Convenient iteration macros

#define BALL_FOREACH_MOLECULE(molecule_container, molecule_iterator)
#define BALL_FOREACH_FRAGMENT(fragment_container, fragment_iterator)
#define BALL_FOREACH_ATOMCONTAINER(atom_containers, atom_container_iterator)
#define BALL_FOREACH_ATOM(atom_container, atom_iterator)
#define BALL_FOREACH_ATOM_BOND(bond_container, bond_iterator)
#define BALL_FOREACH_ATOM_PAIR(atom_container, first_atom_iterator, second_atom_iterator)
#define BALL_FOREACH_BOND(atom_container, atom_iterator, bond_iterator)
#define BALL_FOREACH_INTERBOND(atom_container, atom_iterator, bond_iterator)
#define BALL_FOREACH_INTRABOND(atom_container, atom_iterator, bond_iterator)
#define BALL_FOREACH_PROTEIN(protein_container, protein_iterator)
#define BALL_FOREACH_CHAIN(chain_container, chain_iterator)
#define BALL_FOREACH_SECONDARYSTRUCTURE(secondary_structure_container, secondary_structure_iterator)
#define BALL_FOREACH_RESIDUE(residue_container, residue_iterator)
#define BALL_FOREACH_PDBATOM(pdb_atom_container, pdb_atom_iterator)

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

Definition at line 63 of file KERNEL/forEach.h.

#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

Definition at line 76 of file KERNEL/forEach.h.

#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

Definition at line 89 of file KERNEL/forEach.h.

#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

Definition at line 51 of file KERNEL/forEach.h.

#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

Definition at line 107 of file KERNEL/forEach.h.

#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

Definition at line 165 of file KERNEL/forEach.h.

#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

Definition at line 39 of file KERNEL/forEach.h.

#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

Definition at line 123 of file KERNEL/forEach.h.

#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

Definition at line 140 of file KERNEL/forEach.h.

#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

Definition at line 27 of file KERNEL/forEach.h.

#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

Definition at line 197 of file KERNEL/forEach.h.

#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

Definition at line 155 of file KERNEL/forEach.h.

#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

Definition at line 186 of file KERNEL/forEach.h.

#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

Definition at line 176 of file KERNEL/forEach.h.

Generated by  doxygen 1.6.3