Skip to content

Nexus: magnetization density estimator - #5346

Merged
ye-luo merged 5 commits into
QMCPACK:developfrom
kayahans:feature/magnetization_density
Mar 4, 2025
Merged

Nexus: magnetization density estimator #5346
ye-luo merged 5 commits into
QMCPACK:developfrom
kayahans:feature/magnetization_density

Conversation

@kayahans

Copy link
Copy Markdown
Contributor

Add capability to define magnetizationdensity estimator in Nexus. Relevant nexus tests are also added.

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

  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

MacOS 15.3.1

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • No. 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)

@kayahans kayahans changed the title init magnetizationdensity Nexus: magnetization density estimator Feb 26, 2025

@prckent prckent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add an example of using this to nexus/examples/qmcpack/rsqmc_misc/estimators/iron_ldaU_dmc.py . That example is the closest we have to documentation of what observables can be driven by NEXUS.

prckent
prckent previously approved these changes Mar 4, 2025

@prckent prckent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Thanks Kayahan.

@prckent

prckent commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Test this please

@prckent
prckent enabled auto-merge March 4, 2025 15:13
@prckent
prckent disabled auto-merge March 4, 2025 15:29
@prckent

prckent commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Small updates likely needed:

957/1339 Test #2629: ntest_nexus_qmcpack_input ................................................................................***Failed    0.55 sec
Test name     : qmcpack_input
Test sublabel : test_magnetization_density
Test exception: "AssertionError: Missing or incorrect pattern: <parameter name="integrator" > simpson </parameter>"
Test backtrace:
  File "/scratch/ci/actions-runner-1/_work/qmcpack/qmcpack/nexus/bin/nxs-test", line 478, in run
    self.operation()
  File "/scratch/ci/actions-runner-1/_work/qmcpack/qmcpack/nexus/bin/nxs-test", line 1298, in qmcpack_input
    nunit_all()
  File "/scratch/ci/actions-runner-1/_work/qmcpack/qmcpack/nexus/bin/nxs-test", line 362, in nunit_all
    run_external_unit_test(test_name,unit_test)
  File "/scratch/ci/actions-runner-1/_work/qmcpack/qmcpack/nexus/bin/nxs-test", line 388, in run_external_unit_test
    unit_test()
  File "/scratch/ci/actions-runner-1/_work/qmcpack/qmcpack/nexus/tests/unit/test_qmcpack_input.py", line 2021, in test_magnetization_density
    assert pattern_in_text(pattern, text), f"Missing or incorrect pattern: {pattern}"

@kayahans

kayahans commented Mar 4, 2025

Copy link
Copy Markdown
Contributor Author

@prckent sorry I realized that I had changed "simpson" to simpsons in the last commit, but realized that didn't make the change everywhere. The test now passes again:

./nxs-test -R qmcpack_input

 1/1 qmcpack_input...........................   Passed  0.38 sec

100% tests passed, 0 tests failed out of 1

Total test time = 0.38 sec

@ye-luo

ye-luo commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Test this please

@ye-luo
ye-luo enabled auto-merge March 4, 2025 17:33
@ye-luo
ye-luo merged commit 186092b into QMCPACK:develop Mar 4, 2025
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