LOOS
v2.3.2

Interface for ENM spring functions. More...
#include <spring_functions.hpp>
Public Types  
typedef std::vector< double >  Params 
Public Member Functions  
virtual std::string  name () const =0 
Name for this particular spring function.  
virtual Params  setParams (const Params &konst)=0 
Sets the internal constants, returning the unused ones.  
virtual bool  validParams () const =0 
Determines if the internal constants are "valid".  
virtual uint  paramSize () const =0 
How many internal constants there are.  
virtual loos::DoubleMatrix  constant (const loos::GCoord &u, const loos::GCoord &v, const loos::GCoord &d)=0 
Actually compute the spring constant as a 3x3 matrix.  
Protected Member Functions  
double  checkConstant (double d) 
Check for negative springconstants. More...  
Interface for ENM spring functions.
These classes define the various possible spring functions used in creating the Hessian. All derived from the SpringFunction base class. This class returns a 3x3 DoubleMatrix containing the spring constants...
The SpringFunction::constant() function takes the coords of the two nodes plus their difference vector (since it'll almost always be computed prior to calling SpringFunction, no sense in recomputing it).
=Misc notes=
setParams() takes a vector of doubles that represents the internal "constants" for the spring functions. It treats the vector as a LIFO stack and picks off the ones it neds, returning the rest.
Definition at line 75 of file spring_functions.hpp.

inlineprotected 
Check for negative springconstants.
Issues a onetime warning if a negative spring constant is found
Definition at line 105 of file spring_functions.hpp.