Skip to content

Commit bc05444

Browse files
authored
Fix: calculate magnetic moments with onsite_radius>0 (#6024)
1 parent 06df0ee commit bc05444

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/module_io/output_mulliken.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void cal_mag(Parallel_Orbitals* pv,
138138
auto sc_lambda
139139
= new hamilt::DeltaSpin<hamilt::OperatorLCAO<TK, double>>(nullptr,
140140
kv.kvec_d,
141-
nullptr,
141+
dynamic_cast<hamilt::HamiltLCAO<TK, double>*>(p_ham)->getHR(),
142142
ucell,
143143
&gd,
144144
two_center_bundle.overlap_orb_onsite.get(),
@@ -164,7 +164,7 @@ void cal_mag(Parallel_Orbitals* pv,
164164
auto sc_lambda = new hamilt::DeltaSpin<hamilt::OperatorLCAO<std::complex<double>, std::complex<double>>>(
165165
nullptr,
166166
kv.kvec_d,
167-
nullptr,
167+
dynamic_cast<hamilt::HamiltLCAO<std::complex<double>, std::complex<double>>*>(p_ham)->getHR(),
168168
ucell,
169169
&gd,
170170
two_center_bundle.overlap_orb_onsite.get(),

0 commit comments

Comments
 (0)