21#include <boost/lexical_cast.hpp>
33 lam_ = Eigen::VectorXd::Zero(nlam);
45 throw std::runtime_error(
"In potential " +
name_ +
46 ": parameters size mismatch!\n"
47 "Check input parameter file \"" +
48 filename +
"\" \nThere should be " +
49 boost::lexical_cast<string>(
lam_.size()) +
65 param.
set(i,
double(i),
lam_(i),
'i');
79 for (r_init =
min_, i = 0; i < ngrid - 1; r_init += step) {
84 pot_tab.
Save(filename);
88 double rmin,
double rcut) {
89 Index ngrid = (
Index)((rcut - rmin) / step + 1.00000001);
97 for (r_init = rmin, i = 0; i < ngrid - 1; r_init += step) {
102 pot_tab.
Save(filename);
virtual void SaveParam(const std::string &filename)
virtual void SavePotTab(const std::string &filename, double step)
PotentialFunction(const std::string &name, Index nlam, double min, double max)
virtual double CalculateF(double r) const =0
virtual void setParam(std::string filename)
base class for all analysis tools