Skip to content

Add mw_ version of exact spin integration for SOECPs#5119

Merged
ye-luo merged 11 commits intoQMCPACK:developfrom
camelto2:fast_soc_mw
Aug 13, 2024
Merged

Add mw_ version of exact spin integration for SOECPs#5119
ye-luo merged 11 commits intoQMCPACK:developfrom
camelto2:fast_soc_mw

Conversation

@camelto2
Copy link
Contributor

@camelto2 camelto2 commented Aug 9, 2024

Please review the developer documentation
on the wiki of this project that contains help and requirements.

Proposed changes

This adds the mw_ version of the fast/exact spin integration of SOECPs, which was originally implemented in #4933.

Also did a small refactor of the single walker version which gets used in the mw_ version as well.

Note: This only handles what is needed by the actual hamiltonian...the necessary wave function APIs only add the fall back to the single walker versions. Will need to follow up with mw_evaluateSpinorRatios specializations for DiracDeterminants in a later PR.

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

Delete the items that do not apply

  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

mac

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)

@camelto2 camelto2 changed the title Implements mw_ version of exact spin integration in SOECPs Add mw_ version of exact spin integration in SOECPs Aug 9, 2024
@camelto2 camelto2 changed the title Add mw_ version of exact spin integration in SOECPs Add mw_ version of exact spin integration for SOECPs Aug 9, 2024
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.

Hopefully not too painful to align the tests of the added mw_ function in the same way as the single walker version.

std::optional<ListenerOption<Real>> listeners,
bool keep_grid = false);
bool keep_grid = false,
bool exact_spin = false);
Copy link
Contributor

Choose a reason for hiding this comment

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

This option doesn't exist in the single walker API.
Considering certain array sizes differ when not using exact_spin. I don't feel safe to select using exact_spin or not at the function level. Could you remove this option?
You may access use_exact_spin_ of the leader instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be fixed now

const std::optional<ListenerOption<Real>> listener_opt,
bool keep_grid)
bool keep_grid,
bool exact_spin)
Copy link
Contributor

Choose a reason for hiding this comment

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

Apart from accordingly removing exact_spin, it is better to remove the first argument SOECPotential& so_ecp. It is use can be replaced with the leader of o_list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should be fixed

ye-luo
ye-luo previously approved these changes Aug 9, 2024
@ye-luo
Copy link
Contributor

ye-luo commented Aug 10, 2024

Test this please

@ye-luo ye-luo enabled auto-merge August 10, 2024 00:05
@prckent
Copy link
Contributor

prckent commented Aug 11, 2024

deterministic-unit_test_hamiltonian_ham is broken in complex builds

@camelto2
Copy link
Contributor Author

deterministic-unit_test_hamiltonian_ham is broken in complex builds

Should be fixed now

@ye-luo
Copy link
Contributor

ye-luo commented Aug 12, 2024

Test this please

@ye-luo ye-luo merged commit 9617b18 into QMCPACK:develop Aug 13, 2024
@camelto2 camelto2 deleted the fast_soc_mw branch August 13, 2024 19:44
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