Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add RDMFT(Reduced Density Matrix Functional Theory) code #5325

Open
wants to merge 196 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 119 commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
412a27b
first add rdmft files in abacus-v3.4.4, run 1 processor is successful…
JGHan7 Dec 20, 2023
7fb74a9
in last commit, 2 processor has 'malloc(): memory corruption:' becaus…
JGHan7 Dec 20, 2023
309294f
first push with rdmft writed in abacus-v3.4.4
JGHan7 Dec 20, 2023
507395c
update README.md
JGHan7 Dec 20, 2023
f485988
update README.md again
JGHan7 Dec 20, 2023
7eb1301
find all parameters used in Veff_rdmft (for hartree and local, XC sti…
JGHan7 Dec 20, 2023
ac14215
use class Veff_rdmft get correct Ehartree and Eexx, but Etotal is wrong
JGHan7 Dec 21, 2023
248c6f6
all energy terms correct, ETV_RDMFT = E_one_elec, Ehartree_RDMFT = E_…
JGHan7 Dec 21, 2023
64c6029
z/dgemm_() is used correctly, next step to use pz/dgemm_()
JGHan7 Dec 21, 2023
84b0af4
just one processor is correct, 2 processors have some problem and may…
JGHan7 Dec 21, 2023
d1555bd
2 processors is wrong but 6 processors is correct...
JGHan7 Dec 21, 2023
81a60cd
check 2 processors error
JGHan7 Dec 21, 2023
8690d60
update, realize print Dmn in different processors
JGHan7 Dec 22, 2023
36a5783
get successful result in different numbers of processors, and the pri…
JGHan7 Dec 22, 2023
9c3ffa5
get the sum of different processors, that is, get the true total ener…
JGHan7 Dec 22, 2023
7697eb6
delete some printout and next step is replace the pz/dgemm_() used in…
JGHan7 Dec 22, 2023
469b8d4
add some comments
JGHan7 Dec 24, 2023
57f26bc
do some little modifications to make the code more concise
JGHan7 Dec 24, 2023
f812b24
just save
JGHan7 Dec 24, 2023
6a79558
just save
JGHan7 Dec 28, 2023
12f6fae
last save before realizing gamma_only calculation
JGHan7 Dec 29, 2023
afb6f2f
gamma_only calculation with errors
JGHan7 Dec 29, 2023
21f294b
save with errors in gamma_only
JGHan7 Dec 29, 2023
7206d95
gamma_only realization with errors in E_T+nonlocal
JGHan7 Dec 30, 2023
da23b18
gamma_only successful with one processors, but multi-processor errors
JGHan7 Dec 31, 2023
bd1eaf3
support g(wg)*H_wfc and g(wg)*wfcHwfc with different g(wg) which is p…
JGHan7 Jan 11, 2024
59b792f
get the special DM used in constructing V_XC, and can be used for spl…
JGHan7 Jan 11, 2024
7e805f8
get the special DM used in constructing V_XC and run successfully (no…
JGHan7 Jan 12, 2024
eadb2a1
modify the namespace of rdmft_test files from hamilt to rdmft
JGHan7 Jan 12, 2024
bbcaa60
error with using spilt_m2D_ktoR()
JGHan7 Jan 12, 2024
48bd584
successfully get Ds_XC, next step is update abacus to have the new in…
JGHan7 Jan 12, 2024
ecb152c
merge with newest abacus-v3.5.0
JGHan7 Jan 12, 2024
2c59145
successfully run rdmft with power functional in multi-k calculation, …
JGHan7 Jan 12, 2024
b2e5cbe
do some little modifications to make the code more concise
JGHan7 Jan 13, 2024
567326c
fix interface provided by class OperatorEXX but having errors when do…
JGHan7 Jan 13, 2024
4d9423a
print data of tensor from Ds_XC
JGHan7 Jan 13, 2024
2da31a8
just save
JGHan7 Jan 13, 2024
4a8fb2f
check the length and data of LM->Hexxc and Vxc_fromRI_c.Hexxs
JGHan7 Jan 13, 2024
97893a8
have modified op_exx_lcao.h/.cpp, RI_2D_Comm.h/.cpp files, delete the…
JGHan7 Jan 14, 2024
7ebdb14
save
JGHan7 Jan 14, 2024
af7101f
successfullu add power XC_functional and run correctly with Si soilds…
JGHan7 Jan 15, 2024
727d784
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Jan 15, 2024
b109fe2
successfully realize power functional with testing Si solids, and som…
JGHan7 Jan 15, 2024
ae61ae2
Print: last push before delete many printout
JGHan7 Jan 16, 2024
4b7b65d
delete modifying in source code
JGHan7 Jan 16, 2024
c312fdf
Refactor: first add class RDMFT
JGHan7 Jan 18, 2024
c85e116
save
JGHan7 Jan 25, 2024
ef391fc
get DM used for updating charge/rho
JGHan7 Feb 27, 2024
ff3a134
try to initial DMR of class DensityMatrix
JGHan7 Feb 28, 2024
fef0f07
save before modifying gint.cpp
JGHan7 Mar 1, 2024
1cf10c7
update charge using wg&wfc which provided by me successfully
JGHan7 Mar 2, 2024
5903818
delete some comment
JGHan7 Mar 2, 2024
6b41e83
last save before transfer wg -> natural occupation numbers (occupatio…
JGHan7 Mar 4, 2024
46688de
successfully transfer wg -> occ_number and get correct result in Mull…
JGHan7 Mar 4, 2024
aa35d9f
modifying some variable names, function names and comments (for wg ->…
JGHan7 Mar 5, 2024
18f4a22
add module_rdmft and copy code here working successfully
JGHan7 Mar 7, 2024
4ab0d04
delete rdmft_test.h/.cpp files in module_hamilt_lcao/... and modify c…
JGHan7 Mar 7, 2024
ab3d552
add rdmft.h, rdmft.cpp, rdmft_tools.cpp files to create class RDMFT
JGHan7 Mar 11, 2024
d339946
just save. In the process of factor function rdmft_cal() -> class RDMFT
JGHan7 Mar 11, 2024
cb82c05
modify rdmft_solver in esolver_ks_lcao.h/.cpp
JGHan7 Mar 12, 2024
de94f6f
push with compile error in cal_dm.h( psiMulPsiMpi() function with the…
JGHan7 Mar 13, 2024
c0eb22a
add class rdmft and do rdmft_solver.init() successfully, next step is…
JGHan7 Mar 14, 2024
29462f0
successfully move functions of class RDMFT to rdmft.cpp
JGHan7 Mar 14, 2024
e1639b3
just save
JGHan7 Mar 15, 2024
c33010a
just save
JGHan7 Mar 15, 2024
e6f5cdc
factor function rdmft_cal() -> class RDMFT and with running error
JGHan7 Mar 15, 2024
55a8b39
just save
JGHan7 Mar 15, 2024
ec31ad1
Factor: transfer function rdmft_cal() -> class RDMFT and run in after…
JGHan7 Mar 16, 2024
4a18ca9
just save
JGHan7 Mar 16, 2024
fc7aa6e
now get V_local in eiter, next step move it to istep, i.e. together w…
JGHan7 Mar 16, 2024
6d97a8b
move the obtaining of V_local from elec-step to ion-step
JGHan7 Mar 16, 2024
01b486b
successfully find where to do update_ion()
JGHan7 Mar 16, 2024
ce1cd9a
class RDMFT get correct E_TV and E_hartree, but E_XC=0.0
JGHan7 Mar 16, 2024
f68a3a4
Factor: complete func rdmft_cal() -> class RDMFT and find where to us…
JGHan7 Mar 17, 2024
2016a9c
save
JGHan7 Mar 17, 2024
c8a0680
save for debug
JGHan7 Mar 19, 2024
e11009f
Fix: fix bug in HkPsi(), transfer 'T'->'C'
JGHan7 Mar 19, 2024
17faaa5
save
JGHan7 Mar 20, 2024
40da285
Fix: fix nk_total in class RDMFT depend on the Symmetry::symm_flag
JGHan7 Mar 20, 2024
f96c8c5
save
JGHan7 Mar 20, 2024
2b4ecfd
test different branch
JGHan7 Mar 22, 2024
9cb16b8
add Dell_abaInstall.sh for Dell_server
JGHan7 Apr 8, 2024
6167846
modify module_rdmft to latest version
JGHan7 Sep 6, 2024
ac00ce4
just save for updating branch rdmft
JGHan7 Sep 6, 2024
787eac6
update module_xc for rdmft(WP22,CWP22 and so on)
JGHan7 Sep 6, 2024
4f35e36
Fix memory bug in XC_Functional_Libxc::cal_gdr()
PeizeLin Oct 8, 2024
e0f5436
merge to abacus-v3.7.5, but don't debug(many, because many functions …
JGHan7 Oct 9, 2024
1e79ca3
Refactor XC_Functional_Libxc::convert_vtxc_v()
PeizeLin Oct 10, 2024
1c9712a
merge to abacus-v3.7850 but don't debug(many, because many functions …
JGHan7 Oct 10, 2024
4f0e78e
merge to abacus-v3.8.0 but don't debug(many, because many functions a…
JGHan7 Oct 10, 2024
5778743
Merge branch 'convert_vtxc_v' of https://gitee.com/linpeize/abacus-de…
JGHan7 Oct 10, 2024
802d141
merge to abacus-v3.8.0 and add scaling_factor in libxc_cpp files
JGHan7 Oct 10, 2024
85c4833
merge to abacus-v3.8.0 and debug is not finished
JGHan7 Oct 10, 2024
c1c8d76
just save
JGHan7 Oct 11, 2024
abc17af
just save
JGHan7 Oct 12, 2024
5669f69
after merging into abacus-v3.8.0, the first compilation passed, but t…
JGHan7 Oct 12, 2024
52f4412
after merging to abacus-v3.8.0, the program ran successfully for the …
JGHan7 Oct 14, 2024
24ff6a7
just save
JGHan7 Oct 15, 2024
1b2dd3a
just save
JGHan7 Oct 15, 2024
b55b13a
just save
JGHan7 Oct 16, 2024
16c4b8b
the Vexx may have error when symmetry==1, skip it and continue do my …
JGHan7 Oct 16, 2024
aa7a4d9
add parameters used in rdmft in input_parameters.h and so on
JGHan7 Oct 16, 2024
4c44b46
merge all rdmft-code to abacus-v3.8.0, next step is debug and test
JGHan7 Oct 16, 2024
fcd682b
debug now ,some energy is little different from abacus
JGHan7 Oct 17, 2024
ed133cb
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Oct 17, 2024
7649263
merge to the latest aABACUS
JGHan7 Oct 17, 2024
3cbf187
Fix the bug caused by merging the latest ABAUCS, need to test other b…
JGHan7 Oct 17, 2024
4ebc6c1
merge to ABACUS-v3.8.1, 2024-10-22
JGHan7 Oct 22, 2024
8c5ea60
just save
JGHan7 Oct 22, 2024
6441a65
add XC-functional BLYP_LIBXC and BLYP_LR to test
JGHan7 Oct 22, 2024
424efc2
stop tracking abaInstall_HZWpara.sh
JGHan7 Oct 22, 2024
55d56c7
Merge remote-tracking branch 'upstream/develop' into rdmft
JGHan7 Oct 22, 2024
d10ac66
just save
JGHan7 Oct 22, 2024
0b20c6c
just save
JGHan7 Oct 22, 2024
4058957
save
JGHan7 Oct 22, 2024
c904262
just save
JGHan7 Oct 22, 2024
755b828
modify cmake/FindELPA.cmake
JGHan7 Oct 22, 2024
06f5865
save
JGHan7 Oct 22, 2024
d18fc5c
add RDMFT(Reduced Density Matrix Functional Theory) code
JGHan7 Oct 22, 2024
0dac83c
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Oct 22, 2024
e754f5f
Merge branch 'develop' into rdmft_PR
mohanchen Oct 23, 2024
00fc015
delete lib64/ and include/
JGHan7 Oct 23, 2024
cbcfb7b
delete some production code and modify some variable/function names
JGHan7 Oct 23, 2024
490d14e
Merge branch 'develop' into rdmft_PR
mohanchen Oct 23, 2024
c24725d
save
JGHan7 Oct 23, 2024
6c0dca4
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Oct 23, 2024
3df7b0c
merge to the latest abacus
JGHan7 Oct 23, 2024
8f02b0a
merge and modify rdmft_PR branch
JGHan7 Oct 23, 2024
5259994
Merge branch 'rdmft_PR' of github.com:JGHan7/abacus-develop into rdmf…
JGHan7 Oct 23, 2024
7370ba2
just save
JGHan7 Oct 24, 2024
d9e89f0
add tests for rdmft
JGHan7 Oct 24, 2024
4e542de
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Oct 24, 2024
ab5a514
change branch from rdmft to rdmft_PR, prepare for PR
JGHan7 Oct 24, 2024
af28473
recover accidentally deleted files
JGHan7 Oct 24, 2024
641a9a0
move rdmft related functions and their calls from esolver_ks to esolv…
JGHan7 Oct 25, 2024
0040b42
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Oct 25, 2024
1c1d006
save
JGHan7 Oct 25, 2024
a45138b
save
JGHan7 Oct 25, 2024
600abc0
save
JGHan7 Oct 25, 2024
b90f546
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Oct 25, 2024
0796389
add '#ifdef __MPI', delete run_rdmft() and so on
JGHan7 Oct 25, 2024
3c13b1a
just save
JGHan7 Oct 25, 2024
d0b366c
prepare for PR
JGHan7 Oct 25, 2024
7d47d0a
prepare for PR
JGHan7 Oct 25, 2024
278ea05
Merge branch 'rdmft' into rdmft_PR
JGHan7 Oct 25, 2024
061a9c3
save
JGHan7 Oct 25, 2024
909f291
debug
JGHan7 Oct 25, 2024
4d0851d
add if(ENABLE_LCAO) in rdmft/CMakeLists.txt
JGHan7 Oct 26, 2024
7c6c782
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Oct 26, 2024
c531c38
save
JGHan7 Oct 26, 2024
32c9ecb
save
JGHan7 Oct 26, 2024
025b199
Merge branch 'rdmft' of gitlab.com:JGHan7/rdmft-abacus into rdmft
JGHan7 Oct 26, 2024
a0e7a02
prepare for PR
JGHan7 Oct 26, 2024
5223952
fix compile problem
maki49 Oct 26, 2024
c74d4c6
Merge pull request #1 from maki49/rdmft_PR
JGHan7 Oct 26, 2024
3a2d9a5
save
JGHan7 Oct 26, 2024
0803f58
modify the error in module_io/test/read_input_ptest.cpp
JGHan7 Oct 26, 2024
d2e2640
prepare for PR
JGHan7 Oct 26, 2024
588e0e4
save
JGHan7 Oct 27, 2024
e0ba750
add symmetry calculation of exx in rdmft
JGHan7 Oct 27, 2024
e23a0e9
add test in esolver_ks_lcao.cpp, function after_scf(): update exx to …
JGHan7 Oct 27, 2024
178f039
delete rdmft_test.h/.cpp
JGHan7 Oct 27, 2024
dd78eef
delete the test for exx in esolver_ks_lcao.cpp, after_scf(
JGHan7 Oct 27, 2024
0a72e69
update test with symmetry, tests/integrate/1001_NO_Si2_dzp_rdmft
JGHan7 Oct 27, 2024
28b8e58
prepare for PR
JGHan7 Oct 27, 2024
ea575ed
save
JGHan7 Oct 27, 2024
80545b8
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Oct 27, 2024
2aa8c2b
save
JGHan7 Oct 29, 2024
73a4eae
delete the new ord_file in tests/
JGHan7 Oct 29, 2024
51657ad
last save befor move cal_V_ TV/hartree/XC from rdmft.cpp to cal_V_rdm…
JGHan7 Oct 29, 2024
a4597be
last save before move the functions about update_state from rdmft.cpp…
JGHan7 Oct 29, 2024
1aca681
save
JGHan7 Oct 29, 2024
99823cf
save
JGHan7 Oct 29, 2024
9b6b43d
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Oct 29, 2024
73d97e8
prepare for PR
JGHan7 Oct 29, 2024
69551e2
Merge branch 'rdmft_PR' of github.com:JGHan7/abacus-develop into rdmf…
JGHan7 Oct 29, 2024
5a9febe
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Oct 29, 2024
f977c2d
Merge branch 'develop' into rdmft_PR
mohanchen Nov 1, 2024
3019e9a
save
JGHan7 Nov 1, 2024
65b45fb
modify ab_initio_type to bool rdmft
JGHan7 Nov 4, 2024
9f9863f
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Nov 4, 2024
b13bc06
save
JGHan7 Nov 4, 2024
e432d86
Fix: let nk_total *= nspin, in rdmft
JGHan7 Nov 4, 2024
8996e78
modified according to Mr. Chen's suggestion
JGHan7 Nov 4, 2024
9db254c
save
JGHan7 Nov 4, 2024
59371ce
prepare for PR
JGHan7 Nov 4, 2024
e1d3a77
Merge branch 'rdmft_PR' of github.com:JGHan7/abacus-develop into rdmf…
JGHan7 Nov 4, 2024
db647d7
Merge branch 'develop' into rdmft_PR
mohanchen Nov 5, 2024
7061eb7
save
JGHan7 Nov 5, 2024
50fe6d7
merge the latest abacus
JGHan7 Nov 6, 2024
cd41a28
merge the latest abacus
JGHan7 Nov 14, 2024
b8a89e0
merge the latest abacus
JGHan7 Nov 14, 2024
60403f5
Merge branch 'develop' of https://gitee.com/deepmodeling/abacus-devel…
JGHan7 Nov 14, 2024
d65e8b1
prepare for PR
JGHan7 Nov 14, 2024
64ae540
Merge branch 'rdmft_PR' of github.com:JGHan7/abacus-develop into rdmf…
JGHan7 Nov 14, 2024
aedb2fa
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@
- [abs\_broadening](#abs_broadening)
- [ri\_hartree\_benchmark](#ri_hartree_benchmark)
- [aims_nbasis](#aims_nbasis)
- [Reduced Density Matrix Functional Theory](#Reduced-Density-Matrix-Functional-Theory)
- [ab\_initio\_type](#ab_initio_type)
- [rdmft\_power\_alpha](#rdmft_power_alpha)

[back to top](#full-list-of-input-keywords)
## System variables
Expand Down Expand Up @@ -3992,4 +3995,20 @@ The output files are `OUT.${suffix}/Excitation_Energy.dat` and `OUT.${suffix}/Ex
- **Description**: Atomic basis set size for each atom type (with the same order as in `STRU`) in FHI-aims.
- **Default**: {} (empty list, where ABACUS use its own basis set size)

## Reduced Density Matrix Functional Theory

ab-initio methods and the xc-functional parameters used in RDMFT.

### ab_initio_type
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, there is another keyword esolver_type, and ksdft is a possible value of it, could you check if rdmft can be a param of it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theoretically, rdmft can be a value of esolver_type.

But there are too many places in the program that involve esolver_type, which makes me think that it is dangerous to use esolver_type to express rdmft (when calculating rdmft, we usually need to run one or several steps of ksdft calculation to get the initial value, so when running rdmft, we must ensure that the ksdft program can run completely normally)

So I temporarily added the parameter ab_initio_type

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your opinion, senior sister.

In fact, the theoretical status of RDMFT and DFT is the same, but when we apply RDMFT in practice, we can use the results of one or several steps of KS as the initial value (of course, we can also use a random 1-RDM as the initial value), which requires KSDFT to run completely in the actual program.

However, in the current RDMFT implementation, I am still writing the program for variational optimization to the 1-RDM of the ground state (the optimization program of the cooperating teacher is not fully written yet), so it seems that the code I pushed up is doing some "repetitive" calculations without practical significance except for using a few new functionals.

Professor Ren meant that, because ABACUS is often refactored, I need to spend a long time to rewrite the correct rdmft code in the old version into the new version every once in a while, which is a waste of time and has no practical significance for the development of new methods. Therefore, it is recommended that I merge the rdmft code into the developer branch in time, but not release it in the user-oriented version(as long as my code itself does not affect the normal code of ABACUS, for example, when the ab_initio_type of INPUT is the default "ksdft", my code has no effect on other calculations of ABACUS), so the current rdmft module is still considered a production version.

The physical quantities that rdmft temporarily expects to output are the kinetic energy, total energy and 1-RDM of the system in the ground state (by the way, where is this document)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I mean such information can appear in the parameter description in this .md file.

The physical quantities that rdmft temporarily expects to output are the kinetic energy, total energy and 1-RDM of the system in the ground state (by the way, where is this document)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest changing " ab_initio_type" to "rdmft" and set its type to bool, and make this variable controlled by yourself. Do not invent any ambiguous variable for other developers to think they can do something new with this variable.


- **Type**: String
- **Description**: Determine the ab-initio method, ksdft or rdmft (reduced density matrix funcional theory)
- **Default**: ksdft

### rdmft_power_alpha

- **Type**: Real
- **Description**: The alpha parameter of power-functional(or other exx-type/hybrid functionals) which used in RDMFT, g(occ_number) = occ_number^alpha
- **Default**: 0.656

[back to top](#full-list-of-input-keywords)
Loading
Loading