| 1 | /*
 | 
|---|
| 2 |  * atom_bondedparticleinfo.hpp
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  *  Created on: Oct 19, 2009
 | 
|---|
| 5 |  *      Author: heber
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef ATOM_BONDEDPARTICLEINFO_HPP_
 | 
|---|
| 9 | #define ATOM_BONDEDPARTICLEINFO_HPP_
 | 
|---|
| 10 | 
 | 
|---|
| 11 | 
 | 
|---|
| 12 | using namespace std;
 | 
|---|
| 13 | 
 | 
|---|
| 14 | /*********************************************** includes ***********************************/
 | 
|---|
| 15 | 
 | 
|---|
| 16 | // include config.h
 | 
|---|
| 17 | #ifdef HAVE_CONFIG_H
 | 
|---|
| 18 | #include <config.h>
 | 
|---|
| 19 | #endif
 | 
|---|
| 20 | 
 | 
|---|
| 21 | #include <list>
 | 
|---|
| 22 | 
 | 
|---|
| 23 | /****************************************** forward declarations *****************************/
 | 
|---|
| 24 | 
 | 
|---|
| 25 | class bond;
 | 
|---|
| 26 | class BondedParticle;
 | 
|---|
| 27 | 
 | 
|---|
| 28 | #define BondList list<bond *>
 | 
|---|
| 29 | 
 | 
|---|
| 30 | /********************************************** declarations *******************************/
 | 
|---|
| 31 | 
 | 
|---|
| 32 | class BondedParticleInfo {
 | 
|---|
| 33 |   friend class BondedParticle;
 | 
|---|
| 34 | public:
 | 
|---|
| 35 |   unsigned char AdaptiveOrder;  //!< current present bond order at site (0 means "not set")
 | 
|---|
| 36 |   bool MaxOrder;  //!< whether this atom as a root in fragmentation still creates more fragments on higher orders or not
 | 
|---|
| 37 | 
 | 
|---|
| 38 |   BondedParticleInfo();
 | 
|---|
| 39 |   virtual ~BondedParticleInfo();
 | 
|---|
| 40 | 
 | 
|---|
| 41 |   /** Pushes back another step in all trajectory vectors.
 | 
|---|
| 42 |    *
 | 
|---|
| 43 |    * This allows to extend all trajectories contained in different classes
 | 
|---|
| 44 |    * consistently. This is implemented by the topmost class which calls the
 | 
|---|
| 45 |    * real functions, \sa AppendTrajectoryStep(), by all necessary subclasses.
 | 
|---|
| 46 |    */
 | 
|---|
| 47 |   virtual void UpdateSteps()=0;
 | 
|---|
| 48 | 
 | 
|---|
| 49 |   /** Const accessor to ListOfBonds of WorldTime::CurrentTime.
 | 
|---|
| 50 |    *
 | 
|---|
| 51 |    * @return ListOfBonds[WorldTime::CurrentTime]
 | 
|---|
| 52 |    */
 | 
|---|
| 53 |   const BondList& getListOfBonds() const;
 | 
|---|
| 54 |   /** Accessor to ListOfBonds of WorldTime::CurrentTime.
 | 
|---|
| 55 |    *
 | 
|---|
| 56 |    * Note, new empty BondList is returned if array entry at upper boundary is
 | 
|---|
| 57 |    * accessed. Beyond std will issue exception due to out-of-range access.
 | 
|---|
| 58 |    *
 | 
|---|
| 59 |    * @return ListOfBonds[WorldTime::CurrentTime]
 | 
|---|
| 60 |    */
 | 
|---|
| 61 |   BondList& getListOfBonds();
 | 
|---|
| 62 | 
 | 
|---|
| 63 |   /** Const Accessor ListOfBonds of any present time step.
 | 
|---|
| 64 |    *
 | 
|---|
| 65 |    * @param _step time step to access
 | 
|---|
| 66 |    * @return ListOfBonds[_step].
 | 
|---|
| 67 |    */
 | 
|---|
| 68 |   const BondList& getListOfBondsAtStep(unsigned int _step) const;
 | 
|---|
| 69 |   /** Accessor ListOfBonds of any present time step.
 | 
|---|
| 70 |    *
 | 
|---|
| 71 |    * Note, new empty BondList is returned if array entry at upper boundary is
 | 
|---|
| 72 |    * accessed. Beyond std will issue exception due to out-of-range access.
 | 
|---|
| 73 |    *
 | 
|---|
| 74 |    * @param _step time step to access
 | 
|---|
| 75 |    * @return ListOfBonds[_step].
 | 
|---|
| 76 |    */
 | 
|---|
| 77 |   BondList& getListOfBondsAtStep(unsigned int _step);
 | 
|---|
| 78 | 
 | 
|---|
| 79 | protected:
 | 
|---|
| 80 |   /** Function used by this and inheriting classes to extend the ListOfBonds
 | 
|---|
| 81 |    * vector.
 | 
|---|
| 82 |    */
 | 
|---|
| 83 |   void AppendTrajectoryStep();
 | 
|---|
| 84 | 
 | 
|---|
| 85 |   std::vector<BondList> ListOfBonds; //!< list of all bonds
 | 
|---|
| 86 | 
 | 
|---|
| 87 | };
 | 
|---|
| 88 | 
 | 
|---|
| 89 | 
 | 
|---|
| 90 | #endif /* ATOM_BONDEDPARTICLEINFO_HPP_ */
 | 
|---|