<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi all, I'm currently trying to understand the exact method by which dipoles and quadrupoles are calculated in Quantum ESPRESSO, and while I understand the math for the actual generation of the dipole and quadrupole tensors, I am struggling when it comes to
how QE actually performs the charge density summation in the unit cell.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
>From what I can tell in <code>compute_dipole.f90</code>, the broad method by which the unit cell is iterated over involves using the linearly-indexed FFT grid (by that I mean the FFT grid indexing from 1-nnr) as the index for the summation loop and the charge
density at each point is used to contribute to the final dipole and quadrupole.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
What I don't understand is the conversion from the index <code>ir</code> to a 3D <code>
i,j,k</code> index, and then the operations in lines 63-67 that seem to convert the
<code>i,j,k</code> index to a 3D coordinate. It seems like there is some sort of conversion there between the FFT grid coordinate
<code>i,j,k</code> into what looks like a reciprocal space position, however I see the use of the real space lattice vectors
<code>at</code> in this, which would seem to indicate that this coordinate is in real space. Further convoluting things is subtracting out the "origin" point
<code>r0</code>, which seems to be supplied in real space (see <code>makov_payne.f90</code> lines 58-68), however immediately after this operation the coordinates are transformed from cartesian coordinates to crystallographic coordinates using the reciprocal
space lattice vectors, <code>bg</code>, as a basis. After this the operation <code>
r(:) = r(:) - ANINT( r(:) )</code> is performed, which seems to be the operation described in most papers on the minimum image convention (e.g. Dieters 2013). Then the coordinate is transformed back from crystallographic to cartesian coordinates, except this
time the basis for the transformation is the real space lattice vectors <code>at</code>. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I have tried reading through the comment in <code>fft_types.f90</code> for the function that converts from FFT index to 3D coordinate, however I am unsure of why
<code>tau</code> is specified in this comment as it seems that <code>tau</code> are the atomic positions and wouldn't be used in the manner that is described in that comment.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
If there are any papers that describe these processes (FFT index to 3D and the specific method for the minimum image convention in QE) or perhaps a set of equations that I could follow, I'd be happy to use them to further my understanding.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks, </div>
<div id="Signature" class="elementToProof">
<p class="elementToProof">Brock Dyer</p>
<div class="elementToProof" style="margin-top: 1em; margin-bottom: 1em;">Materials Theory, Modeling, and Simulation, Oak Ridge National Laboratory</div>
</div>
</body>
</html>