24void SetupAnalysis::writeSymmetryFunctionShape(
size_t numPoints,
25 string const fileNameFormat)
28 log <<
"*** ANALYSIS: SYMMETRY FUNCTION SHAPE ***"
29 "**************************************\n";
32 log <<
strpr(
"Symmetry function file name format: %s\n",
33 fileNameFormat.c_str());
34 log <<
strpr(
"Number of points : %zu\n", numPoints);
36 log <<
strpr(
"Distance step : %f\n", dr);
37 double da = M_PI / numPoints;
38 log <<
strpr(
"Angle step (radians) : %f\n", da);
47 file.open(
strpr(fileNameFormat.c_str(),
51 for (vector<string>::const_iterator it = info.begin();
52 it != info.end(); ++it)
54 file <<
strpr(
"#SFINFO %s\n", it->c_str());
59 vector<string> colName;
60 vector<string> colInfo;
61 vector<size_t> colSize;
62 title.push_back(
"Symmetry function shape.");
63 colSize.push_back(16);
64 colName.push_back(
"distance");
65 colInfo.push_back(
"Distance from center.");
66 colSize.push_back(16);
67 colName.push_back(
"sf_radial");
68 colInfo.push_back(
"Radial part of symmetry function at given "
70 colSize.push_back(16);
71 colName.push_back(
"angle");
72 colInfo.push_back(
"Angle in degrees.");
73 colSize.push_back(16);
74 colName.push_back(
"sf_angular");
75 colInfo.push_back(
"Angular part of symmetry function at given "
83 for (
size_t k = 0; k < numPoints + 1; ++k)
85 file <<
strpr(
"%16.8E %16.8E %16.8E %16.8E\n",
95 log <<
"*****************************************"
96 "**************************************\n";
Contains element-specific data.
SymFnc const & getSymmetryFunction(std::size_t index) const
Get symmetry function instance.
std::vector< std::string > infoSymmetryFunction(std::size_t index) const
Print symmetry function parameter names and values.
std::size_t numSymmetryFunctions() const
Get number of symmetry functions.
std::size_t getAtomicNumber() const
Get atomicNumber.
std::vector< Element > elements
double getMaxCutoffRadius() const
Getter for Mode::maxCutoffRadius.
Symmetry function base class.
virtual double calculateRadialPart(double distance) const =0
Calculate (partial) symmetry function value for one given distance.
std::size_t getIndex() const
Get private index member variable.
virtual double calculateAngularPart(double angle) const =0
Calculate (partial) symmetry function value for one given angle.
string strpr(const char *format,...)
String version of printf function.
vector< string > createFileHeader(vector< string > const &title, vector< size_t > const &colSize, vector< string > const &colName, vector< string > const &colInfo, char const &commentChar)
void appendLinesToFile(ofstream &file, vector< string > const lines)
Append multiple lines of strings to open file stream.