<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>it's in SUBROUTINE realspace_grid_init  in  FFTXlib/src/file
      fft_types.f90<br>
    </p>
    <p>        !<br>
               ! ... calculate the size of the real-space dense grid for
      FFT<br>
               ! ... first, an estimate of nr1,nr2,nr3, based on the max
      values<br>
               ! ... of n_i indices in:   G = i*b_1 + j*b_2 + k*b_3<br>
               ! ... We use G*a_i = n_i => n_i .le. |Gmax||a_i|<br>
               !<br>
               dfft%nr1 = int ( sqrt (gcutm) * sqrt (at(1, 1)**2 + at(2,
      1)**2 + at(3, 1)**2) ) + 1<br>
               dfft%nr2 = int ( sqrt (gcutm) * sqrt (at(1, 2)**2 + at(2,
      2)**2 + at(3, 2)**2) ) + 1<br>
               dfft%nr3 = int ( sqrt (gcutm) * sqrt (at(1, 3)**2 + at(2,
      3)**2 + at(3, 3)**2) ) + 1<br>
      <br>
    </p>
    <p>stefano</p>
    <p><br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 27/02/25 20:11, Dyer, Brock wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:PH7PR22MB3661BC69230771632662EA09CFCD2@PH7PR22MB3661.namprd22.prod.outlook.com">
      
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
        Hello all, I have been working quite a bit lately on automating
        my QE workflow, and as part of that workflow I check the
        automatically calculated FFT grid sizes for the level of theory
        that I have been using in order to improve my parallelization. </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 tracing down and reading the code that calculates
        the FFT grid sizes, however I cannot find/understand the actual
        code to calculate the grid sizes. My current understanding is
        that the initial parameters to calculate the grid size are
        'ecutwfc' and/or 'ecutrho', and the unit cell size, and then
        there seems to be some more math, and perhaps at the end the
        final dimensions get calculated in 'fft_ggen.f90'. </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 am looking for ideally is a mathematical formula that
        includes all of the input parameters and operations required to
        calculate the FFT grid sizes so that I can implement it into my
        workflow and hopefully not have to run double calculations to
        properly parallelize.</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 in advance for the help!</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 id="Signature" style="color: inherit;">
        <p>Brock Dyer, Ursinus College Class of 2025</p>
        <p><br>
        </p>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________________________________________
The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.
--------------------------------------------------------------------------------
Quantum ESPRESSO is supported by MaX (<a class="moz-txt-link-abbreviated" href="http://www.max-centre.eu">www.max-centre.eu</a>)
users mailing list <a class="moz-txt-link-abbreviated" href="mailto:users@lists.quantum-espresso.org">users@lists.quantum-espresso.org</a>
<a class="moz-txt-link-freetext" href="https://lists.quantum-espresso.org/mailman/listinfo/users">https://lists.quantum-espresso.org/mailman/listinfo/users</a></pre>
    </blockquote>
  </body>
</html>