[QE-developers] KCW: doubled nkstot after q /= 0 nscf calculation
Colonna Nicola (PSI)
nicola.colonna at psi.ch
Thu Aug 18 12:47:54 CEST 2022
Dear Jacob,
this is just because of the way QE handles the k and k+q points: in a LR calculation at finite q you need the KS states at k AND at k+q.
A non-SCF calculation is done to compute these states. In setup_nscf.90 (called by kcw_run_nscf) nkstot is doubled to reflect this need.
But this does not means that all of a sudden you have twice the number of k points. It's just the way the code indices the k and k+q points
for the NSCF calculation. The "correct" number of kpoint is stored in the global variable nksq (see kcw_initialize_ph.f90 or equivalently
PHONON/PH/initialize_ph.f90).
For the nkstot definition have a look at setup_nscf.f90 (in LR_Modules) and at set_kplusq.f90 (in PW/src) called by setup_nscf.f90
!----------------------------------------------------------------------------
SUBROUTINE setup_nscf ( newgrid, xq, elph_mat )
!----------------------------------------------------------------------------
!
! ... This routine initializes variables for the non-scf calculations at k
! ... and k+q required by the linear response calculation at finite q.
! ... In particular: finds the symmetry group of the crystal that leaves
! ... the phonon q-vector (xq) or the single atomic displacement (modenum)
! ... unchanged; determines the k- and k+q points in the irreducible BZ
! ... Needed on input (read from data file):
! ... "nsym" crystal symmetries s, t_rev, "nrot" lattice symetries "s"
! ... "nkstot" k-points in the irreducible BZ wrt lattice symmetry
! ... Produced on output:
! ... symmetries ordered with the "nsymq" phonon symmetries first
! ... "nkstot" k- and k+q-points in the IBZ calculated for the phonon sym.)
! ... Misc. data needed for running the non-scf calculation
Hope this help,
Nicola
-----------------------------------------------------
PAUL SCHERRER INSTITUT
Nicola S. Colonna
WHGA/150
CH-5232 Villigen-PSI
________________________________
Da: developers <developers-bounces at lists.quantum-espresso.org> per conto di Jacob Williams <jacob.z.williams at duke.edu>
Inviato: martedì 16 agosto 2022 22:18:37
A: developers at lists.quantum-espresso.org
Oggetto: [QE-developers] KCW: doubled nkstot after q /= 0 nscf calculation
Dear all,
I am working on the LOSC correction for DFT (extending doi:10.1103/PhysRevB.106.035147), with code that modifies the KCW module from QE 7.1. So, first, I’d like to thank the developers of KCW for their excellent work and for discovering a primitive-cell-periodic way to handle Wannier function densities, which had troubled my collaborator and me for some years.
I need to use nkstot == nk1 * nk2 * nk3 * nspin as part of the calculation analogous to screen_coeff.f90, after the Sternheimer equation calculations are finished. However, when nk1, nk2, and nk3 are all greater than 1, it seems that the routine kcw_run_nscf(), or perhaps the linear-response calculation of alpha, recalculates nkstot and in particular doubles it for q /= 0. (I can find this by printing nkstot to standard output at lines 108 and 253 respectively of KCW/src/screen_coeff.f90 and then executing KCW/examples/example01/run_example; I find that before the linear response calculation nkstot = 16, but after nkstot = 32.) Could you enlighten me as to why this change to nkstot occurs?
Sincerely yours,
Jacob Williams
Ph.D. candidate, Yang group
Vice President, Graduate Chemistry Council
Duke University Department of Chemistry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20220818/9766cb66/attachment.html>
More information about the developers
mailing list