Feature: Implement ext-WT KEDF for OFDFT#7231
Open
sunliang98 wants to merge 8 commits intodeepmodeling:developfrom
Open
Feature: Implement ext-WT KEDF for OFDFT#7231sunliang98 wants to merge 8 commits intodeepmodeling:developfrom
sunliang98 wants to merge 8 commits intodeepmodeling:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Implements the extended Wang–Teter (ext-WT) kinetic energy density functional for OFDFT, wiring it into input parsing, the KEDF manager pipeline, and adding an integration test case.
Changes:
- Add new
KEDF_ExtWTimplementation and integrate it into OFDFT build + runtime selection (of_kinetic=ext-wt). - Extend input parsing/documentation with
ext-wtoption and new parameterof_extwt_kappa. - Add and register an OFDFT integration test case
07_OFDFT/34_OF_KE_extWT.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/07_OFDFT/CASES_CPU.txt | Registers the new CPU test case. |
| tests/07_OFDFT/34_OF_KE_extWT/STRU | Adds structure for the new ext-WT OFDFT test. |
| tests/07_OFDFT/34_OF_KE_extWT/result.ref | Adds reference outputs for regression checking. |
| tests/07_OFDFT/34_OF_KE_extWT/README | Documents the new test case intent/parameters. |
| tests/07_OFDFT/34_OF_KE_extWT/KPT | Defines k-point setup for the test. |
| tests/07_OFDFT/34_OF_KE_extWT/INPUT | Defines OFDFT input using of_kinetic ext-wt. |
| source/source_pw/module_ofdft/kedf_manager.h | Adds ownership of KEDF_ExtWT in manager. |
| source/source_pw/module_ofdft/kedf_manager.cpp | Hooks ext-wt into init/potential/energy/stress paths. |
| source/source_pw/module_ofdft/kedf_extwt.h | Declares the new ext-WT KEDF class/API. |
| source/source_pw/module_ofdft/kedf_extwt.cpp | Implements ext-WT kernel, energy, potential (stress stubbed). |
| source/source_pw/module_ofdft/CMakeLists.txt | Builds kedf_extwt.cpp. |
| source/source_io/module_parameter/read_input_item_ofdft.cpp | Allows of_kinetic=ext-wt and adds of_extwt_kappa. |
| source/source_io/module_parameter/input_parameter.h | Adds of_extwt_kappa to input parameter struct. |
| docs/advanced/input_files/input-main.md | Documents ext-wt and of_extwt_kappa. |
Comments suppressed due to low confidence (1)
source/source_pw/module_ofdft/kedf_manager.h:30
- KEDF_Manager owns
xwm_(see member declaration) but the destructor doesn't delete it, which will leak memory when KEDF_Manager is destroyed (e.g., in repeated solver instantiations or tests). Please deletexwm_in the destructor alongside the other KEDF pointers.
~KEDF_Manager()
{
delete this->lkt_;
delete this->tf_;
delete this->vw_;
delete this->wt_;
delete this->extwt_;
#ifdef __MLALGO
delete this->ml_;
#endif
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reminder
Linked Issue
Fix #...
Unit Tests and/or Case Tests for my changes
What's changed?
Any changes of core modules? (ignore if not applicable)