| [357fba] | 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 | 
 | 
|---|
 | 11 | using namespace std;
 | 
|---|
 | 12 | 
 | 
|---|
| [cd4ccc] | 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"
 | 
|---|
| [357fba] | 22 | #include "tesselation.hpp"
 | 
|---|
 | 23 | #include "vector.hpp"
 | 
|---|
 | 24 | 
 | 
|---|
 | 25 | /** Single atom.
 | 
|---|
 | 26 |  * Class incorporates position, type
 | 
|---|
 | 27 |  */
 | 
|---|
 | 28 | class 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);
 | 
|---|
| [055861] | 51 |   virtual ~atom();
 | 
|---|
| [357fba] | 52 | 
 | 
|---|
 | 53 |   bool Output(int ElementNo, int AtomNo, ofstream *out, const char *comment = NULL) const;
 | 
|---|
 | 54 |   bool OutputXYZLine(ofstream *out) const;
 | 
|---|
 | 55 |   atom *GetTrueFather();
 | 
|---|
| [ab1932] | 56 |   bool Compare(const atom &ptr);
 | 
|---|
| [357fba] | 57 | 
 | 
|---|
| [055861] | 58 |   ostream & operator << (ostream &ost);
 | 
|---|
 | 59 | 
 | 
|---|
| [357fba] | 60 |   private:
 | 
|---|
 | 61 | };
 | 
|---|
 | 62 | 
 | 
|---|
 | 63 | ostream & operator << (ostream &ost, const atom &a);
 | 
|---|
 | 64 | 
 | 
|---|
 | 65 | #endif /* ATOM_HPP_ */
 | 
|---|