# Does the size of atoms influence the speed of DFT calculations when comparing systems with almost the same number of atoms

How does the size of atoms within a structure influence the speed of DFT (Density Functional Theory) calculations? considering that the calculation speed is known to scale cubically with the number of atoms? If I aim to estimate the calculation speed of two systems with different types of atoms but similar numbers of atoms, how can I approximate this?

For local basis set software, the size of the atoms should not affect anything, only the number of electrons; however, I note that your example software tags (VASP and QE) are plane-wave based. In plane-wave DFT, the number of plane-waves depends on the simulated volume, and since larger atoms will usually mean more simulated volume the calculation time would increase.

The question refers to the time scaling cubically with system size, but this can be misleading. Firstly, this cubic scaling can be avoided for systems with a band-gap, if your software exploits the short-ranged nature of the density matrix. Examples of linear-scaling materials modelling DFT software include CONQUEST and ONETEP, and several other DFT packages (e.g. SIESTA) also have linear-scaling modes.

Secondly, within the specific context of plane-wave-based DFT software (e.g. ABINIT, CASTEP, QE or VASP) the scaling is cubic with simulation "size" but different parts of the calculation scale in different ways. For example, for a calculation with $$N_p$$ plane-waves, $$N_b$$ bands and $$N_k$$ k-points:

• Constructing subspace matrices (Hamiltonian, overlap etc)
Matrices such as $$H_{nmk} = \langle \psi_{nk}\vert\hat{H}_k\vert\psi_{mk}\rangle \tag{1}$$ require inner products between all pairs of bands. This scales as $$\sim N_p N_b^2 N_k$$.

• Diagonalising subspace matrices
E.g. diagonalising $$\{\matrix{H}_k\}$$ to find the eigenvalues (and, hence, occupancies) of the states. This scales as $$\sim N_b^3 N_k$$.

• Applying the non-local potential in reciprocal space
The total number of non-local pseudopotential projectors depends on the pseudopotential, but once that choice is made it scales with the number of atoms, $$N_a$$, giving an overall scaling $$\sim N_p N_a N_b N_k$$

• (Fast) Fourier Transforming $$\psi_n$$
E.g. to construct the density or apply the local potential. Every Kohn-Sham state has to be transformed, so this scales as $$\sim N_p \log{N_p}N_bN_k$$.

Note that direct scaling with system volume is not cubic, most terms are linear in $$N_p$$ (the FFT has slightly worse scaling $$N_p \log{N_p}$$, and subspace diagonalisations are unchanged). In order for increased simulation volume to cause a cubic scaling, the number of simulated electrons (bands) would also need to increase, which would be true when simulating a supercell (for example), but not if you simply increase a vacuum gap between slabs, wires or nanoparticles.

In contrast, scaling with the number of electrons (bands) affects each part in different ways, with direct subspace diagonalisation scaling as $$N_b^3$$ (i.e. cubic scaling), but construction of those matrices scaling as $$N_b^2$$ (i.e. quadratic scaling) and the FFTs scaling as $$N_b$$.

One complication is that as simulation volume increases, the number of k-points required decreases (since a larger real-space simulation cell means a smaller reciprocal-space simulation cell, so fewer sampling points are quired). Thus the "cubic scaling" only actually happens if the number of bands $$N_b$$ is increased for fixed volume, or when the size is so large that $$N_k=1$$.

• Thank you for the answer Commented May 12 at 16:57