1 #ifndef SIMP_HARMONIC_L0_BOND_H 2 #define SIMP_HARMONIC_L0_BOND_H 13 #include <util/param/ParamComposite.h> 14 #include <util/random/Random.h> 92 double energy(
double rSq,
int type)
const;
103 double forceOverR(
double rSq,
int type)
const;
127 void set(std::string name,
int type,
double value);
135 double get(std::string name,
int type)
const;
140 double kappa(
int type)
const;
145 static const int MaxNBondType = 2;
147 double kappa_[MaxNBondType];
160 assert(type < nBondType_);
168 {
return 0.5*kappa_[type]*rSq; }
175 {
return -kappa_[type]; }
void setNBondType(int nBondType)
Set the number of bond types.
double forceOverR(double rSq, int type) const
Returns force/distance for one bond, for use in MD.
File containing preprocessor macros for error handling.
Classes used by all simpatico molecular simulations.
HarmonicL0Bond & operator=(const HarmonicL0Bond &other)
Assignment.
Saving / output archive for binary ostream.
virtual void loadParameters(Serializable::IArchive &ar)
Load internal state from an archive.
A harmonic bond potential with zero rest length.
double energy(double rSq, int type) const
Returns potential energy for one bond.
Utility classes for scientific computation.
double kappa(int type) const
Returns bond spring constant.
HarmonicL0Bond()
Constructor.
double randomBondLength(Random *random, double beta, int type) const
Return bond length chosen from equilibrium distribution.
Saving archive for binary istream.
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
void readParameters(std::istream &in)
Read bond interaction parameters from input stream.
An object that can read multiple parameters from file.