it's in SUBROUTINE realspace_grid_init  in  FFTXlib/src/file fft_types.f90

        !
         ! ... calculate the size of the real-space dense grid for FFT
         ! ... first, an estimate of nr1,nr2,nr3, based on the max values
         ! ... of n_i indices in:   G = i*b_1 + j*b_2 + k*b_3
         ! ... We use G*a_i = n_i => n_i .le. |Gmax||a_i|
         !
         dfft%nr1 = int ( sqrt (gcutm) * sqrt (at(1, 1)**2 + at(2, 1)**2 + at(3, 1)**2) ) + 1          dfft%nr2 = int ( sqrt (gcutm) * sqrt (at(1, 2)**2 + at(2, 2)**2 + at(3, 2)**2) ) + 1          dfft%nr3 = int ( sqrt (gcutm) * sqrt (at(1, 3)**2 + at(2, 3)**2 + at(3, 3)**2) ) + 1

stefano



On 27/02/25 20:11, Dyer, Brock wrote:
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.

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'.

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.

Thanks in advance for the help!

Brock Dyer, Ursinus College Class of 2025



_______________________________________________________________________________
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 (www.max-centre.eu)
users mailing listus...@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users
_______________________________________________________________________________
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 (www.max-centre.eu)
users mailing list users@lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users

Reply via email to