Skip to content

Commit

Permalink
Remove use of myVars in SlaterDet. Existing code doesn't do anything.
Browse files Browse the repository at this point in the history
  • Loading branch information
ye-luo committed Nov 25, 2024
1 parent 802b0e9 commit b534b21
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
5 changes: 0 additions & 5 deletions src/QMCWaveFunctions/Fermion/SlaterDet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,9 @@ void SlaterDet::extractOptimizableObjectRefs(UniqueOptObjRefs& opt_obj_refs)

void SlaterDet::checkOutVariables(const opt_variables_type& active)
{
myVars.clear();
if (isOptimizable())
for (int i = 0; i < Dets.size(); i++)
{
Dets[i]->checkOutVariables(active);
myVars.insertFrom(Dets[i]->myVars);
}
myVars.getIndex(active);
}

PsiValue SlaterDet::ratioGrad(ParticleSet& P, int iat, GradType& grad_iat)
Expand Down
18 changes: 0 additions & 18 deletions src/QMCWaveFunctions/Fermion/SlaterDet.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,31 +265,13 @@ class SlaterDet : public WaveFunctionComponent
Vector<ValueType>& dlogpsi,
Vector<ValueType>& dhpsioverpsi) override
{
// First zero out values, since each determinant only adds on
// its contribution (i.e. +=) , rather than setting the value
// (i.e. =)
for (int k = 0; k < myVars.size(); ++k)
{
int kk = myVars.where(k);
if (kk >= 0)
dlogpsi[kk] = dhpsioverpsi[kk] = 0.0;
}
// Now add on contribution from each determinant to the derivatives
for (int i = 0; i < Dets.size(); i++)
Dets[i]->evaluateDerivatives(P, active, dlogpsi, dhpsioverpsi);
}

void evaluateDerivativesWF(ParticleSet& P, const opt_variables_type& active, Vector<ValueType>& dlogpsi) override
{
// First zero out values, since each determinant only adds on
// its contribution (i.e. +=) , rather than setting the value
// (i.e. =)
for (int k = 0; k < myVars.size(); ++k)
{
int kk = myVars.where(k);
if (kk >= 0)
dlogpsi[kk] = 0.0;
}
// Now add on contribution from each determinant to the derivatives
for (int i = 0; i < Dets.size(); i++)
Dets[i]->evaluateDerivativesWF(P, active, dlogpsi);
Expand Down

0 comments on commit b534b21

Please sign in to comment.