Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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) fromvaspout.h5and pass it throughPhelelDatasetinto derivative generation. - Compute and optionally store
dmudu(kinetic-potential derivative) in the HDF5 output. - Broaden typing annotations and add non-
Noneassertions 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.
| 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"], | ||
| ) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.