Ignore:
Timestamp:
Oct 18, 2009, 2:51:38 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
77894f
Parents:
b0ee98
git-author:
Frederik Heber <heber@…> (10/18/09 14:15:37)
git-committer:
Frederik Heber <heber@…> (10/18/09 14:51:38)
Message:

Huge refactoring: molecule::ListOfBondsPerAtom and molecule::NumberOfBondsPerAtom removed, atom::ListOfBonds introduced. Unit Test for ListOfBonds manipulation introduced.

  • changes to builder.cpp: removed CreateListOfBondsPerAtom() calls, as the creation of the global arrays is not necessary anymore
  • changes to LinkedCell: LinkedCell::CheckBounds(int[NDIM]) does not admonish out of bonds as this is not desired for the local offset which may become out of bounds.
  • changes to lists.hpp templates: BUGFIX: unlink() now sets ->next and ->previous to NULL, cleanup() uses removedwithoutcheck()
  • new templates for molecule.hpp: SumPerAtom() allows for summation of the return value of atom:...() member fiunctions. This is needed e.g. for atom::CorrectBondDegree()

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/bond.hpp

    rb0ee98 r872b51  
    2525
    2626/** Bonds between atoms.
    27  * Class incorporates bonds between atoms in a molecule,
    28  * used to derive tge fragments in many-body bond order
    29  * calculations.
     27 * Class incorporates bonds between atoms in a molecule.
     28 * Note that we regard bond always as something in a molecule,
     29 * as it is the glue making up the connected subgrapgh and
     30 * hence the molecule. Thus, bonds belong globally to the molecule
     31 * (and are free'd there) and only locally to the atom classs.
    3032 */
    3133class bond {
     
    4143    enum EdgeType Type;//!< whether this is a tree or back edge
    4244
    43   atom * GetOtherAtom(atom *Atom) const;
    44   bond * GetFirstBond();
    45   bond * GetLastBond();
     45  atom * GetOtherAtom(const atom *Atom) const;
    4646
    4747  bool MarkUsed(enum Shading color);
Note: See TracChangeset for help on using the changeset viewer.