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 | const bond * addBond(const unsigned int _step, BondedParticle* Partner);
|
---|
40 | void removeBond(bond *binder);
|
---|
41 | void removeAllBonds();
|
---|
42 | bool IsBondedTo(const unsigned int _step, BondedParticle * const BondPartner) const;
|
---|
43 | void ClearBondsAtStep(const unsigned int _step);
|
---|
44 | int CountBonds() const;
|
---|
45 | int CorrectBondDegree();
|
---|
46 | void resetBondDegree();
|
---|
47 | void OutputBondOfAtom(std::ostream &ost) const;
|
---|
48 | void OutputAdjacency(ofstream * const AdjacencyFile) const;
|
---|
49 | void OutputBonds(ofstream * const BondFile) const;
|
---|
50 | void OutputOrder(ofstream *file) const;
|
---|
51 |
|
---|
52 | std::ostream & operator << (std::ostream &ost) const;
|
---|
53 |
|
---|
54 | protected:
|
---|
55 | bool RegisterBond(const unsigned int _step, bond *Binder);
|
---|
56 | bool UnregisterBond(bond *Binder);
|
---|
57 | void UnregisterAllBond(const unsigned int _step);
|
---|
58 |
|
---|
59 | int ContainsBondAtStep(bond *Binder) const;
|
---|
60 |
|
---|
61 | };
|
---|
62 |
|
---|
63 | std::ostream & operator << (std::ostream &ost, const BondedParticle &a);
|
---|
64 |
|
---|
65 | #endif /* ATOM_BONDEDPARTICLE_HPP_ */
|
---|