This evaluates the function |k| - k cos(nf + a) where k is a force constant, n the periodicity, a the phase, and f the input value. This is most commonly used for dihedral angle restraints, e.g. in the CHARMM force field.

Public Member Functions | |
| Cosine (Float force_constant, int periodicity, Float phase) | |
| Constructor. | |
| virtual double | evaluate (double feature) const |
| virtual DerivativePair | evaluate_with_derivative (double feature) const |
| virtual std::string | get_type_name () const |
| virtual ::IMP::VersionInfo | get_version_info () const |
Friends | |
| template<class T > | |
| void | IMP::internal::unref (T *) |
Constructor.
| [in] | force_constant | Force constant (score units) |
| [in] | periodicity | Periodicity (generally 1-6) |
| [in] | phase | Phase (radians) |