Closed gsavva closed 1 year ago
It's fetching of the magnetisation that is wrong. The total energies (and thus ground state) are identical. I'll check
The fix is easy
diff --git a/PW/src/electrons.f90 b/PW/src/electrons.f90
index cde64f349..4a47e8886 100644
--- a/PW/src/electrons.f90
+++ b/PW/src/electrons.f90
@@ -639,6 +639,7 @@ SUBROUTINE electrons_scf ( printout, exxen )
etot = etot + descf
ENDIF
+ CALL get_density_from_sirius()
IF ( lsda .OR. noncolin ) CALL compute_magnetization()
CALL print_energies ( printout )
There is one caveat. In the edge cases when G-vectors don't match completely the fetching of plane-wave coefficients will fail. There are two ways out of it: 1) introduce QE order of G-vectors in SIRIUS, or 2) fetch magnetisation and absolute magnetisation from SIRIUS. Both will require a small change in API. Second option is easy to implement. I can explain how to do it
3rd option is to fetch only the existing G-vectors. This is a most simple options.
This is fiexed but has to be tested on the QE side.
Quantum ESPRESSO and SIRIUS-enabled QE calculate different
total
andabsolute
magnetization for Ni.The input file is taken from the PW examples of QE:
qe/PW/examples/example01
Quantum ESPRESSO:
SIRIUS-enabled QE:
The input file, the pseudopotential used and the outputs from QE and SIRIUS are attached below. The output files contain all the information on the exact versions of QE and SIRIUS used.
Ni_in_out_pseudo.zip