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