Skip to content

Commit

Permalink
Merge branch 'develop' into matrix_output_hdf
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo authored Aug 10, 2021
2 parents ff18b43 + a5b725b commit 3b56bd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
14 changes: 6 additions & 8 deletions src/QMCTools/QMCGaussianParserBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ QMCGaussianParserBase::QMCGaussianParserBase()
gBound(0),
Occ_alpha(0),
Occ_beta(0),
gridPtr(0),
X(0),
Y(0),
Z(0)
Expand Down Expand Up @@ -159,7 +158,6 @@ QMCGaussianParserBase::QMCGaussianParserBase(int argc, char** argv)
gBound(0),
Occ_alpha(0),
Occ_beta(0),
gridPtr(0),
X(0),
Y(0),
Z(0)
Expand Down Expand Up @@ -1342,7 +1340,7 @@ xmlNodePtr QMCGaussianParserBase::createCenter(int iat, int off_)
xmlNewProp(abasis, (const xmlChar*)"type", (const xmlChar*)basisType.c_str());
xmlNewProp(abasis, (const xmlChar*)"elementType", (const xmlChar*)CurrentCenter.c_str());
xmlNewProp(abasis, (const xmlChar*)"normalized", (const xmlChar*)Normalized.c_str());
xmlAddChild(abasis, xmlCopyNode(gridPtr, 1));
xmlAddChild(abasis, xmlCopyNode(gridPtr.get(), 1));
for (int ig = gBound[iat], n = 0; ig < gBound[iat + 1]; ig++, n++)
{
createShell(n, ig, off_, abasis);
Expand Down Expand Up @@ -1605,7 +1603,7 @@ xmlNodePtr QMCGaussianParserBase::createJ1()

void QMCGaussianParserBase::createGridNode(int argc, char** argv)
{
gridPtr = xmlNewNode(NULL, (const xmlChar*)"grid");
gridPtr = std::unique_ptr<xmlNode, void (*)(xmlNodePtr)>(xmlNewNode(NULL, (const xmlChar*)"grid"), xmlFreeNode);
std::string gridType("log");
std::string gridFirst("1.e-6");
std::string gridLast("1.e2");
Expand Down Expand Up @@ -1636,10 +1634,10 @@ void QMCGaussianParserBase::createGridNode(int argc, char** argv)
}
++iargc;
}
xmlNewProp(gridPtr, (const xmlChar*)"type", (const xmlChar*)gridType.c_str());
xmlNewProp(gridPtr, (const xmlChar*)"ri", (const xmlChar*)gridFirst.c_str());
xmlNewProp(gridPtr, (const xmlChar*)"rf", (const xmlChar*)gridLast.c_str());
xmlNewProp(gridPtr, (const xmlChar*)"npts", (const xmlChar*)gridSize.c_str());
xmlNewProp(gridPtr.get(), (const xmlChar*)"type", (const xmlChar*)gridType.c_str());
xmlNewProp(gridPtr.get(), (const xmlChar*)"ri", (const xmlChar*)gridFirst.c_str());
xmlNewProp(gridPtr.get(), (const xmlChar*)"rf", (const xmlChar*)gridLast.c_str());
xmlNewProp(gridPtr.get(), (const xmlChar*)"npts", (const xmlChar*)gridSize.c_str());
}

void QMCGaussianParserBase::dump(const std::string& psi_tag, const std::string& ion_tag)
Expand Down
3 changes: 2 additions & 1 deletion src/QMCTools/QMCGaussianParserBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ struct QMCGaussianParserBase
std::vector<value_type> EigVec;
//std::vector<GaussianCombo<value_type> > gExp, gC0, gC1;
//std::string EigVecU, EigVecD;
xmlNodePtr gridPtr;
std::unique_ptr<xmlNode, void (*)(xmlNodePtr)> gridPtr =
std::unique_ptr<xmlNode, void (*)(xmlNodePtr)>(nullptr, nullptr);
std::vector<std::string> CIalpha, CIbeta;
std::vector<std::string> CSFocc;
std::vector<std::vector<std::string>> CSFalpha, CSFbeta;
Expand Down

0 comments on commit 3b56bd3

Please sign in to comment.