3
$\begingroup$

As per my understandings the computer resources required for a DFT calculation increases by an order of three with the number of atoms.

But as you can see in the output files given below the Estimated total dynamical RAM for a 34 atom system's relax calculation is 5.64 GB.While in case of relax calculation for another system with 27 atoms it is 13.66 GB.

what might be the possible reasons?what are some effective strategies that I could use to decrease this Estimated total dynamical RAM ? .

Input file of 34 atom system input.in

output file of 34 atom system output.out

Input file of 27 atom system input.in

output file of 27 atom system output.out

$\endgroup$
4
  • 6
    $\begingroup$ You have two structures with not only different number of atoms, but also with different cell types, cell parameters and elements. Both structures have different amount of vacuum layer. For example, 27at structure has unit-cell volume = 20985 (a.u.)^3 while 34at structure has only 8163. All this can affect the memory needed for calculations. $\endgroup$
    – Victor
    Commented Apr 13 at 14:12
  • $\begingroup$ @Victor I guess this should be an answer than a comment. Could you elaborate it a little more and add this as an answer? $\endgroup$ Commented Apr 14 at 0:05
  • $\begingroup$ @Victor what might be some effective strategies that can be adopted to minimize the memory usage , without much compromising in the result accuracy? $\endgroup$ Commented Apr 14 at 4:49
  • 1
    $\begingroup$ I don’t know your materials, but you may try to decrease the thickness of vacuum layer, or start with smaller number of k-points… But you need to check how it affects the accuracy. $\endgroup$
    – Victor
    Commented Apr 15 at 8:38

1 Answer 1

6
$\begingroup$

When people talk about the scaling of a conventional DFT implementation being cubic with simulation size, they are talking about the computational time, not the RAM required. The RAM actually scales quadratically with simulation size, but in discussions of both the time and RAM required "size" does not directly mean "atoms".

Data objects and sizes

DFT simulations have lots of metadata and temporary work storage, which means that it is very difficult to understand accurately how much RAM is required for small calculations. Fortunately, the RAM needed for small simulations is quite low, and we're usually most interested in the RAM required for larger simulations, since that's where RAM limitations become an issue. For large real-space simulations, we will only need a very few k-points to achieve the desired accuracy, so in this discussion I will assume a single k-point and omit it from the sizes. I will also assume we don't need to consider spin, just to keep things simpler.

If we have $N_a$ atoms, $N_b$ bands and $N_p$ basis states (plane-waves for Quantum Espresso), then the main data objects in a DFT calculation (in terms of the amount of RAM) are:

  • The Kohn-Sham wavefunctions
    Size $O(N_p N_b)$; certain classes of calculation always lead to real wavefunctions in real-space, so this storage can change by a factor of two if your DFT software supports it (ABINIT is particularly good at this; CASTEP and QE do some automatically; VASP requires a separate binary).
  • The pseudopotential projectors
    Size $O(N_p N_a)$ in reciprocal-space
    ($O(N_a)$ in real-space, but very difficult to get accurate results)
  • Subspace matrices, e.g. the Hamiltonian
    Size $O(N_b^2)$

Scaling of data

You can see that all of these scale quadratically in terms of the "size" parameters, but only the pseudopotential projectors scale directly with the number of atoms. Clearly the number of bands is related to the number of atoms, since each atom has its own electrons, but you can also increase or decrease $N_b$ by changing the chemical elements you're simulating so it isn't as simple as just "the number of atoms".

For plane-wave bases (like QE, VASP, ABINIT and CASTEP), increasing the real-space simulation volume will increase $N_p$; increasing the number of atoms does not change $N_p$. (This is the opposite behaviour to local bases.)

Note that I've focused on conventional DFT, because you asked about QE; in linear-scaling DFT implementations the storage scaling with simulation size is linear!

Summary

In order to work out your total storage for a large simulation, you need to know:

  • $N_p$. The number of plane-waves depends on your cut-off energy and the simulation volume
  • $N_b$. The number of electrons depends on the number of atoms and their chemical elements, and any charge state you impose
  • $N_a$. The number of atoms and the number of pseudopotential projectors.
$\endgroup$
1
  • 1
    $\begingroup$ Thank you for this great answer. $\endgroup$ Commented Apr 16 at 5:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .