source: molecuilder/src/bond.hpp@ eb167d

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

Some minor fixes with regards to what needs to be included where and not more.

  • 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 config.h
14#ifdef HAVE_CONFIG_H
15#include <config.h>
16#endif
17
18#include "atom.hpp"
19
20/** Bonds between atoms.
21 * Class incorporates bonds between atoms in a molecule,
22 * used to derive tge fragments in many-body bond order
23 * calculations.
24 */
25class bond {
26 public:
27 atom *leftatom; //!< first bond partner
28 atom *rightatom; //!< second bond partner
29 bond *previous; //!< previous atom in molecule list
30 bond *next; //!< next atom in molecule list
31 int HydrogenBond; //!< Number of hydrogen atoms in the bond
32 int BondDegree; //!< single, double, triple, ... bond
33 int nr; //!< unique number in a molecule, updated by molecule::CreateAdjacencyList()
34 bool Cyclic; //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis()
35 enum EdgeType Type;//!< whether this is a tree or back edge
36
37 atom * GetOtherAtom(atom *Atom) const;
38 bond * GetFirstBond();
39 bond * GetLastBond();
40
41 bool MarkUsed(enum Shading color);
42 enum Shading IsUsed();
43 void ResetUsed();
44 bool Contains(const atom *ptr);
45 bool Contains(const int nr);
46
47 bond();
48 bond(atom *left, atom *right);
49 bond(atom *left, atom *right, int degree);
50 bond(atom *left, atom *right, int degree, int number);
51 ~bond();
52
53 private:
54 enum Shading Used; //!< marker in depth-first search, DepthFirstSearchAnalysis()
55};
56
57ostream & operator << (ostream &ost, const bond &b);
58
59#endif /* BOND_HPP_ */
Note: See TracBrowser for help on using the repository browser.