Skip to content

Nexus: QE HDF5 charge density results support - #5427

Merged
ye-luo merged 2 commits into
QMCPACK:developfrom
kayahans:feature/qe_hdf5
Apr 8, 2025
Merged

ye-luo merged 2 commits into
QMCPACK:developfrom
kayahans:feature/qe_hdf5

Conversation

@kayahans

@kayahans kayahans commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

When QE is installed with HDF5 support(default to compile pw2qmcpack.x), instead of the charge-density.dat and spin-polarization.dat files, a single charge_density.hdf5 file is produced. Currently Nexus does not support transferring results between simulation objects with hdf5 extensions.

I have noticed that while creating these softlinks, Nexus does not actually check if the .dat file exists in the reference directory. I initially tried implementing these checks, but it broke several tests. New code checks if there is a charge-density.hdf5 file in the reference directory, if not then assumes there is a .dat file (which is the current behavior).

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

  • New feature

Does this introduce a breaking change?

  • No. Passes all tests in nxs-test.

What systems has this change been tested on?

Python 3.12.8

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

@prckent prckent changed the title qe hdf5 results support Nexus: QE HDF5 charge density results support Apr 7, 2025
@prckent

prckent commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

Thanks Kayahan. Can you please confirm that a "meaningful" QE spin polarized workflow is still good with the latest QE? e.g. Check https://github.com/QMCPACK/qmcpack/blob/develop/nexus/examples/qmcpack/rsqmc_quantum_espresso/04_iron_dft_dmc_gcta/iron_ldaU_dmc_gcta.py works, or at least looks to work (no need to run the whole thing). Anything similar would be fine, including potentially what you used to develop this. Unfortunately there is no meaningful testing on Nexus workflows yet.

@kayahans

kayahans commented Apr 8, 2025

Copy link
Copy Markdown
Contributor Author

@prckent, The added code covers when transfers are made between SCF to SCF calculations e.g. when you only need the charge density, but not the whole wavefunction. From SCF to NSCF calculations, whole pwscf.save directory is saved using rsync (due to sync_from_scf = True if calc='nscf'). The new code does not modify the rsync option, therefore should not affect most QMC workflows. I have tested this on a non-collinear, spin-orbit coupling calculations (with SCF to SCF) workflow using Nexus. Additionally, I ran the QE part of the workflow you shared and that worked for me as well, but that workflow has no SCF to SCF calculations.

@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

@ye-luo

ye-luo commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Test this please

@ye-luo
ye-luo enabled auto-merge April 8, 2025 17:24
@ye-luo

ye-luo commented Apr 8, 2025

Copy link
Copy Markdown
Contributor

Test this please

@ye-luo
ye-luo merged commit b621482 into QMCPACK:develop Apr 8, 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