# How can I increase the default maximum limit on step size for convergence in quantum ESPRESSO?

When trying to manually optimise the geometry of the crystal, I've faced an issue wherein the code stopped the convergence process after just 100 steps (which was the default maximum). Is there a way to increase this?

If we need more than 100 iterations (the default maximum) to achieve convergence in the SCF calculation. To increase that number (let’s say, to 500), we need to add the following to the quantum-espresso input file:

&ELECTRONS
electron_maxstep = 500
/


Anoop's answer is correct. Since you mentioned you are optimizing geometry, I thought I would add a related option that may be useful. Sometimes it is worth trying:

scf_must_converge = .false.


also within the &ELECTRONS card, but only if you are having trouble with a single step in the geometry convergence. Sometimes when optimizing a structure, an intermediate step results in slow or no scf convergence, and allowing the code to just move past it often restores convergence in the following steps. Make sure this is the case by carefully checking the results if you use this option.