Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean jastrow output #1525

Merged
merged 4 commits into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/QMCWaveFunctions/Jastrow/BsplineFunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,10 @@ struct BsplineFunctor : public OptimizableFunctorBase
rAttrib.put(cur);
if (radius < 0.0)
if (periodic)
app_log() << " Jastrow cutoff unspecified. Setting to Wigner-Seitz radius = " << cutoff_radius << ".\n";
{
app_log() << " Jastrow cutoff unspecified. Setting to Wigner-Seitz radius = " << cutoff_radius << std::endl;
app_log() << std::endl;
}
else
{
APP_ABORT(" Jastrow cutoff unspecified. Cutoff must be given when using open boundary conditions");
Expand All @@ -419,9 +422,9 @@ struct BsplineFunctor : public OptimizableFunctorBase
{
PRE.error("You must specify a positive number of parameters for the Bspline jastrow function.", true);
}
app_log() << " size = " << NumParams << " parameters " << std::endl;
app_log() << " cusp = " << CuspValue << std::endl;
app_log() << " rcut = " << cutoff_radius << std::endl;
app_summary() << " Number of parameters: " << NumParams << std::endl;
app_summary() << " Cusp: " << CuspValue << std::endl;
app_summary() << " Cutoff radius: " << cutoff_radius << std::endl;
resize(NumParams);
// Now read coefficents
xmlNodePtr xmlCoefs = cur->xmlChildrenNode;
Expand All @@ -448,7 +451,7 @@ struct BsplineFunctor : public OptimizableFunctorBase
Parameters = params;
else
{
app_log() << "Changing number of Bspline parameters from " << params.size() << " to " << NumParams
app_log() << " Changing number of Bspline parameters from " << params.size() << " to " << NumParams
<< ". Performing fit:\n";
// Fit function to new number of parameters
const int numPoints = 500;
Expand Down Expand Up @@ -488,8 +491,9 @@ struct BsplineFunctor : public OptimizableFunctorBase
sstr << id << "_" << i;
myVars.insert(sstr.str(), Parameters[i], !notOpt, optimize::LOGLINEAR_P);
}
app_log() << "Parameter Name Value\n";
myVars.print(app_log());
int left_pad_space = 5;
app_log() << std::endl;
myVars.print(app_log(), left_pad_space, true);
}
xmlCoefs = xmlCoefs->next;
}
Expand Down Expand Up @@ -550,7 +554,6 @@ struct BsplineFunctor : public OptimizableFunctorBase
sstr << id << "_" << i;
myVars.insert(sstr.str(), Parameters[i], true, optimize::LOGLINEAR_P);
}
app_log() << "Parameter Name Value\n";
myVars.print(app_log());
}
else
Expand Down
6 changes: 6 additions & 0 deletions src/QMCWaveFunctions/Jastrow/JastrowBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ bool JastrowBuilder::put(xmlNodePtr cur)
app_warning() << " JastrowBuilder::put does not have name " << std::endl;
return false;
}
app_summary() << std::endl;
app_summary() << " Jastrow" << std::endl;
app_summary() << " -------" << std::endl;
app_summary() << " Name: " << nameOpt << " Type: " << typeOpt << " Function: " << funcOpt << std::endl;
app_summary() << std::endl;

if (typeOpt.find("One") < typeOpt.size())
return addOneBody(cur);
if (typeOpt.find("Two") < typeOpt.size())
Expand Down
12 changes: 7 additions & 5 deletions src/QMCWaveFunctions/Jastrow/PolynomialFunctor3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -925,9 +925,10 @@ struct PolynomialFunctor3D : public OptimizableFunctorBase
PRE.error("You must specify a positive number for \"isize\"", true);
if (N_ee == 0)
PRE.error("You must specify a positive number for \"esize\"", true);
// app_log() << " esize = " << NumParams_ee << " parameters " << std::endl;
// app_log() << " isize = " << NumParams_eI << " parameters " << std::endl;
// app_log() << " rcut = " << cutoff_radius << std::endl;
app_summary() << " Ion: " << iSpecies << " electron-electron: " << eSpecies1 << " - " << eSpecies2 << std::endl;
app_summary() << " Number of parameters for e-e: " << N_ee << ", for e-I: " << N_eI << std::endl;
app_summary() << " Cutoff radius: " << cutoff_radius << std::endl;
app_summary() << std::endl;
resize(N_eI, N_ee);
// Now read coefficents
xmlNodePtr xmlCoefs = cur->xmlChildrenNode;
Expand Down Expand Up @@ -979,8 +980,9 @@ struct PolynomialFunctor3D : public OptimizableFunctorBase
// }
if (!notOpt)
{
app_log() << "Parameter Name Value\n";
myVars.print(app_log());
int left_pad_spaces = 6;
myVars.print(app_log(), left_pad_spaces, true);
app_log() << std::endl;
}
}
xmlCoefs = xmlCoefs->next;
Expand Down
7 changes: 6 additions & 1 deletion src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ bool RadialJastrowBuilder::createJ2(xmlNodePtr cur)
RealType qq = species(chargeInd, ia) * species(chargeInd, ib);
cusp = (ia == ib) ? -0.25 * qq : -0.5 * qq;
}
app_log() << " RadialJastrowBuilder adds a functor with cusp = " << cusp << std::endl;
app_summary() << " Radial function for species: " << spA << " - " << spB << std::endl;
app_debug() << " RadialJastrowBuilder adds a functor with cusp = " << cusp << std::endl;

auto* functor = new RadFuncType();
functor->setCusp(cusp);
Expand All @@ -263,6 +264,8 @@ bool RadialJastrowBuilder::createJ2(xmlNodePtr cur)
initTwoBodyFunctor(*functor, -cusp / 0.5);
}

app_summary() << std::endl;

J2->addFunc(ia, ib, functor);
dJ2->addFunc(ia, ib, functor);

Expand Down Expand Up @@ -348,7 +351,9 @@ bool RadialJastrowBuilder::createJ1(xmlNodePtr cur)
targetPtcl.getName(),
true);
}
app_summary() << " Radial function for element: " << speciesA << std::endl;
functor->put(kids);
app_summary() << std::endl;
J1->addFunc(ig, functor, jg);
dJ1->addFunc(ig, functor, jg);
success = true;
Expand Down