/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /** * \file atoms.dox * * Created on: Oct 31, 2011 * Author: heber */ /** * \page atoms Atoms * * Atoms are the central ingredient. They store the following information: * - position, velocity, and force (over multiple time steps) * - element * - bond neighbours (over multiple time steps) * - id * * \section atoms-structure * * The atom class has quite a complicated structure because an atoms has to * fulfill various roles within this code: * - atom * - TesselPoint for Tesselation * - Graph node for BondGraph * - bonded particle * * There is an onion structure where additional information has been added * as the layers of an onion via inheritance. * * We briefly want to explain the various elements of the inheritance * - AtomObservable - contains notification channels enumeration and also all * interface function required by the Observable pattern. * - AtomInfo - contains position, element and so on. * - ParticleInfo - contains name and number of the atom * - BondedParticle - contains all functions related to bonds * - BondedParticleInfo - contains all member variables related to storing bond * information * - GraphNode - contains all functions related to graphs * - GraphNodeInfo - contains all member variables for graph information * - TesselPoint - contains functions for considering the atom as a TesselPoint * in Tesselation (\ref tesselation) * * Member variables and functions have been split into class with and without * added \a ...Info. ...Info classes that are required multiple times are * inherited as virtual to guarantee that their members are unique (exist * only once) within an instance. * * \note Atoms have a sort-of early serialization concept (\ref serialization) * as AtomicInfo. \todo This could be refactored into a full serialization * compatible implementation. * * \section atoms-copy Copying atoms * * Copying atoms is a frequent action. That's why there are specific functors * to get it done in more and more complex ways. The functors all inherit * the \ref CopyAtomsInterface and the more complex ones build upon the * functionality of the simpler ones: * -# CopyAtomsInterface: Internally sets to the number of desired atoms. * -# CopyAtoms_Simple: Fills the internal set with true copies. * -# CopyAtoms_withBonds: Additionally also adds bonds in between the copies * as they exist in between the original atoms. * -# CopyAtoms_SaturateDanglingBonds: additionally checks for cut bond that * would now become dangling bonds and inserts additional hydrogens for * each cut bond such that the copied array of atoms is saturated. * * The CopyAtomsInterface is simple to use: * \code * std::vector atoms_to_copy; * CopyAtoms_Simple copyMethod; * copyMethod(atoms_to_copy); * std::vector copiedAtoms = getCopiedAtoms(); * \endcode * * * \date 2012-03-30 * */