34 |
|
#ifndef PRIMITIVES_BOND_HPP |
35 |
|
#define PRIMITIVES_BOND_HPP |
36 |
|
|
37 |
+ |
#include "primitives/Atom.hpp" |
38 |
|
#include "types/BondType.hpp" |
39 |
|
|
40 |
|
namespace oopse { |
41 |
|
|
42 |
|
class Bond { |
43 |
|
public: |
44 |
< |
Bond(Atom* atom1, Atom* atom2, BondType* bt); |
44 |
> |
Bond(Atom* atom1, Atom* atom2, BondType* bt) : atom1_(atom1), atom2_(atom2), bondType_(bt) {} |
45 |
|
|
46 |
|
void calcForce() { |
47 |
|
double len; |
63 |
|
return potential_; |
64 |
|
} |
65 |
|
|
66 |
+ |
Atom* getAtomA() { |
67 |
+ |
return atom1_; |
68 |
+ |
} |
69 |
+ |
|
70 |
+ |
Atom* getAtomB() { |
71 |
+ |
return atom2_; |
72 |
+ |
} |
73 |
+ |
|
74 |
+ |
BondType* getBondType() { |
75 |
+ |
return bondType_; |
76 |
+ |
} |
77 |
|
private: |
78 |
|
|
79 |
|
BondType* bondType_; /**< bond type */ |