34 |
|
#define TYPES_BONDTYPE_HPP |
35 |
|
|
36 |
|
namespace oopse { |
37 |
< |
|
37 |
> |
|
38 |
|
/** |
39 |
|
* @class BondType BondType.hpp "types/BondType.hpp" |
40 |
< |
* @todo using shared_ptr instead of pointer |
40 |
> |
* BondType class is responsible for calculating the force and energy of the bond |
41 |
|
*/ |
42 |
|
class BondType { |
43 |
|
public: |
44 |
< |
BondType(AtomType* at1, AtomType* at2); |
44 |
> |
BondType(dobule myR0) : r0(myR0) {} |
45 |
|
virtual ~BondType() {} |
46 |
|
|
47 |
< |
virtual void calcForce(double len, double& force, double& potential) = 0; |
47 |
> |
virtual void calcForce(double r, double& V, double& dVdr) = 0; |
48 |
> |
double getEquilibriumBondLength() {return r0;} |
49 |
> |
void setEquilibriumBondLength(double myR0) { r0 = r; } |
50 |
|
|
51 |
< |
protected: |
52 |
< |
AtomType* at1_; |
51 |
< |
AtomType* at2_; |
52 |
< |
|
51 |
> |
protected: |
52 |
> |
double r0; /**equilibrium bond length< */ |
53 |
|
}; |
54 |
|
|
55 |
|
|