-
Notifications
You must be signed in to change notification settings - Fork 145
Refactor class DensityMatrix: remove the dependence on K_Vectors and the ambiguity of _nks
#5224
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
Conversation
WHUweiqingzhou
left a comment
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.
My current opinion is that, at least in the cases without nk input, namely default nk=-1., please do not disrupt the existing code logic.
OK. To take your point in a clearer way, I will make |
WHUweiqingzhou
left a comment
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.
LGTM.
…and the ambiguity of `_nks` (deepmodeling#5224) * remove dependence of DensityMatrix on K_Vectors * rename _nks as _nk to avoid ambiguity * [pre-commit.ci lite] apply automatic fixes * remove map * make nk non-optional * fix after rebase --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
The map {global nspin -> dm nspin} is not always {1->1, 2->2, 4->1}. I will use 2->1 in openshell-LR-TDDFT, where
kv->get_nks()/nspinis not equal to the real number of k-points. I renamed the latter (_nks) as_nkin classDensityMatrixand decouple it fromkv, leaving the flexibility to the user to setnspinandnkindependently.