When running a cell relaxation, it is sometimes nice to monitor what is going on with the cell parameters. If you run the cell relaxation with Quantum Espresso, you can use my python script “pw2cellvec” to parse all the information you need.
So, first of all, run a “vc-relax” calcuculation with a large (about 2 times bigger) cutoff for both wavefunction (ecutwfc) and charge (ecutrho) and wait for a couple of iterations. These calculations are very expensive, due to the large cutoffs.
Then, just run the script and you will get something like this:
For each iteration, three lines are printed:
- 1st one, starting with “AA”, contains the lattice parameters in Angstroms (Å) and the cell volume in Å3
- 2nd one, starting with “au”, the cell parameters in atomic units (bohr) and the “c/a” ratio (useful for copy/paste to a new input)
- 3rd one, the alpha, beta and gamma (α, β and γ) angles in degrees (°)
After the last iteration in the output (even if the calculation is still running), the lattice vectors (in Å) are printed. Useful, i.e. when we need them for something else.
Finally, a tip on how to visually check the convergence in real time. With the following command, you can check what is going on very quickly with gnuplot:
The previous command monitors cell parameter a and b for each iteration, but you can switch between columns 3, 5, and 7 for monitoring a, b and/or c.
The resulting plot for a and b looks like this: