source: molecuilder/src/bond.hpp@ e78824

Last change on this file since e78824 was 834ff3, checked in by Frederik Heber <heber@…>, 16 years ago

Huge refactoring of Tesselation routines, but not finished yet.

  • new file tesselation.cpp with all of classes tesselation, Boundary..Set and CandidatesForTesselationOB
  • new file tesselationhelper.cpp with all auxiliary functions.
  • boundary.cpp just contains super functions, combininb molecule and Tesselation pointers
  • new pointer molecule::TesselStruct
  • PointMap, LineMap, TriangleMap DistanceMap have been moved from molecules.hpp to tesselation.hpp
  • new abstract class PointCloud and TesselPoint
  • atom inherits TesselPoint
  • molecule inherits PointCloud (i.e. a set of TesselPoints) and implements all virtual functions for the chained list
  • TriangleFilesWritten is thrown out, intermediate steps are written in find_nonconvex_border and not in find_next_triangle()
  • LinkedCell class uses TesselPoint as its nodes, i.e. as long as any class inherits TesselPoint, it may make use of LinkedCell as well and a PointCloud is used to initialize
  • class atom and bond definitions have been moved to own header files

NOTE: This is not bugfree yet. Tesselation of heptan produces way too many triangles, but runs without faults or leaks.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 * bond.hpp
3 *
4 * Created on: Aug 3, 2009
5 * Author: heber
6 */
7
8#ifndef BOND_HPP_
9#define BOND_HPP_
10
11using namespace std;
12
13#include "atom.hpp"
14
15/** Bonds between atoms.
16 * Class incorporates bonds between atoms in a molecule,
17 * used to derive tge fragments in many-body bond order
18 * calculations.
19 */
20class bond {
21 public:
22 atom *leftatom; //!< first bond partner
23 atom *rightatom; //!< second bond partner
24 bond *previous; //!< previous atom in molecule list
25 bond *next; //!< next atom in molecule list
26 int HydrogenBond; //!< Number of hydrogen atoms in the bond
27 int BondDegree; //!< single, double, triple, ... bond
28 int nr; //!< unique number in a molecule, updated by molecule::CreateAdjacencyList()
29 bool Cyclic; //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis()
30 enum EdgeType Type;//!< whether this is a tree or back edge
31
32 atom * GetOtherAtom(atom *Atom) const;
33 bond * GetFirstBond();
34 bond * GetLastBond();
35
36 bool MarkUsed(enum Shading color);
37 enum Shading IsUsed();
38 void ResetUsed();
39 bool Contains(const atom *ptr);
40 bool Contains(const int nr);
41
42 bond();
43 bond(atom *left, atom *right);
44 bond(atom *left, atom *right, int degree);
45 bond(atom *left, atom *right, int degree, int number);
46 ~bond();
47
48 private:
49 enum Shading Used; //!< marker in depth-first search, DepthFirstSearchAnalysis()
50};
51
52ostream & operator << (ostream &ost, const bond &b);
53
54#endif /* BOND_HPP_ */
Note: See TracBrowser for help on using the repository browser.