-
Notifications
You must be signed in to change notification settings - Fork 138
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
A noncollinear functional ensemble based on multi-collinear approach #5542
base: develop
Are you sure you want to change the base?
Conversation
#include <utility> | ||
|
||
// 2x2 complex matrix | ||
using Matrix2x2 = std::array<std::array<std::complex<double>, 2>, 2>; |
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.
Please add namespace for your code
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.
NCLibxc serves as an independent package and it is not designed to have a namespace. However, it can also be added due to the specific program. If you think that it is necessary, you can conduct this small modification so that it fits your requirements.
std::ofstream log_file("NCLibxc.log", std::ios::out | std::ios::app); | ||
if (log_file.is_open()) | ||
{ | ||
log_file << "You are using the multi-collinear approach implemented by Xiaoyu Zhang. Please cite:\n"; |
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.
which paper should be site?
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.
This paper hasn't been well prepared. This log is only for tests. We are going to add citation requests after papers published.
if (PARAM.inp.nspin == 4 && PARAM.inp.multicolin) | ||
{ // noncollinear case added by Xiaoyu Zhang, Peking University, 2024.10.02. multicollinear method for lda Since NCLibxc needs libxc, this part codes will not be used. | ||
|
||
std::cerr << "Error: Multi-collinear approach does not support running without Libxc." << std::endl; |
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.
please use WARNING_QUIT
function to quit the program.
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 am not familiar with the function in ABACUS. If you think that it is necessary, you can conduct this small modification so that it fits your requirements.
#include "xc_functional_libxc.h" | ||
#include <tuple> |
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.
Why do you add so many "include" but not use them?
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 is for future development of this package and more flexible interfaces. We don't submit those parts to ABACUS. If they are annoying, it is OK to delete them.
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.
Test should be added for this new method!
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.
Please add unit tests and integrated tests. Current code coverage is zero.
This PR is to merge a noncollinear functional ensemble NCXC programmed by Xiaoyu Zhang into ABACUS. NCXC is based on the multi-collinear approach published on PHYSICAL REVIEW RESEARCH 5, 013036 (2023). This ensemble can currently support LDA and GGA and can be elaborated to mGGA and hybrid functional in the future.
Xiaoyu Zhang