[QE-developers] KCW: doubled nkstot after q /= 0 nscf calculation
Jacob Williams
jacob.z.williams at duke.edu
Thu Aug 18 17:35:15 CEST 2022
Dear Nicola,
Thank you very much; this is exactly what I needed to learn. Cheers!
Sincerely yours,
Jacob Williams
Ph.D. candidate, Yang group
Duke University Department of Chemistry
From: developers <developers-bounces at lists.quantum-espresso.org> on behalf of Colonna Nicola (PSI) <nicola.colonna at psi.ch>
Date: Thursday, August 18, 2022 at 6:48 AM
To: developers at lists.quantum-espresso.org <developers at lists.quantum-espresso.org>
Subject: Re: [QE-developers] KCW: doubled nkstot after q /= 0 nscf calculation
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/52c59cd7/attachment-0001.html>
More information about the developers
mailing list