14 #ifndef QMCPLUSPLUS_SYMMETRYOPERATIONS_H 15 #define QMCPLUSPLUS_SYMMETRYOPERATIONS_H 37 app_log() <<
" Character table size or class number is wrong." << std::endl;
56 for (
int i = 0; i < 3; i++)
57 for (
int j = 0; j < 3; j++)
58 rv[0][i] +=
SymOps[symNumber][i][j] * oldPos[el][j];
65 for (
int k = 0; k < oldPos.
size(); k++)
66 for (
int i = 0; i < 3; i++)
67 for (
int j = 0; j < 3; j++)
68 rv[k][i] +=
SymOps[symNumber][i][j] * oldPos[k][j];
96 void put(xmlNodePtr q)
99 xmlNodePtr kids = q->children;
102 std::string cname((
const char*)(kids->name));
103 if (cname ==
"symmetryclass")
131 for (
int i = 0; i < 3; i++)
132 matrix_i[i][i] = 1.0;
133 I.addOperator(matrix_i, ctable, cls);
139 matrix_c2x[0][0] = -1;
140 matrix_c2x[1][1] = 1;
141 matrix_c2x[2][2] = -1;
147 matrix_c2y[0][2] = 1;
148 matrix_c2y[1][1] = 1;
149 matrix_c2y[2][0] = 1;
155 matrix_c2z[0][2] = -1;
156 matrix_c2z[1][1] = 1;
157 matrix_c2z[2][0] = -1;
164 matrix_c2x[0][0] = 1;
165 matrix_c2x[1][1] = -1;
166 matrix_c2x[2][2] = -1;
172 matrix_c2y[0][0] = -1;
173 matrix_c2y[1][1] = 1;
174 matrix_c2y[2][2] = -1;
180 matrix_c2z[0][0] = -1;
181 matrix_c2z[1][1] = -1;
182 matrix_c2z[2][2] = 1;
243 std::vector<std::vector<double>> CT(4, std::vector<double>(4, 0));
270 std::vector<std::vector<double>> CT(4, std::vector<double>(4, 0));
298 xmlNodePtr kids = q->children;
299 xmlNodePtr symclssptr(NULL);
302 std::string cname((
const char*)(kids->name));
303 if (cname ==
"symmetryclass")
307 aAttrib.
add(nClasses,
"classes");
308 aAttrib.
add(nSymmetries,
"operators");
309 aAttrib.
add(nSymmetries,
"symmetries");
314 std::vector<std::vector<double>> CT;
315 std::vector<std::vector<double>> OPS;
316 std::vector<int> clCT;
317 kids = symclssptr->children;
320 std::string cname((
const char*)(kids->name));
321 if (cname ==
"charactertable")
323 xmlNodePtr kids2 = kids->children;
324 while (kids2 != NULL)
326 std::string cname2((
const char*)(kids2->name));
327 if (cname2 ==
"class")
331 oAttrib.
add(clss,
"name");
333 std::vector<double> c;
342 kids = symclssptr->children;
345 std::string cname((
const char*)(kids->name));
346 if (cname ==
"symmetries")
348 xmlNodePtr kids2 = kids->children;
349 while (kids2 != NULL)
351 std::string cname2((
const char*)(kids2->name));
352 if (cname2 ==
"operator")
356 oAttrib.
add(clss,
"class");
360 app_log() <<
" Must label class of operators" << std::endl;
363 clCT.push_back(clss);
364 std::vector<double> c;
374 for (
int i = 0; i < OPS.size(); i++)
377 for (
int j = 0; j < 3; j++)
378 for (
int k = 0; k < 3; k++)
379 op(j, k) = OPS[i][j * 3 + k];
void buildD2Hz(SymmetryGroup &C2, std::vector< double > ctable, int cls)
void buildByHand(xmlNodePtr q)
std::vector< int > Classes
void buildC2Vx(SymmetryGroup &C2, std::vector< double > ctable, int cls)
void buildD2Hx(SymmetryGroup &C2, std::vector< double > ctable, int cls)
std::vector< std::vector< double > > CharacterTableByClass
helper functions for EinsplineSetBuilder
SymmetryGroup * getSymmetryGroup()
double getclassCharacter(int clss, int irrep)
bool put(xmlNodePtr cur)
assign attributes to the set
Attaches a unit to a Vector for IO.
bool put(std::istream &is) override
read from std::istream
std::vector< Matrix< double > > SymOps
void buildC2Vz(SymmetryGroup &C2, std::vector< double > ctable, int cls)
size_type size() const
return the current size
class to handle a set of parameters
SymmetryBuilder()
Constructor.
class to handle a set of attributes of an xmlNode
Builds the symmetry class.
#define APP_ABORT(msg)
Widely used but deprecated fatal error macros from legacy code.
void TransformSinglePosition(ParticleSet::ParticlePos &oldPos, int symNumber, int el=0)
void buildI(SymmetryGroup &I, std::vector< double > ctable, int cls)
bool putContent(T &a, xmlNodePtr cur)
replaces a's value with the first "element" in the "string" returned by XMLNodeString{cur}.
void add(PDT &aparam, const std::string &aname_in, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new parameter corresponding to an xmlNode <parameter>
std::vector< std::vector< double > > Characters
void TransformAllPositions(ParticleSet::ParticlePos &oldPos, int symNumber)
void buildD2Hy(SymmetryGroup &C2, std::vector< double > ctable, int cls)
void putClassCharacterTable(std::vector< std::vector< double >> cct)
void add(PDT &aparam, const std::string &aname, std::vector< PDT > candidate_values={}, TagStatus status=TagStatus::OPTIONAL)
add a new attribute
void buildC2Vy(SymmetryGroup &C2, std::vector< double > ctable, int cls)
SymmetryGroup(std::string nm="invalid")
void addOperator(Matrix< double > op, std::vector< double > characterlist, int cls)
int getClass(int symmetryOperation)
double getsymmetryCharacter(int symmetryOperation, int irrep)