<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"CMU Bright Roman";
panose-1:2 0 6 3 0 0 0 0 0 0;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:10pt;color:#000000;font-family:Helvetica,Arial,sans-serif;" dir="ltr">
<p>Dear Jacob,</p>
<p><br>
</p>
<p> 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.</p>
<p> 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.<br>
</p>
<p> 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</p>
<p> for the NSCF calculation. The "correct" number of kpoint is stored in the global variable nksq (see
<span>kcw_initialize_ph.f90</span> or equivalently <br>
</p>
<p> PHONON/PH/initialize_ph.f90). <br>
</p>
<p><br>
</p>
<p> For the nkstot definition have a look at <span>setup_nscf.f90 (in LR_Modules) and
<span>at set_kplusq.f90</span></span> (in PW/src) called by setup_nscf.f90 <br>
</p>
<p><br>
</p>
<div>!----------------------------------------------------------------------------<br>
SUBROUTINE setup_nscf ( newgrid, xq, elph_mat )<br>
!----------------------------------------------------------------------------<br>
!<br>
! ... This routine initializes variables for the non-scf calculations at k<br>
! ... and k+q required by the linear response calculation at finite q.<br>
! ... In particular: finds the symmetry group of the crystal that leaves<br>
! ... the phonon q-vector (xq) or the single atomic displacement (modenum)<br>
! ... unchanged; determines the k- and k+q points in the irreducible BZ<br>
! ... Needed on input (read from data file):<br>
! ... "nsym" crystal symmetries s, t_rev, "nrot" lattice symetries "s"<br>
! ... "nkstot" k-points in the irreducible BZ wrt lattice symmetry<br>
<b>! ... Produced on output:<br>
! ... symmetries ordered with the "nsymq" phonon symmetries first<br>
! ... "nkstot" k- and k+q-points in the IBZ calculated for the phonon sym.)<br>
! ... Misc. data needed for running the non-scf calculation</b><br>
<br>
</div>
<p></p>
<div><br>
</div>
<div> Hope this help,</div>
<div><br>
</div>
<div>Nicola<br>
</div>
<p><br>
</p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div><font face="Helvetica"><span dir="ltr" id="divtagdefaultwrapper" style="font-size:12pt"><span style="font-size:13px"><span style="font-size:13px"><span style="font-size:13px">-----------------------------------------------------</span></span></span></span></font></div>
<font face="Helvetica"></font>
<div><font face="Helvetica"><span dir="ltr" id="divtagdefaultwrapper" style="font-size:12pt"><span style="font-size:13px"><span style="font-size:13px"><span style="font-size:13px"><font color="black"><span style="text-transform:none"><font color="black"><font color="black"><span style="font-weight:normal">PAUL
SCHERRER INSTITUT</span></font></font></span></font></span></span></span></span></font></div>
<font face="Helvetica"></font>
<div><font face="Helvetica"><span dir="ltr" id="divtagdefaultwrapper" style="font-size:12pt"><span style="font-size:13px"><span style="font-size:13px"><span style="font-size:13px"></span></span></span></span></font></div>
<font face="Helvetica"><span dir="ltr" id="divtagdefaultwrapper" style="font-size:12pt"><span style="font-size:13px"><span style="font-size:13px"><span style="font-size:13px">Nicola S. Colonna</span></span></span></span><br>
</font><font style="font-family:Calibri,Helvetica,sans-serif,serif,"EmojiFont"" size="3" face="Calibri,Helvetica,sans-serif" color="black"><span dir="ltr" id="divtagdefaultwrapper" style="font-size:12pt"><font style="font-family:Tahoma,serif,"EmojiFont"" size="1" face="Tahoma"><span style="font-size:13px"><font style="font-family:Tahoma,serif,"EmojiFont"" size="1" face="Tahoma"><span style="font-size:13px"><font style="font-family:Tahoma,serif,"EmojiFont"" size="1" face="Tahoma"><span style="font-size:13px"><font face="Helvetica"><span style="text-transform:none"><font color="black"><font color="black"><font style="font-family:Helvetica,serif,"EmojiFont"" face="Helvetica" color="black"><span style="font-weight:normal"><font face="Helvetica"></font>
<div style="text-indent:0"><font face="Helvetica">WHGA/150<br>
CH-5232 Villigen-PSI</font></div>
</span></font></font></font></span></font></span></font></span></font></span></font></span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Da:</b> developers <developers-bounces@lists.quantum-espresso.org> per conto di Jacob Williams <jacob.z.williams@duke.edu><br>
<b>Inviato:</b> martedě 16 agosto 2022 22:18:37<br>
<b>A:</b> developers@lists.quantum-espresso.org<br>
<b>Oggetto:</b> [QE-developers] KCW: doubled nkstot after q /= 0 nscf calculation</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman"">Dear all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman"">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman"">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman";color:black">Sincerely yours,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman";color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman";color:black">Jacob Williams<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman";color:black">Ph.D. candidate, Yang group<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman";color:black">Vice President, Graduate Chemistry Council<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"CMU Bright Roman";color:black">Duke University Department of Chemistry
</span></p>
</div>
</div>
</body>
</html>