Closed gsavva closed 1 month ago
A simpler example that reproduces the above issue: CTi, a non-magnetic metallic system (CTi_inputs.zip)
Using the following:
hp.x
:
iverbosity = 4
nq1 = 2
nq2 = 2
nq3 = 2
perturb_only_atom(1) = .true. ! perturb only Ti
start_q = 2
last_q = 2
conv_thr_chi = 1.0000000000d-12
For q!=0 (hence start_q = 2
, last_q = 2
), the "RESPONSE OCCUPATION MATRICES", even in the 1st iteration, differ for Hubbard atom 1 spin 1
After investigation with @gcistaro, and inspecting ch_psi_all_k
from QE vs. Linear_response_operator::multiply()
from SIRIUS, we found out the following.
In QE, the index for the number of occupied bands is ikqs
(i.e. k+q): code line.
On the other hand, SIRIUS, only knows about the number of occupied bands at k
: code line
Even more strangely, the native QE cgsolve_all
(ref) gets nbnd_occ(ikk)
as input argument, but uses instead nbnd_occ (ikqs(ik))
from global scope ! (for which SIRIUS has no information about)
Commits by @gcistaro https://github.com/electronic-structure/SIRIUS/commit/eee2fa4fc9b7301f3be577ab00fd39ef6e0ef554 on the SIRIUS
side and https://github.com/electronic-structure/q-e-sirius/commit/fa45193dbd611796af7f8494d199247075732874 on the q-e-sirius
side should fix the problem. Testing underway...
issue fixed via PRs:
Using bulk Ni (ferromagnetic metal) from HP examples as use case, with NC-PP (Ni_inputs.zip).
The scf step (
pw.x
) is run by native QE 7.2.For q-grid = 1x1x1 (
nq1 = 1, nq2 = 1, nq3 = 1
), the calculated U value from nativeQE 7.2
andq-e-sirius
, agree perfectly:For non-zero q, the "RESPONSE OCCUPATION MATRICES" (enabled by
iverbosity = 4
), even in the 1st iteration differ for spin 2native QE
q-e-sirius
absolute difference
The "RESPONSE OCCUPATION MATRICES" are calculated by hp_dnsq, based on
dspi
, the output of the sirius_linear_solver