| 1 | /*
|
|---|
| 2 | * atom_bondedparticle.hpp
|
|---|
| 3 | *
|
|---|
| 4 | * Created on: Oct 19, 2009
|
|---|
| 5 | * Author: heber
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | #ifndef ATOM_BONDEDPARTICLE_HPP_
|
|---|
| 9 | #define ATOM_BONDEDPARTICLE_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 <fstream>
|
|---|
| 22 | #include <list>
|
|---|
| 23 |
|
|---|
| 24 | #include "atom_atominfo.hpp"
|
|---|
| 25 | #include "atom_bondedparticleinfo.hpp"
|
|---|
| 26 | #include "atom_particleinfo.hpp"
|
|---|
| 27 |
|
|---|
| 28 | /****************************************** forward declarations *****************************/
|
|---|
| 29 |
|
|---|
| 30 | class bond;
|
|---|
| 31 |
|
|---|
| 32 | /********************************************** declarations *******************************/
|
|---|
| 33 |
|
|---|
| 34 | class BondedParticle : public BondedParticleInfo, public virtual ParticleInfo, public virtual AtomInfo {
|
|---|
| 35 | public:
|
|---|
| 36 | BondedParticle();
|
|---|
| 37 | virtual ~BondedParticle();
|
|---|
| 38 |
|
|---|
| 39 | bond * const addBond(const unsigned int _step, BondedParticle* Partner);
|
|---|
| 40 | void removeBond(bond *binder);
|
|---|
| 41 | void removeAllBonds();
|
|---|
| 42 | void removeAllBonds(const unsigned int _step);
|
|---|
| 43 | bool IsBondedTo(const unsigned int _step, BondedParticle * const BondPartner) const;
|
|---|
| 44 | void ClearBondsAtStep(const unsigned int _step);
|
|---|
| 45 | int CountBonds() const;
|
|---|
| 46 | int CorrectBondDegree();
|
|---|
| 47 | void resetBondDegree();
|
|---|
| 48 | void OutputBondOfAtom(std::ostream &ost) const;
|
|---|
| 49 | void OutputAdjacency(ofstream * const AdjacencyFile) const;
|
|---|
| 50 | void OutputBonds(ofstream * const BondFile) const;
|
|---|
| 51 | void OutputOrder(ofstream *file) const;
|
|---|
| 52 |
|
|---|
| 53 | std::ostream & operator << (std::ostream &ost) const;
|
|---|
| 54 |
|
|---|
| 55 | protected:
|
|---|
| 56 | bool RegisterBond(const unsigned int _step, bond * const Binder);
|
|---|
| 57 | bool UnregisterBond(bond * const Binder);
|
|---|
| 58 | void UnregisterAllBond(const unsigned int _step);
|
|---|
| 59 |
|
|---|
| 60 | int ContainsBondAtStep(bond *Binder) const;
|
|---|
| 61 |
|
|---|
| 62 | };
|
|---|
| 63 |
|
|---|
| 64 | std::ostream & operator << (std::ostream &ost, const BondedParticle &a);
|
|---|
| 65 |
|
|---|
| 66 | #endif /* ATOM_BONDEDPARTICLE_HPP_ */
|
|---|