Commit 377bc32
dyzheng
Feat(deltaspin): add DeltaSpin for PW basis (nspin=1/2/4), lambda update strategies, and direction_only mode
- Port DeltaSpin to PW basis for nspin=1/2/4
- Add lambda update strategies: BFGS, full/incremental, controlled by sc_lambda_strategy
- Add direction_only constraint mode for noncollinear calculations (sc_direction_only)
- Add sc_scf_thr_mode parameter (off/immediate)
- Add sc_strategy and sc_dir_phase1_steps parameters
- Fix E_lambda formula: -sum(lambda*(Mi-Mtarget)) instead of -sum(lambda*Mi)
- Unify lambda sign convention to E' = E + lambda*(M - Mtarget) across PW and LCAO
- Fix reduce_double_allpool communicator size (GlobalV::NPROC_IN_POOL)
- Fix run_lambda_loop iteration indexing in PW path
- Fix SCF crash and charge-density sync issues in LCAO DeltaSpin
- Fix segfault in cal_escon() by adding empty-check guard
- Fix memory leak in cal_pre_HR() when reinitialized
- Propagate current_spin through operator chain in init()
- Add nspin=1 support for PW DeltaSpin and fix collinear constraint
- Add #ifdef __LCAO guards for LCAO-only code
- Refactor: cache PARAM.inp values, add SpinConstrain getters
- Add comprehensive DeltaSpin documentation
- Add tests for sc_scf_thr_mode, sc_dir_phase1_steps, and direction_only
- Includes DFT+U PW basis fixes (issue deepmodeling#7726)1 parent bb2cb4b commit 377bc32
675 files changed
Lines changed: 10495 additions & 41827 deletions
File tree
- .ci/slurm
- .github/workflows
- cmake
- modules
- docs
- advanced
- elec_properties
- input_files
- interface
- scf
- examples/10_hs_matrix
- 01_out_hsr_multik
- 02_out_hsr_multik
- 03_out_hsk_gamma
- 04_out_hsk_multik
- 05_gets
- interfaces
- HefeiNAMD_interface
- example01
- TB2J_interface
- example01
- python/pyabacus/src
- ModuleDriver
- ModuleESolver
- hsolver
- source
- source_base
- module_container/base/third_party
- module_device
- module_external
- source_cell
- module_neighbor
- test
- module_symmetry
- test
- test_pw
- test
- support
- source_esolver
- test
- source_estate
- module_charge
- module_dm
- test
- test
- source_hamilt
- module_gint
- kernel
- test
- module_hcontainer
- test
- support
- module_xc
- test
- source_hsolver
- module_genelpa
- module_pexsi
- test
- source_io
- module_chgpot
- module_ctrl
- module_current
- module_dhs
- module_dm
- module_dos
- module_hs
- module_ml
- module_output
- module_parameter
- module_unk
- module_wannier
- module_wf
- test_serial
- test
- source_lcao
- module_deepks
- test
- support
- NO_GO_deepks_UT
- NO_KP_deepks_UT
- module_deltaspin
- test
- module_dftu
- test
- module_lr
- operator_casida
- module_operator_lcao
- test
- module_rdmft
- module_ri
- module_exx_symmetry
- test
- module_rt
- test
- test
- source_main
- source_md/test
- source_psi
- test
- source_pw/module_pwdft
- kernels
- tests
- 01_PW
- 030_PW_15_CF_CS_S2_smallg
- 034_PW_CF_CS_S2_smallg
- 050_PW_CHG_mismatch
- 055_PW_OW
- 063_PW_CR
- 078_PW_S2_elec_add
- 079_PW_S2_elec_minus
- 206_PW_SCAN_S2
- BUG_SCF_DSPIN
- 02_NAO_Gamma
- 013_NO_GO_MD_OW2
- get_wf_spin2
- md_out_hk_spin2
- scf_elenum_spin2
- scf_out_hk_spin2
- scf_out_wf_spin2
- 03_NAO_multik
- 99_SCF_DPSIN
- nscf_out_hsr_tr_rr
- scf_eadd_spin2
- scf_eminus_spin2
- scf_out_elf
- scf_out_hsk
- scf_out_hsr_npz
- scf_out_hsr_spin2
- scf_out_hsr_spin4
- scf_out_hsr
- scf_out_mul_nupdw
- scf_pp_gth
- scf_smallg_spin2
- 05_rtTDDFT
- 16_NO_vel_TDDFT
- 17_NO_vel_TDDFT
- 08_EXX
- 15_KP_HSE_SOC_symm
- 09_DeePKS
- 17_DS_DFTU
- 12_PW_DS_S2_Z
- 14_PW_DS_S4_XYZ
- 15_PW_DS_S4_Z
- 16_PW_DS_S4_XY
- 18_PW_DFTU_DS_S2_Z
- 19_PW_DFTU_DS_S4_XY
- 21_PW_DFTU_DS_S4_Z
- 24_LCAO_DS_S2_Z
- 26_LCAO_DS_S4_XYZ
- 36_PW_DS_S2_ReadLam_Z
- 37_PW_DS_S4_ReadLam_XY
- 38_PW_DS_S2_Thr1e10_Z
- 39_PW_DS_S4_Thr1e10_XY
- 40_PW_DS_S2_Thr10_Z
- 41_PW_DS_S4_Thr10_XY
- 42_PW_DFTU_DS_S2_Thr1e10_Z
- 43_PW_DFTU_DS_S4_Thr1e10_XY
- 44_PW_DFTU_DS_S2_Thr10_Z
- 45_PW_DFTU_DS_S4_Thr10_XY
- 50_FeO_O_first_Fe_second
- 51_FeO_Fe_first_O_second
- 55_PW_DS_NSCF_S4_XY
- 56_PW_DS_S4_DirectionOnly_XY
- 57_PW_DFTU_DS_S4_DirectionOnly_XY
- 60_PW_DFTU_DS_NSCF_Band_XY
- 61_LCAO_DS_NSCF_S4_XY
- 62_LCAO_DFTU_NSCF_Band_XY
- 63_LCAO_DFTU_DS_NSCF_Band_XY
- 64_PW_DFTU_NSCF_Band_XY
- PP_ORB
- integrate/tools
- libxc
- Si_gammapoint_nspin2
- Si_ksampling_nspin2
- toolchain/scripts
- stage3
- tools/02_postprocessing/rt-tddft-tools/examples/ground-state-projection-Si
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments