Skip to content

Commit

Permalink
correct MSD xml generated
Browse files Browse the repository at this point in the history
  • Loading branch information
camelto2 committed Oct 1, 2021
1 parent 9b36461 commit 3884a95
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/QMCTools/DiracParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,7 @@ void DiracParser::getCOSCI(std::istream& is)
std::string tmp = core_occstr + currentWords[1] + virt_occstr;
ci_occs.push_back(tmp);
std::reverse(tmp.begin(), tmp.end());

}
}
//finished reading CI coeffs for state
Expand Down Expand Up @@ -878,6 +879,8 @@ void DiracParser::getCOSCI(std::istream& is)
found = true;
ci_nstates = CIalpha[0].size();
ci_size = CIcoeff.size();
ci_nca = 0;
ci_nea = NumberOfEls;
}
state_count++;
}
Expand Down
30 changes: 22 additions & 8 deletions src/QMCTools/QMCGaussianParserBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,13 @@ xmlNodePtr QMCGaussianParserBase::createMultiDeterminantSetCIHDF5()
xmlNewProp(multislaterdet, (const xmlChar*)"optimize", (const xmlChar*)"yes");
else
xmlNewProp(multislaterdet, (const xmlChar*)"optimize", (const xmlChar*)"no");
xmlNewProp(multislaterdet, (const xmlChar*)"spo_up", (const xmlChar*)"spo-up");
xmlNewProp(multislaterdet, (const xmlChar*)"spo_dn", (const xmlChar*)"spo-dn");
if (isSpinor)
xmlNewProp(multislaterdet, (const xmlChar*)"spo_0", (const xmlChar*)"spo-up");
else
{
xmlNewProp(multislaterdet, (const xmlChar*)"spo_up", (const xmlChar*)"spo-up");
xmlNewProp(multislaterdet, (const xmlChar*)"spo_dn", (const xmlChar*)"spo-dn");
}
xmlNodePtr detlist = xmlNewNode(NULL, (const xmlChar*)"detlist");
std::ostringstream nstates, cisize, cinca, cincb, cinea, cineb, ci_thr;
cisize << ci_size;
Expand All @@ -1012,10 +1017,18 @@ xmlNodePtr QMCGaussianParserBase::createMultiDeterminantSetCIHDF5()
ci_thr << ci_threshold;
xmlNewProp(detlist, (const xmlChar*)"size", (const xmlChar*)cisize.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"type", (const xmlChar*)"DETS");
xmlNewProp(detlist, (const xmlChar*)"nca", (const xmlChar*)cinca.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"ncb", (const xmlChar*)cincb.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"nea", (const xmlChar*)cinea.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"neb", (const xmlChar*)cineb.str().c_str());
if (isSpinor)
{
xmlNewProp(detlist, (const xmlChar*)"nc0", (const xmlChar*)cinca.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"ne0", (const xmlChar*)cinea.str().c_str());
}
else
{
xmlNewProp(detlist, (const xmlChar*)"nca", (const xmlChar*)cinca.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"ncb", (const xmlChar*)cincb.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"nea", (const xmlChar*)cinea.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"neb", (const xmlChar*)cineb.str().c_str());
}
xmlNewProp(detlist, (const xmlChar*)"nstates", (const xmlChar*)nstates.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"cutoff", (const xmlChar*)ci_thr.str().c_str());
xmlNewProp(detlist, (const xmlChar*)"href", (const xmlChar*)h5file.c_str());
Expand Down Expand Up @@ -1758,8 +1771,8 @@ void QMCGaussianParserBase::dump(const std::string& psi_tag, const std::string&
if (multideterminant)
{
xmlNodePtr spoupPtr = xmlNewNode(NULL, (const xmlChar*)"sposet");
xmlNodePtr spodnPtr = xmlNewNode(NULL, (const xmlChar*)"sposet");
xmlNewProp(spoupPtr, (const xmlChar*)"basisset", (const xmlChar*)"LCAOBSet");
xmlNodePtr spodnPtr = xmlNewNode(NULL, (const xmlChar*)"sposet");
xmlNewProp(spodnPtr, (const xmlChar*)"basisset", (const xmlChar*)"LCAOBSet");
if (multidetH5)
{
Expand All @@ -1776,7 +1789,8 @@ void QMCGaussianParserBase::dump(const std::string& psi_tag, const std::string&
{
createSPOSetsH5(spoupPtr, spodnPtr);
xmlAddChild(detPtr, spoupPtr);
xmlAddChild(detPtr, spodnPtr);
if (!isSpinor)
xmlAddChild(detPtr, spodnPtr);
xmlNodePtr multislaterdetPtr = NULL;
if (usingCSF)
{
Expand Down

0 comments on commit 3884a95

Please sign in to comment.