Commit f0e875dc authored by Joshua Scott Brown's avatar Joshua Scott Brown

Fixed namespace in potentialfunctiosn.h and cc files

parent 0c83ab9b
......@@ -18,30 +18,21 @@
#ifndef POTENTIALFUNCTION_H
#define POTENTIALFUNCTION_H
#include <votca/tools/table.h>
#include <boost/lexical_cast.hpp>
#include <cstdlib>
#include <math.h>
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <sstream>
using namespace std;
using namespace votca::tools;
#include <Eigen/Dense>
#include <string>
class PotentialFunction {
public:
virtual ~PotentialFunction() {}
// read parameters from the input file
virtual void setParam(string filename);
virtual void setParam(std::string filename);
// save parameters to the file
virtual void SaveParam(const string& filename);
virtual void SaveParam(const std::string& filename);
// write potential table
virtual void SavePotTab(const string& filename, const double step);
virtual void SavePotTab(const std::string& filename, const double step);
// write potential table for specified interval
virtual void SavePotTab(const string& filename, const double step,
virtual void SavePotTab(const std::string& filename, const double step,
const double rmin, const double rcut);
// set all parameters
void setParam(const Eigen::VectorXd& param){ _lam = param; }
......@@ -79,9 +70,9 @@ public:
protected:
PotentialFunction(const string& name_,const int nlam_,const double min_,const double max_);
PotentialFunction(const std::string& name_,const int nlam_,const double min_,const double max_);
string _name;
std::string _name;
Eigen::VectorXd _lam;
double _cut_off;
double _min;
......
......@@ -22,12 +22,9 @@
#include <math.h>
#include "potentialfunction.h"
using namespace std;
using namespace votca::tools;
class PotentialFunctionCBSPL : public PotentialFunction {
public:
PotentialFunctionCBSPL(const string& name_,const int nlam_,
PotentialFunctionCBSPL(const std::string& name_,const int nlam_,
const double min_=0.0, const double max_=10.0);
~PotentialFunctionCBSPL(){}
// calculate function value for given r
......@@ -39,13 +36,13 @@ class PotentialFunctionCBSPL : public PotentialFunction {
int getOptParamSize() const ;
void setParam(string filename);
void setParam(std::string filename);
void SaveParam(const string& filename);
void SaveParam(const std::string& filename);
void SavePotTab(const string& filename, const double step);
void SavePotTab(const std::string& filename, const double step);
void SavePotTab(const string& filename, const double step, const double rmin, const double rcut);
void SavePotTab(const std::string& filename, const double step, const double rmin, const double rcut);
void setOptParam(const int i, const double val);
double getOptParam(const int i) const;
......
......@@ -22,14 +22,11 @@
#include <math.h>
#include "potentialfunction.h"
using namespace std;
using namespace votca::tools;
// LJ 12-6 potential class
// with c12,c6 parameters
class PotentialFunctionLJ126 : public PotentialFunction {
public:
PotentialFunctionLJ126(const string& name_,const double min_=0.0,
PotentialFunctionLJ126(const std::string& name_,const double min_=0.0,
const double max_=10.0);
~PotentialFunctionLJ126(){};
// calculate function value for given r
......
......@@ -23,7 +23,7 @@
// with c12,c6 parameters
class PotentialFunctionLJG : public PotentialFunction {
public:
PotentialFunctionLJG(const string& name_,const double min_ = 0.0,
PotentialFunctionLJG(const std::string& name_,const double min_ = 0.0,
const double max_ = 10.0);
~PotentialFunctionLJG() {};
// calculate function value for given r
......
......@@ -16,6 +16,12 @@
*/
#include <votca/csg/potentialfunctions/potentialfunction.h>
#include <votca/tools/table.h>
#include <boost/lexical_cast.hpp>
using namespace std;
using namespace votca::tools;
PotentialFunction::PotentialFunction(const string& name_,const int nlam_,
const double min_,const double max_){
......
......@@ -17,6 +17,12 @@
#include <votca/csg/potentialfunctions/potentialfunctioncbspl.h>
#include <Eigen/src/Core/PlainObjectBase.h>
#include <votca/tools/table.h>
#include <boost/lexical_cast.hpp>
#include <iostream>
using namespace std;
using namespace votca::tools;
PotentialFunctionCBSPL::PotentialFunctionCBSPL(const string& name_,const int nlam_,
const double min_, const double max_) :
......
......@@ -17,6 +17,8 @@
#include <votca/csg/potentialfunctions/potentialfunctionlj126.h>
using namespace std;
PotentialFunctionLJ126::PotentialFunctionLJ126(const string& name_,const double min_,
const double max_) : PotentialFunction(name_,2,min_,max_){
}
......
......@@ -17,6 +17,8 @@
#include <votca/csg/potentialfunctions/potentialfunctionljg.h>
using namespace std;
PotentialFunctionLJG::PotentialFunctionLJG(const string& name_,const double min_,
const double max_) : PotentialFunction(name_,5,min_,max_){
}
......
......@@ -57,7 +57,7 @@ class CsgREupdate
{
public:
std::string ProgramName() { return "csg_reupdate"; }
void HelpText(ostream &out) {
void HelpText(std::ostream &out) {
out << "computes relative entropy update.";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment