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

Add evaluateDerivativesWF for J3 #4694

Merged
merged 5 commits into from
Aug 10, 2023
Merged

Conversation

markdewing
Copy link
Contributor

Add the function evaluateDerivativesWF for the three-body Jastrow. It's a copy of evaluateDerivatives with the code to compute dhpsioverpsi removed.

This function is needed for orbital rotation with psuedopotentials and J3.

What type(s) of changes does this code introduce?

Delete the items that do not apply

  • Bugfix
  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

desktop

Checklist

Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.

  • No. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted
  • Yes. This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • No. Documentation has been added (if appropriate)

Implement evaluateDerivativesWF, which is evaluateDerivatives with
code for dhpsioverpsi removed.
@ye-luo
Copy link
Contributor

ye-luo commented Aug 9, 2023

I'm OK with taking this patch. Just to clarify this is for non-batched NLPP code path right?

@@ -159,6 +160,7 @@ void test_J3_polynomial3D(const DynamicCoordinateKind kind_selected)
const int NumOptimizables(optvars.size());
j3->checkOutVariables(optvars);
dlogpsi.resize(NumOptimizables);
dlogpsiWF.resize(NumOptimizables);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move line 154 and this line before 175.

@markdewing
Copy link
Contributor Author

Yes, this is for the non-batched NLPP code path.

@ye-luo
Copy link
Contributor

ye-luo commented Aug 9, 2023

Test this please

dlogpsiWF.resize(NumOptimizables);
j3->evaluateDerivativesWF(elec_, optvars, dlogpsiWF);
for (int i = 0; i < NumOptimizables; i++)
CHECK(dlogpsi[i] == Approx(dlogpsiWF[i]));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need ComplexApprox to build.

@ye-luo
Copy link
Contributor

ye-luo commented Aug 9, 2023

Test this please

Copy link
Contributor

@ye-luo ye-luo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need non-ANL approval

@prckent
Copy link
Contributor

prckent commented Aug 10, 2023

General comment: That this can be implemented with a near cut and paste of another function suggests we should rethink the functions in WavefunctionComponent & how we are coding them.

@prckent prckent merged commit f09606a into QMCPACK:develop Aug 10, 2023
@markdewing markdewing deleted the j3_pp_orb_rot branch August 10, 2023 05:12
@prckent prckent mentioned this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants