Rise your hand if you have ever gotten a pseudo-potential from somewhere and you started to use it just by checking the recommended values of the cutoffs inside the file.
Are we sure these values are good?
If you are an skeptic scientist and you do not thrust what you don’t do by yourself, now there is a really simple and cheap way for you to test for the optimum cutoff of any pseudopotential with Quantum Espresso: my pw_cutoff checking script.
The ecutwfc is described in the manual as the kinetic energy cutoff for wave functions in Ry.
So, when we make a Density Functional calculation with plane waves, the (electronic) wavefunction is represented as the infinite summation of plane waves, which must be truncated, in order to be able to handle them computationaly.
So, the more plane waves, the more accuracy, but also higher computational cost. The trick for speeding up the calculations relies on the fact that the plane waves with less kinetic energy (represented as ℏ2 / 2 m |k+G|2) have higher contribution to the totality, so the plane waves with lower energy are the most important. But, up to which point should we increase the cutoff, so that we get a good balance between computational cost and accuracy? That is precisely the optimum cutoff choice.
In the practice, this choice can be done just by calculating a single point (wavefunction optimization) at a range of energy cutoffs, and the best choice will be the one which shows really small changes in the total energy with respect to the cutoff.
This task is now automated with the pw_cutoff script.
Let’s make a quick check on the optimum cutoff for some pseudopotential.
It runs simply as:
where -f is the option for specifying the pseudo potential we want to test. For more options check the -h option.
From the following snapshot, it can be appreciated that the test runs quite fast (about 2 minutes) on a desktop computer (Intel i7/Ubuntu):
The script will try to find out if we are using ultra-soft pseudo potentials and use an special set of cutoff values in that case (lower ones). It will also pop up, and save a graph with the representation of the results looking like this one:
In this case, the script detected that the pseudo potential was ultra soft, and defined a set of cutoffs from 20 to 60 Ry.
As we can appreciate in the figure, the best choice for the ecutwfc value seems to be 40 Ry for this pseudo potential.
You should run this script for all the different pseudo potentials you are using in your polyatomic system, and set the ecutwfc to the highest value obtained.
In the next graph you can see the impact of the cutoff in the calculation time.
The time needed to complete the calculation in this case is actually bigger for the lower cutoffs. This is because the basis is so bad that the self consistent calculation needs more cycles in order to converge to the final result. But as it can be seen, the time increases after 40 Ry, so it is not worth to pay such a computational cost for such a tiny improvement in the result.
On the next “episode” of pw_cutoff I will probably write something to find the optimum cutoff for the charges (ecutrho) as well 🙂