Commit 7198ec1
add RDMFT(Reduced Density Matrix Functional Theory) code (#5325)
* in last commit, 2 processor has 'malloc(): memory corruption:' because I do three for() to realize gemm and it doesn't support many processors...
* first push with rdmft writed in abacus-v3.4.4
* update README.md
* update README.md again
* find all parameters used in Veff_rdmft (for hartree and local, XC still has two parameters don't pass), and pass in rdmft_cal() successfully
* use class Veff_rdmft get correct Ehartree and Eexx, but Etotal is wrong
* all energy terms correct, ETV_RDMFT = E_one_elec, Ehartree_RDMFT = E_Hartree, EXC_RDMFT = E_exx, but my Etotal doesn't include ion energy terms, etc.
* z/dgemm_() is used correctly, next step to use pz/dgemm_()
* just one processor is correct, 2 processors have some problem and maybe the error is occurred in processor 2
* 2 processors is wrong but 6 processors is correct...
* check 2 processors error
* update, realize print Dmn in different processors
* get successful result in different numbers of processors, and the printout has not been deleted yet
* get the sum of different processors, that is, get the true total energy of each term
* delete some printout and next step is replace the pz/dgemm_() used in psiDotPsi()
* add some comments
* do some little modifications to make the code more concise
* just save
* just save
* last save before realizing gamma_only calculation
* gamma_only calculation with errors
* save with errors in gamma_only
* gamma_only realization with errors in E_T+nonlocal
* gamma_only successful with one processors, but multi-processor errors
* support g(wg)*H_wfc and g(wg)*wfcHwfc with different g(wg) which is provided by HF_XCfunc or power_XCfunc
* get the special DM used in constructing V_XC, and can be used for split_m2D_ktoR()
* get the special DM used in constructing V_XC and run successfully (not in numerica meaning)
* modify the namespace of rdmft_test files from hamilt to rdmft
* error with using spilt_m2D_ktoR()
* successfully get Ds_XC, next step is update abacus to have the new interface
* successfully run rdmft with power functional in multi-k calculation, have tested alpha=1.0, 0.95, 0.5
* do some little modifications to make the code more concise
* fix interface provided by class OperatorEXX but having errors when do V_XC.contributeHk(ik)
* print data of tensor from Ds_XC
* just save
* check the length and data of LM->Hexxc and Vxc_fromRI_c.Hexxs
* have modified op_exx_lcao.h/.cpp, RI_2D_Comm.h/.cpp files, delete the modifying in the future
* save
* successfullu add power XC_functional and run correctly with Si soilds in 6 nodes and 6 processors
* successfully realize power functional with testing Si solids, and some printout need to be deleted
* Print: last push before delete many printout
* delete modifying in source code
* Refactor: first add class RDMFT
* save
* get DM used for updating charge/rho
* try to initial DMR of class DensityMatrix
* save before modifying gint.cpp
* update charge using wg&wfc which provided by me successfully
* delete some comment
* last save before transfer wg -> natural occupation numbers (occupation_num)
* successfully transfer wg -> occ_number and get correct result in Muller_XC
* modifying some variable names, function names and comments (for wg -> occNum)
* add module_rdmft and copy code here working successfully
* delete rdmft_test.h/.cpp files in module_hamilt_lcao/... and modify corresponding CMakeLists.txt
* add rdmft.h, rdmft.cpp, rdmft_tools.cpp files to create class RDMFT
* just save. In the process of factor function rdmft_cal() -> class RDMFT
* modify rdmft_solver in esolver_ks_lcao.h/.cpp
* push with compile error in cal_dm.h( psiMulPsiMpi() function with the same name is wrong )
* add class rdmft and do rdmft_solver.init() successfully, next step is init V_TV, V_XC...
* successfully move functions of class RDMFT to rdmft.cpp
* just save
* just save
* factor function rdmft_cal() -> class RDMFT and with running error
* just save
* Factor: transfer function rdmft_cal() -> class RDMFT and run in afterscf() successfully
* just save
* now get V_local in eiter, next step move it to istep, i.e. together with T_nonlocal
* move the obtaining of V_local from elec-step to ion-step
* successfully find where to do update_ion()
* class RDMFT get correct E_TV and E_hartree, but E_XC=0.0
* Factor: complete func rdmft_cal() -> class RDMFT and find where to use the RDMFT class object rdmft_solver appropriately
* save
* save for debug
* Fix: fix bug in HkPsi(), transfer 'T'->'C'
* save
* Fix: fix nk_total in class RDMFT depend on the Symmetry::symm_flag
* save
* test different branch
* add Dell_abaInstall.sh for Dell_server
* modify module_rdmft to latest version
* just save for updating branch rdmft
* update module_xc for rdmft(WP22,CWP22 and so on)
* Fix memory bug in XC_Functional_Libxc::cal_gdr()
* Refactor XC_Functional_Libxc::convert_vtxc_v()
* merge to abacus-v3.8.0 but don't debug(many, because many functions and interfaces have changed). The scaling_factor_xc issue is not handled
* merge to abacus-v3.8.0 and add scaling_factor in libxc_cpp files
* merge to abacus-v3.8.0 and debug is not finished
* just save
* just save
* after merging into abacus-v3.8.0, the first compilation passed, but the program has not been run yet
* after merging to abacus-v3.8.0, the program ran successfully for the first time, but the call of V_exx was not correct.
* just save
* just save
* just save
* the Vexx may have error when symmetry==1, skip it and continue do my own code
* add parameters used in rdmft in input_parameters.h and so on
* merge all rdmft-code to abacus-v3.8.0, next step is debug and test
* debug now ,some energy is little different from abacus
* merge to the latest aABACUS
* Fix the bug caused by merging the latest ABAUCS, need to test other bugs such as wp22, cwp22 and the difference of energy
* just save
* add XC-functional BLYP_LIBXC and BLYP_LR to test
* stop tracking abaInstall_HZWpara.sh
* just save
* just save
* save
* just save
* modify cmake/FindELPA.cmake
* save
* add RDMFT(Reduced Density Matrix Functional Theory) code
* [pre-commit.ci lite] apply automatic fixes
* delete lib64/ and include/
* delete some production code and modify some variable/function names
* save
* merge to the latest abacus
* just save
* add tests for rdmft
* recover accidentally deleted files
* move rdmft related functions and their calls from esolver_ks to esolver_ks_lcao, and so on
* save
* save
* [pre-commit.ci lite] apply automatic fixes
* add '#ifdef __MPI', delete run_rdmft() and so on
* just save
* save
* debug
* add if(ENABLE_LCAO) in rdmft/CMakeLists.txt
* save
* save
* fix compile problem
* save
* modify the error in module_io/test/read_input_ptest.cpp
* prepare for PR
* save
* add symmetry calculation of exx in rdmft
* add test in esolver_ks_lcao.cpp, function after_scf(): update exx to test the exx_energy get by rdmft is exactly equal to exx_energy by abacus
* delete rdmft_test.h/.cpp
* delete the test for exx in esolver_ks_lcao.cpp, after_scf(
* update test with symmetry, tests/integrate/1001_NO_Si2_dzp_rdmft
* save
* [pre-commit.ci lite] apply automatic fixes
* save
* delete the new ord_file in tests/
* last save befor move cal_V_ TV/hartree/XC from rdmft.cpp to cal_V_rdmft.cpp
* last save before move the functions about update_state from rdmft.cpp to update_state_rdmft.cpp
* save
* save
* [pre-commit.ci lite] apply automatic fixes
* save
* modify ab_initio_type to bool rdmft
* save
* Fix: let nk_total *= nspin, in rdmft
* modified according to Mr. Chen's suggestion
* save
* save
* merge the latest abacus
* [pre-commit.ci lite] apply automatic fixes
* save
* add some tests for rdmft
* save
* save
* [pre-commit.ci lite] apply automatic fixes
* reduce calculation time of tests: rdmft
* modify some comments
* modify tests
* save
* modify class RDMFT
* save
* modify Comments
* save
* save
* save
* save
* save
* modify
* save
* [pre-commit.ci lite] apply automatic fixes
* add a comment in rdmft_cal_hamilt/V.cpp
* rename rdmft_cal_hamilt.cpp to rdmft_pot_mat.cpp
* Refactore psiDotPsi()
* save
* save
* save
* save
---------
Co-authored-by: linpz <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Mohan Chen <[email protected]>
Co-authored-by: maki49 <[email protected]>
Co-authored-by: wqzhou <[email protected]>1 parent f084d42 commit 7198ec1
File tree
56 files changed
+2728
-36
lines changed- docs/advanced/input_files
- source
- module_esolver
- module_hamilt_general/module_xc
- module_io
- test
- module_parameter
- module_rdmft
- module_ri
- tests/integrate
- 1001_NO_Si2_dzp_rdmft
- 1002_NO_H2_dzp_rdmft
- 1003_NO_Hsoilds_dzp_rdmft
- 1004_NO_H_dzp_rdmft
- 1005_NO_Mg_dzp_rdmft
- tools
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
56 files changed
+2728
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
| 728 | + | |
| 729 | + | |
729 | 730 | | |
730 | 731 | | |
731 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
438 | 441 | | |
439 | 442 | | |
440 | 443 | | |
| |||
4031 | 4034 | | |
4032 | 4035 | | |
4033 | 4036 | | |
| 4037 | + | |
| 4038 | + | |
| 4039 | + | |
| 4040 | + | |
| 4041 | + | |
| 4042 | + | |
| 4043 | + | |
| 4044 | + | |
| 4045 | + | |
| 4046 | + | |
| 4047 | + | |
| 4048 | + | |
| 4049 | + | |
| 4050 | + | |
| 4051 | + | |
| 4052 | + | |
| 4053 | + | |
4034 | 4054 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
726 | 728 | | |
727 | 729 | | |
728 | 730 | | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
| |||
250 | 254 | | |
251 | 255 | | |
252 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
253 | 264 | | |
254 | 265 | | |
255 | 266 | | |
| |||
839 | 850 | | |
840 | 851 | | |
841 | 852 | | |
| 853 | + | |
842 | 854 | | |
843 | 855 | | |
844 | 856 | | |
| |||
1042 | 1054 | | |
1043 | 1055 | | |
1044 | 1056 | | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1045 | 1074 | | |
1046 | 1075 | | |
1047 | 1076 | | |
| |||
1228 | 1257 | | |
1229 | 1258 | | |
1230 | 1259 | | |
| 1260 | + | |
1231 | 1261 | | |
1232 | 1262 | | |
1233 | 1263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
| 75 | + | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
373 | 381 | | |
374 | 382 | | |
375 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
196 | 198 | | |
197 | 199 | | |
198 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
206 | 255 | | |
207 | 256 | | |
208 | 257 | | |
| |||
243 | 292 | | |
244 | 293 | | |
245 | 294 | | |
246 | | - | |
| 295 | + | |
| 296 | + | |
247 | 297 | | |
248 | 298 | | |
249 | 299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | 90 | | |
85 | 91 | | |
| |||
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
165 | | - | |
| 171 | + | |
166 | 172 | | |
167 | 173 | | |
168 | 174 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
138 | 152 | | |
139 | 153 | | |
140 | 154 | | |
| |||
0 commit comments