# | Line 8 | Line 8 | namespace oopse { | |
---|---|---|
8 | * @class HarmonicBondType | |
9 | * | |
10 | * HarmonicBondType is the basic OOPSE bond type. | |
11 | + | * Formula is V = 0.5* k(r -r0)^2 |
12 | */ | |
13 | class HarmonicBondType : public BondType { | |
14 | ||
# | Line 21 | Line 22 | namespace oopse { | |
22 | ||
23 | double getForceConstant() {return k;} | |
24 | ||
25 | < | void calcForce(double r, double& V, double& dVdr) { |
25 | > | virtual void calcForce(double r, double& V, double& dVdr) { |
26 | double dr; | |
27 | ||
28 | dr = r - r0; | |
# | Line 32 | Line 33 | namespace oopse { | |
33 | ||
34 | private: | |
35 | ||
35 | – | double r0; |
36 | double k; | |
37 | ||
38 | }; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |