Skip to content

Refactor tests of xc module#7475

Open
mohanchen wants to merge 2 commits into
deepmodeling:developfrom
mohanchen:20260616-2
Open

Refactor tests of xc module#7475
mohanchen wants to merge 2 commits into
deepmodeling:developfrom
mohanchen:20260616-2

Conversation

@mohanchen

Copy link
Copy Markdown
Collaborator

No description provided.

abacus_fixer added 2 commits June 16, 2026 22:28
This commit decouples XC_Functional and related libxc functions from the global PARAM object by adding explicit parameters:

1. Modified XC_Functional::v_xc() to accept nspin, domag, domag_z parameters instead of accessing PARAM
2. Modified XC_Functional::gradcorr() to accept nspin, domag, domag_z parameters
3. Modified XC_Functional::set_xc_type() to accept nspin parameter
4. Modified XC_Functional_Libxc::v_xc_libxc() to accept nspin, domag, domag_z parameters
5. Modified XC_Functional_Libxc::v_xc_meta() to accept nspin parameter

Updated all call sites in:
- source_estate/module_pot/pot_xc.cpp
- source_estate/module_pot/pot_xc_fdm.cpp
- source_pw/module_pwdft/forces_cc.cpp
- source_pw/module_pwdft/stress_cc.cpp
- source_hamilt/module_xc/xc_pot.cpp
- source_hamilt/module_xc/libxc_pot.cpp
- source_hamilt/module_xc/libxc_abacus.h

Updated test files to remove PARAM dependencies:
- test_xc3.cpp: Removed PARAM include and initialization
- test_xc5.cpp: Removed PARAM include and initialization, updated v_xc, v_xc_meta calls
- xctest.h: Removed PARAM include and initialization

Default parameter values are provided for backward compatibility.
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.

1 participant