ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
deltaspin_lcao_mi.h File Reference

LCAO-specific magnetic-moment calculation for DeltaSpin, expressed as free functions over ScState. More...

Go to the source code of this file.

Detailed Description

LCAO-specific magnetic-moment calculation for DeltaSpin, expressed as free functions over ScState.

Purpose
Holds the LCAO-only half of the DeltaSpin Mi pipeline that used to live as SpinConstrain member functions:
  • cal_mi_lcao(): moments via the DeltaSpin operator on the density matrix
  • convert()/calculate_MW(): moments via the orbital multiplication matrix (alternative/debug path)
  • collect_MW(): accumulate mu*density-matrix contributions (ScaLAPACK)

Keeping these as free functions decouples the LCAO path from the SpinConstrain singleton: the only inputs are the constraint state (ScState), the LCAO operator, the density matrix and the parallel orbitals mapping.