Skip to content

Commit

Permalink
Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Sep 28, 2023
1 parent 5c1bc51 commit 7751980
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
11 changes: 7 additions & 4 deletions src/QMCWaveFunctions/PlaneWave/PWOrbitalSetBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@
namespace qmcplusplus
{
PWOrbitalSetBuilder::PWOrbitalSetBuilder(const ParticleSet& p, Communicate* comm, xmlNodePtr cur)
: SPOSetBuilder("Planewave", comm), targetPtcl(p), rootNode(cur), myParam{std::make_unique<PWParameterSet>(comm)}, hfile{comm} {
: SPOSetBuilder("Planewave", comm),
targetPtcl(p),
rootNode(cur),
myParam{std::make_unique<PWParameterSet>(comm)},
hfile{comm}
{
//
//Get wavefunction data and parameters from XML and HDF5
//
Expand Down Expand Up @@ -60,7 +65,6 @@ PWOrbitalSetBuilder::~PWOrbitalSetBuilder() = default;

std::unique_ptr<SPOSet> PWOrbitalSetBuilder::createSPOSetFromXML(xmlNodePtr cur)
{

int spin_group = 0;
std::string spo_object_name;
OhmmsAttributeSet aAttrib;
Expand Down Expand Up @@ -250,7 +254,7 @@ void PWOrbitalSetBuilder::transform2GridData(PWBasis::GIndex_t& nG, int spinInde
{
std::ostringstream splineTag;
splineTag << "eigenstates_" << nG[0] << "_" << nG[1] << "_" << nG[2];
herr_t status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
herr_t status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
std::string splineTagStr = splineTag.str();
app_log() << " splineTag " << splineTagStr << std::endl;
if (!hfile.is_group(splineTagStr))
Expand Down Expand Up @@ -284,7 +288,6 @@ void PWOrbitalSetBuilder::transform2GridData(PWBasis::GIndex_t& nG, int spinInde
{
bname = myParam->getSpinName(spinIndex);
hfile.push(bname, true);
}
}
for (int ig = 0; ig < nG[0]; ig++)
{
Expand Down
1 change: 1 addition & 0 deletions src/QMCWaveFunctions/PlaneWave/PWOrbitalSetBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class PWOrbitalSetBuilder : public SPOSetBuilder
std::unique_ptr<PWBasis> myBasisSet;
///hdf5 handler to clean up
hdf_archive hfile;

public:
///constructor
PWOrbitalSetBuilder(const ParticleSet& p, Communicate* comm, xmlNodePtr cur);
Expand Down
8 changes: 4 additions & 4 deletions src/QMCWaveFunctions/tests/test_pw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ TEST_CASE("PlaneWave SPO from HDF for BCC H", "[wavefunction]")
REQUIRE(okay);

xmlNodePtr root = doc.getRoot();
xmlNodePtr pw1 = xmlFirstElementChild(root);
xmlNodePtr pw1 = xmlFirstElementChild(root);


PWOrbitalSetBuilder pw_builder(elec, c, root);
auto spo = pw_builder.createSPOSet(pw1);
auto spo = pw_builder.createSPOSet(pw1);
REQUIRE(spo);

const int orbSize = spo->getOrbitalSetSize();
Expand Down Expand Up @@ -187,11 +187,11 @@ TEST_CASE("PlaneWave SPO from HDF for LiH arb", "[wavefunction]")
REQUIRE(okay);

xmlNodePtr root = doc.getRoot();
xmlNodePtr pw1 = xmlFirstElementChild(root);
xmlNodePtr pw1 = xmlFirstElementChild(root);


PWOrbitalSetBuilder pw_builder(elec, c, root);
auto spo = pw_builder.createSPOSet(pw1);
auto spo = pw_builder.createSPOSet(pw1);
REQUIRE(spo);

const int orbSize = spo->getOrbitalSetSize();
Expand Down

0 comments on commit 7751980

Please sign in to comment.