-
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
base: develop
Are you sure you want to change the base?
Conversation
… but 2 processor has 'malloc(): memory corruption:'
…e I do three for() to realize gemm and it doesn't support many processors...
…ll has two parameters don't pass), and pass in rdmft_cal() successfully
…Hartree, EXC_RDMFT = E_exx, but my Etotal doesn't include ion energy terms, etc.
…be the error is occurred in processor 2
…ntout has not been deleted yet
…rovided by HF_XCfunc or power_XCfunc
…t in numerica meaning)
|
||
ab-initio methods and the xc-functional parameters used in RDMFT. | ||
|
||
### 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.
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.
orb->cutoffs(), | ||
&GlobalC::GridD, | ||
nspin, | ||
|
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.
one extra line can be deleted
orb->cutoffs(), | ||
&GlobalC::GridD, | ||
nspin, | ||
|
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.
one extra line found
orb->cutoffs(), | ||
&GlobalC::GridD, | ||
nspin, | ||
|
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.
several similar places found (one blank line), please check
template <typename TK, typename TR> | ||
class RDMFT | ||
{ | ||
public: |
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.
do we need so many public variables and public functions, can we made some of them as private?
source/module_rdmft/CMakeLists.txt
Outdated
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 moving module_rdmft into module_hamilt_lcao, in future, maybe we will rename the module_hamilt_lcao to module_lcao_algorithms
source/module_rdmft/rdmft_tools.h
Outdated
#ifdef _OPENMP | ||
#pragma omp parallel for schedule(static, 1024) | ||
#endif | ||
|
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.
one extra line found here
|
||
|
||
template <> | ||
void conj_psi<double>(psi::Psi<double>& wfc); |
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.
It's not a good idea to 'invent' several new operations on Psi, these are common tools, not the tools by RDMFT itself.
Most of the spaces here are because I modified the veff class according to my needs. I use a line of spaces to distinguish what I added myself, to remind me that a more suitable interface may be provided to me in the future, making the veff_rdmft class more concise or even deleting it. |
RDMFT is an ab-initio method.
I have implemented some code for rdmft in ABACUS. As long as the default value "ks" (instead, "rdmft") of the parameter ab_initio_type is used in INPUT, it will not affect the normal function of ABACUS.