52#ifndef TYPES_POLYNOMIALBONDTYPE_HPP
53#define TYPES_POLYNOMIALBONDTYPE_HPP
69 void setCoefficient(
int power, RealType coefficient) {
73 RealType getCoefficient(
int power) {
77 void calcForce(RealType r, RealType& V, RealType& dVdr) {
78 RealType delta = r - r0;
90 DoublePolynomial::const_iterator i;
92 i = pbt.polynomial_.begin();
94 if (i == pbt.polynomial_.end()) {
95 os <<
"This PolynomialBondType contains nothing" << std::endl;
99 os <<
"This PolynomialBondType contains below terms:" << std::endl;
102 os << i->second <<
"*"
103 <<
"(r - " << pbt.getEquilibriumBondLength() <<
")"
106 if (++i == pbt.polynomial_.end()) {
BondType class is responsible for calculating the force and energy of the bond.
"types/PolynomialBondType.hpp"
Real evaluateDerivative(const Real &x)
Returns the first derivative of this polynomial.
Real getCoefficient(ExponentType exponent)
Returns the coefficient associated with the given power for this Polynomial.
Real evaluate(const Real &x)
Calculates the value of this Polynomial evaluated at the given x value.
void setCoefficient(int exponent, const Real &coefficient)
Set the coefficent of the specified exponent, if the coefficient is already there,...
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.