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

Enable complex coefficients for SelfHealingOverlap estimator #5291

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

jtkrogel
Copy link
Contributor

Proposed changes

Small update to handle complex wavefunctions in SelfHealingOverlap estimator. Resolves #5229 (fixes the "plaid scarf" pattern seen in the coefficients for complex runs).

Includes light scaffolding to later include rotated Slater determinants as well (commented out).

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?

Laptop. Inti at ORNL

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'

src/Estimators/SelfHealingOverlap.h Outdated Show resolved Hide resolved
src/Estimators/SelfHealingOverlapInput.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/Fermion/MultiSlaterDetTableMethod.h Outdated Show resolved Hide resolved
src/QMCWaveFunctions/TrialWaveFunction.h Show resolved Hide resolved
src/Estimators/SelfHealingOverlap.cpp Outdated Show resolved Hide resolved
src/Estimators/SelfHealingOverlap.cpp Outdated Show resolved Hide resolved
@jtkrogel
Copy link
Contributor Author

Review comments addressed.

@ye-luo
Copy link
Contributor

ye-luo commented Jan 29, 2025

134617d
also fixes the real compilation issue.

@ye-luo ye-luo enabled auto-merge January 29, 2025 22:01
@ye-luo
Copy link
Contributor

ye-luo commented Jan 29, 2025

Test this please

{
RefVector<SlaterDet> refs;
for (auto& component : Z)
if (auto* comp_ptr = dynamic_cast<SlaterDet*>(component.get()); comp_ptr)
Copy link
Contributor

@PDoakORNL PDoakORNL Jan 30, 2025

Choose a reason for hiding this comment

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

findSD is seems too brief, this is now part of the public API and it would be nice if it was recognizable as what it is from that. Imagine I want to search the codebase for SlaterDet definitions

auto my_det = twf.findSD()

SD is not a character combination of much specificity.

This smells a bit, dynamic_casts aren't zero cost

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't worry about that. I'd like to addressed it separately.
findSD/findMSD are too specific. I'd like to change them as mentioned #5291 (comment)

Copy link
Contributor

@PDoakORNL PDoakORNL left a comment

Choose a reason for hiding this comment

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

New code should follow coding specification.

auto nmsd = msd_refvec.size();

size_t nparams;
if (nmsd == 1 and nsd == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

@PDoakORNL
Copy link
Contributor

For the tests to matter, tests need to exist. As far as I can tell the CI is only checking this compiles.

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.

Spin asymmetric results from a spin symmetric wavefunction
4 participants