Skip to content

Meta GGA support#136

Merged
atztogo merged 8 commits intodevelopfrom
mgga
Feb 15, 2026
Merged

Meta GGA support#136
atztogo merged 8 commits intodevelopfrom
mgga

Conversation

@atztogo
Copy link
Member

@atztogo atztogo commented Feb 8, 2026

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 67.88991% with 70 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.97%. Comparing base (4f2ebe0) to head (1ddd4be).
⚠️ Report is 116 commits behind head on develop.

Files with missing lines Patch % Lines
src/phelel/interface/vasp/file_IO.py 32.50% 27 Missing ⚠️
src/phelel/interface/vasp/derivatives.py 65.67% 23 Missing ⚠️
src/phelel/velph/cli/phelel/differentiate.py 57.14% 6 Missing ⚠️
src/phelel/api_phelel.py 75.00% 4 Missing ⚠️
src/phelel/base/Dij_qij.py 89.74% 4 Missing ⚠️
src/phelel/base/local_potential.py 89.28% 3 Missing ⚠️
src/phelel/file_IO.py 75.00% 2 Missing ⚠️
src/phelel/velph/cli/phelel/__init__.py 50.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (4f2ebe0) and HEAD (1ddd4be). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (4f2ebe0) HEAD (1ddd4be)
6 5
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #136      +/-   ##
===========================================
- Coverage    72.07%   62.97%   -9.10%     
===========================================
  Files           81       81              
  Lines         5791     7396    +1605     
===========================================
+ Hits          4174     4658     +484     
- Misses        1617     2738    +1121     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds initial support for Meta-GGA-related data by introducing optional “kinetic potential” (VASP xcmu) ingestion, propagation through the API, and persistence to phelel_params.hdf5, alongside type-hinting/robustness updates.

Changes:

  • Read optional kinetic energy density potential (/results/potential/xcmu) from vaspout.h5 and pass it through PhelelDataset into derivative generation.
  • Compute and optionally store dmudu (kinetic-potential derivative) in the HDF5 output.
  • Broaden typing annotations and add non-None assertions in core derivative and IO paths; update Codecov action version.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/base/test_Dij_qji.py Adds assertions to satisfy stricter optional-attribute expectations during tests.
src/phelel/velph/cli/phelel/differentiate.py Tightens typing for dir_name and adds assertions for displacement supercells.
src/phelel/interface/vasp/file_IO.py Adds typing, improves error handling, and extends vaspout.h5 potential reader to support xcmu.
src/phelel/interface/vasp/derivatives.py Attempts to read kinetic potentials and include them in PhelelDataset.
src/phelel/file_IO.py Adds optional dmudu dataset writing to phelel_params.hdf5.
src/phelel/base/local_potential.py Tightens types and adds internal assertions; adjusts visualization helper signature/behavior.
src/phelel/base/Dij_qij.py Refactors typing and internal state handling (notably atom index plumbing).
src/phelel/api_phelel.py Adds kinetic_potentials to PhelelDataset, computes dmudu, and persists it via save_hdf5.
.github/workflows/tests.yml Updates Codecov action to codecov/codecov-action@v5.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +495 to +511
if phe_input.kinetic_potentials is not None:
kin_pots = phe_input.kinetic_potentials
self._dmudu = DLocalPotential(
self._fft_mesh,
self._p2s_matrix,
self._phelel_phonon.supercell,
symmetry=self.symmetry,
atom_indices=self.atom_indices_in_derivatives,
nufft=self._nufft,
finufft_eps=self._finufft_eps,
verbose=self._log_level > 0,
)
self._dmudu.run(
kin_pots[0],
kin_pots[1:],
self._phelel_phonon.dataset["first_atoms"],
)
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

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

New behavior: when phe_input.kinetic_potentials is provided, run_derivatives now computes and stores self._dmudu via a second DLocalPotential run. There’s currently no test coverage asserting that dmudu is computed and persisted to HDF5 (e.g., that the dmudu dataset exists and has the expected shape/values when /results/potential/xcmu is available). Adding at least one test case that exercises the kinetic_potentials path would prevent regressions.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@atztogo atztogo merged commit 5226fcc into develop Feb 15, 2026
6 checks passed
@atztogo atztogo deleted the mgga branch February 15, 2026 04:07
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