Skip to content

Conversation

@maki49
Copy link
Collaborator

@maki49 maki49 commented Oct 20, 2024

In the spin-conserving unrestricted LR-TDDFT, the eigenvectors X are expanded by spin-up/down particle-hole pairs, and the dimension of the A matrix will be doubled, consisting of 4 different operator(block)s.

To support this, The LR-TDDFT code is massively refactored:

  • HamiltLR no longer inherits the Hamilt base class. It has its own hPsi function.
  • HSovlerLR has been removed , leaving only the solve function in namespace LR::HSolver.
  • The container of X is changed from Psi to ct::Tensor, and the interfaces of density matrix calculation (dm and AX) are all changed to transfer bare pointers.
  • The traversal of state(band) is moved outside from the act() interface to make the transition density matrix both "one-memory for multiple states" and "once-calculation for multiple operators".

@mohanchen mohanchen added the Features Needed The features are indeed needed, and developers should have sophisticated knowledge label Oct 22, 2024
@mohanchen mohanchen merged commit 0bac03f into deepmodeling:develop Oct 23, 2024
14 checks passed
@maki49 maki49 deleted the openshell branch October 30, 2024 08:04
Fisherd99 pushed a commit to Fisherd99/abacus-BSE that referenced this pull request Mar 31, 2025
* do not pass matrix in OperatorLRDiag

* spin-up/down nocc, nvirt, npairs

* spin up/down PotHxc

* move the psi wrapper into LR_Util

* refactor hsolver_lr

* change X from Psi to pointer in dm_trans and AX

* refactor HSolverLR and remove the inheritance of HamiltLR

* read/write value tool funcs

* store X with ct::Tensor instead of Psi

* use const ref instead of pointer for Parallel_2D

* key: ULR Hamilt & tear down HSolverLR

* pass spin-type to PotHxc

* rebase develop and update DM

* traverse states outside of act()

* fix a fatal bug of AX index

* remove nspin_solve

* openshell support for spectrum

* add parameter lr_unrestricted

* fix the parallel copy of eigenvectors

* enable complex spin2 and fix a parameter bug

* restrict DM size within orb_rcut

* remove band-traverse and recover RI-benchmark

* update LR cases: cover spin2 and dav_subspace

* add a test case for open-shell solver

* fix compile error

* minor fixes

---------

Co-authored-by: Mohan Chen <mohanchen@pku.edu.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Features Needed The features are indeed needed, and developers should have sophisticated knowledge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants