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

Test NLPP parameter derivative #4394

Merged
merged 6 commits into from
Jan 13, 2023

Conversation

markdewing
Copy link
Contributor

@markdewing markdewing commented Jan 10, 2023

This test provides a use-case for #4369. I tried adding a "debug_" prefix to the flag, but "debug_randomize_grid" looks like "debug" is a verb. Having a default of "true" for normal operation seemed strange.
In this PR, the sense of the flag is flipped and named "disable_randomize_grid". This seems to be more natural as normal operation has the flag off.

There are alternatives to using this flag, but I didn't pursue them:

  1. Apply the same random grid rotation in the script. This adds an extra step to the calculation, which make debugging harder. It also makes the values depend on the precise numbers coming from the random number generator (If the RNG changes, then the test needs to change)
  2. Could address that second point by using FakeRandom, but that introduces other complications into the build.

To simplify the comparison script, there are no long-range sums. There is no e-e or i-i term in the Hamiltonian, and the pseudopotential has pbc="no".

The wavefunction uses a multideterminant wavefunction. In the future, this test can be copied and changed to use a single determinant wavefunction to test the fixes needed in that case.

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

Delete the items that do not apply

  • Testing changes (e.g. new unit/integration/performance tests)

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.

  • 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
  • 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)

Using the hcpBe test case, add a test of parameter derivative functions.
Update the python scripts to enable validation.
@prckent
Copy link
Contributor

prckent commented Jan 10, 2023

I agree with your disable_randomize_grid logic. Can merge it here or in the older PR.

@markdewing markdewing changed the title [WIP] Test NLPP parameter derivative Test NLPP parameter derivative Jan 12, 2023
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.

Are you proposing to move all the existing potentials to tests/pseudopotentials_for_tests in a later PR?

@markdewing
Copy link
Contributor Author

I moved this pseudopotential because it made it easier to add it to the list in QMCHamiltonians/tests/CMakeLists.txt. The existing placement of pseudopotential files seems to be a mix of in-place, and linked to pseudopotentials_for_tests. I could move other existing files if you want, in a future PR.

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.

LGTM

Browsing via the web it looks like most potentials have already been relocated. If you can move any remaining for consistency, please do.

@prckent
Copy link
Contributor

prckent commented Jan 13, 2023

Test this please

@prckent prckent merged commit 16579e7 into QMCPACK:develop Jan 13, 2023
@markdewing markdewing deleted the test_nlpp_param_deriv branch January 16, 2023 17:05
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.

2 participants