source: molecuilder/src/atom.hpp@ 8ffe32

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

More functions of molecule now use templated iterators.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*
2 * atom.hpp
3 *
4 * Created on: Aug 3, 2009
5 * Author: heber
6 */
7
8#ifndef ATOM_HPP_
9#define ATOM_HPP_
10
11using namespace std;
12
13// include config.h
14#ifdef HAVE_CONFIG_H
15#include <config.h>
16#endif
17
18
19#include <iostream>
20
21#include "element.hpp"
22#include "tesselation.hpp"
23#include "vector.hpp"
24
25/** Single atom.
26 * Class incorporates position, type
27 */
28class atom : public TesselPoint {
29 public:
30 Vector x; //!< coordinate array of atom, giving position within cell
31 Vector v; //!< velocity array of atom
32 element *type; //!< pointing to element
33 atom *previous; //!< previous atom in molecule list
34 atom *next; //!< next atom in molecule list
35 atom *father; //!< In many-body bond order fragmentations points to originating atom
36 atom *Ancestor; //!< "Father" in Depth-First-Search
37 //char *Name; //!< unique name used during many-body bond-order fragmentation, comes from TesselPoint
38 int FixedIon; //!< config variable that states whether forces act on the ion or not
39 int *sort; //!< sort criteria
40 //int nr; //!< continuous, unique number, comes from TesselPoint
41 int GraphNr; //!< unique number, given in DepthFirstSearchAnalysis()
42 int *ComponentNr;//!< belongs to this nonseparable components, given in DepthFirstSearchAnalysis() (if more than one, then is SeparationVertex)
43 int LowpointNr; //!< needed in DepthFirstSearchAnalysis() to detect nonseparable components, is the lowest possible number of an atom to reach via tree edges only followed by at most one back edge.
44 bool SeparationVertex; //!< whether this atom separates off subsets of atoms or not, determined in DepthFirstSearchAnalysis()
45 bool IsCyclic; //!< whether atom belong to as cycle or not, determined in DepthFirstSearchAnalysis()
46 unsigned char AdaptiveOrder; //!< current present bond order at site (0 means "not set")
47 bool MaxOrder; //!< whether this atom as a root in fragmentation still creates more fragments on higher orders or not
48
49 atom();
50 atom(class atom *pointer);
51 virtual ~atom();
52
53 bool Output(int ElementNo, int AtomNo, ofstream *out, const char *comment = NULL) const;
54 bool Output(int *ElementNo, int *AtomNo, ofstream *out, const char *comment = NULL);
55 bool OutputXYZLine(ofstream *out) const;
56 void EqualsFather ( atom *ptr, atom **res );
57 void CorrectFather();
58 atom *GetTrueFather();
59 bool Compare(const atom &ptr);
60
61 bool IsInParallelepiped(Vector offset, double *parallelepiped);
62
63 ostream & operator << (ostream &ost);
64
65 private:
66};
67
68ostream & operator << (ostream &ost, const atom &a);
69
70#endif /* ATOM_HPP_ */
Note: See TracBrowser for help on using the repository browser.