LOOS  v2.3.2
ENM::SpringFunction Class Referenceabstract

Interface for ENM spring functions. More...

#include <spring_functions.hpp>

Inheritance diagram for ENM::SpringFunction:

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 spring-constants. More...
 

Detailed Description

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.

Member Function Documentation

double ENM::SpringFunction::checkConstant ( double  d)
inlineprotected

Check for negative spring-constants.

Issues a one-time warning if a negative spring constant is found

Definition at line 105 of file spring_functions.hpp.


The documentation for this class was generated from the following file: