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

Generalize case where only 1 particle of each type is present #3152

Merged
merged 6 commits into from
May 12, 2021

Conversation

shivupa
Copy link
Contributor

@shivupa shivupa commented May 4, 2021

Proposed changes

Closes #3137
This implements the fixes @markdewing recommended. It generalizes the special case of the two body jastrow where there are only 1 particle of each type present.

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

  • Bugfix

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

Ryzen workstation (5900x, gcc version 10.2.0)

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.

  • Yes. 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
  • No. 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)

@qmc-robot
Copy link

Can one of the admins verify this patch?

@prckent
Copy link
Contributor

prckent commented May 4, 2021

OK to test

@prckent prckent requested a review from markdewing May 4, 2021 16:03
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.

Please add a unit test, The J2 in opt/qmcpack/src/QMCWaveFunctions/tests/test_bspline_jastrow.cpp can be a starting point.

@prckent prckent self-requested a review May 4, 2021 18:30
Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

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

Many thanks for this Shiv. FYI I ran the full (but limited) set of optimzation tests and they seemed to be OK.

I agree that adding a unit test by expanding the example Ye pointed to would be good.

If you don't have time to do that let us know.

@shivupa
Copy link
Contributor Author

shivupa commented May 4, 2021

Yup sounds good. Thanks for the example Ye. I'll give it a try and report back

@markdewing
Copy link
Contributor

The tests in test_DiffTwoBodyJastrowOrbital.cpp would be a good starting point, since they target the previous round of problems in this code.

@prckent prckent requested a review from ye-luo May 7, 2021 13:08
@ye-luo
Copy link
Contributor

ye-luo commented May 7, 2021

@shivupa The added test doesn't trigger failure on develop. This then becomes a less effective test.
The test is named as "DiffTwoBodyJastrowOrbital" but there is no call to routines calculating parameter derivatives. If calling derivatives is the only way to trigger the failure, then adding derivative call is necessary. Otherwise, rename the title.
Please update the test.

@shivupa
Copy link
Contributor Author

shivupa commented May 7, 2021

Thanks working on this now. I think I misunderstood what was going on and Mark's previous test. Sorry about that

@shivupa shivupa marked this pull request as draft May 10, 2021 16:19
@shivupa
Copy link
Contributor Author

shivupa commented May 10, 2021

Sorry is it possible to stop checks on this? I though converting to draft would, but I this these will pass regardless as the previous work did. I mainly pushed to ask some questions.

@prckent
Copy link
Contributor

prckent commented May 10, 2021

We can't straightforwardly stop tests on a per-PR basis. However, we ignore the test results until the PR is marked as ready.

@shivupa shivupa marked this pull request as ready for review May 11, 2021 16:53
@shivupa
Copy link
Contributor Author

shivupa commented May 11, 2021

Makes sense. I didn't want to waste the computational time.

This is ready for review now! Thanks @ye-luo and @markdewing for the discussion. The test now checks the F vector for any nullptrs. This fails on develop as expected (the F vector is private on develop so once the function allowing access for F is added on develop, this will still fail as expected).

markdewing
markdewing previously approved these changes May 11, 2021
Copy link
Contributor

@markdewing markdewing left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for doing this!

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.

Thank you!!!!

@ye-luo ye-luo enabled auto-merge May 12, 2021 01:51
@ye-luo ye-luo merged commit 4f43240 into QMCPACK:develop May 12, 2021
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.

Two body Jastrow issue when there are more than 2 particle types but only one particle of each type
5 participants