NAMD
Functions | Variables
eabffunc Namespace Reference

Functions

std::string & trim (std::string &s)
 
void split (const std::string &s, std::vector< std::string > &ret)
 
int chartoint (const std::string &c)
 
double chartodouble (const std::string &c)
 
int doubletoint (const double)
 

Variables

const double BOLTZMANN =0.00198721
 

Function Documentation

double eabffunc::chartodouble ( const std::string &  c)

Definition at line 57 of file eabffunc.C.

Referenced by Tcl_mergefile(), Tcl_startrun(), eABF1D::update(), and eABF2D::update().

58 {
59  std::stringstream temp(c);
60  double token;
61  temp >> token;
62  return token;
63 }
int eabffunc::chartoint ( const std::string &  c)

Definition at line 48 of file eabffunc.C.

Referenced by Tcl_mergefile(), Tcl_setcol(), Tcl_startrun(), eABF1D::update(), and eABF2D::update().

49 {
50  std::stringstream temp(c);
51  int token;
52  temp >> token;
53  return token;
54 }
int eabffunc::doubletoint ( const double  a)

Definition at line 66 of file eabffunc.C.

Referenced by eABF1D::initialize().

67 {
68  if (a > 0)
69  return int(a + 0.000001);
70  else
71  return int(a - 0.000001);
72 }
void eabffunc::split ( const std::string &  s,
std::vector< std::string > &  ret 
)

Definition at line 37 of file eabffunc.C.

Referenced by eABF1D::update(), and eABF2D::update().

38 {
39  std::stringstream temp(s);
40  std::string token;
41  while (temp >> token)
42  {
43  ret.push_back(token);
44  }
45 }
std::string & eabffunc::trim ( std::string &  s)

Definition at line 22 of file eabffunc.C.

23 {
24  if (s.empty())
25  {
26  return s;
27  }
28 
29  s.erase(0, s.find_first_not_of(" "));
30  s.erase(s.find_last_not_of(" ") + 1);
31  return s;
32 }

Variable Documentation

const double eabffunc::BOLTZMANN =0.00198721

Definition at line 23 of file eabffunc.h.

Referenced by eABF1D::calpmf().