BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces
KERNEL/forEach.h File Reference

Go to the source code of this file.

Namespaces

 BALL
 -*- Mode: C++; tab-width: 2; -*-
 

Macros

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)
 

Macro Definition 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_containercontainer of Atom instances
atom_iteratorAtomIterator 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_containerAtom instance container of Bond instances
bond_iteratorAtomBondIterator 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_containercontainer of Atom instances
first_atom_iteratorfirst AtomIterator instance
second_atom_iteratorsecond 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_containerscontainer of AtomContainer instances
atom_container_iteratorAtomContainerIterator 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_containercontainer of Atom instances
atom_iteratorAtomIterator instance which is the container of Bond instances
bond_iteratorAtomBondIterator 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_containercontainer of Chain instances
chain_iteratorChainIterator 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_containercontainer of Fragment instances
fragment_iteratorFragmentIterator 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_containercontainer of Atom instances
atom_iteratorAtomIterator instance which is the container of Bond instances
bond_iteratorAtomBondIterator 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_containercontainer of Atom instances
atom_iteratorAtomIterator instance which is the container of Bond instances
bond_iteratorAtomBondIterator 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_containercontainer of Molecule instances
molecule_iteratorMoleculeIterator 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_containercontainer of PDBAtom instances
pdb_atom_iteratorPDBAtomIterator 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_containercontainer of Protein instances
protein_iteratorProteinIterator 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_containercontainer of Residue instances
residue_iteratorResidueIterator 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_containercontainer of SecondaryStructure instances
secondary_structure_iteratorSecondaryStructureIterator instance

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