<div dir="ltr"><div>Hi,</div><div><br></div><div>generally speaking it would have been better to provide the input and output files, the more details are given, the more</div><div>complete the answer can be.</div><div><br></div><div>If you're carrying out a geometry optimization it is because you want to obtain reasonable bond lengths, lattice plane or</div><div>interlayer distances, and so on. Getting the last but not converged geometry might be reasonable when the code gets stuck</div><div>in the optimization loop providing small forces. The total force you obtain seems large. So i would definitely increase nstep,</div><div>set calculation = 'restart' and let pw.x complete the bfgs loop.</div><div><br></div><div>A relevant parameter would be also how energy is changing across the bfgs steps.</div><div><br></div><div>Giovanni</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><span style="color:rgb(0,0,0)">-- <br><br>Prof. Giovanni Cantele<br>Dipartimento di Fisica "Ettore Pancini"<br>Universita' degli Studi di Napoli "Federico II"<br>Complesso Universitario M. S. Angelo - Ed. 6<br>Via Cintia, I-80126, Napoli, Italy<br>e-mail: <a href="mailto:giovanni.cantele@unina.it" target="_blank">giovanni.cantele@unina.it</a><br>Phone: +39 081 676910<br><br>Web page: </span><a href="https://sites.google.com/view/giovanni-cantele/home" style="color:rgb(17,85,204)" target="_blank">https://sites.google.com/view/giovanni-cantele/home</a><br></div></div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Il giorno sab 10 gen 2026 alle ore 13:33 BINOY CHANDRA DEY via users <<a href="mailto:users@lists.quantum-espresso.org">users@lists.quantum-espresso.org</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p>Dear Quantum ESPRESSO Community,</p><p>I am currently performing a geometry optimization of a MoN/MoP₂ heterostructure and would appreciate your guidance regarding the convergence behavior I am observing.</p><p><strong>System construction:</strong><br>The heterostructure was built by cutting bulk MoN and MoP₂ into slabs using experimentally suggested Miller indices. The two slabs were stacked vertically along the z direction, with ~20 Å of vacuum added to avoid spurious interactions. The initial interlayer distance between the slabs was set to ~5 Å. All atoms were allowed to relax.</p><p><strong>Calculation details:</strong></p><ul><li><p><code>calculation = 'relax'</code></p></li><li><p>Ionic dynamics: BFGS</p></li><li><p>Dispersion correction: DFT-D3</p></li><li><p>Fixed cell (no <code>vc-relax</code>)</p></li><li><p><code>nstep = 50</code></p></li></ul><p><strong>Problem description:</strong><br>Although the SCF convergence is achieved smoothly at every ionic step (estimated SCF accuracy ~10⁻⁸ Ry), the geometry optimization does not converge within the specified number of BFGS steps. The run stops after reaching <code>nstep = 50</code>, without printing final relaxed coordinates.</p><p>At the last few ionic steps, the total energy continues to decrease monotonically; however, the total force remains relatively large (~0.063 Ry/Bohr), indicating that the structure is still far from force convergence.</p><p>Below I include excerpts from the last iterations for reference.</p><hr><p><strong>Penultimate BFGS step:</strong></p><pre><code>total energy = -3822.65535130 Ry
estimated scf accuracy < 0.00000009 Ry
convergence has been achieved in 32 iterations
number of scf cycles = 49
number of bfgs steps = 48
energy old = -3822.65309557 Ry
energy new = -3822.65535130 Ry
CASE: energy_new < energy_old
new trust radius = 0.5692417702 bohr
new conv_thr = 0.0000001320 Ry
Total force = 0.063444
</code></pre><p><strong>Final BFGS step (terminated due to nstep limit):</strong></p><pre><code>total energy = -3822.65857840 Ry
estimated scf accuracy < 0.00000010 Ry
convergence has been achieved in 40 iterations
number of scf cycles = 50
number of bfgs steps = 49
energy old = -3822.65535130 Ry
energy new = -3822.65857840 Ry
CASE: energy_new < energy_old
new trust radius = 0.4868398914 bohr
new conv_thr = 0.0000002314 Ry
Total force = 0.063444
</code></pre><p>The stress tensor is also printed, but since the calculation is a slab geometry with large vacuum and a fixed cell, I have not interpreted the stress as a convergence criterion.</p><p><strong>My questions are:</strong></p><ol><li><p>Is it physically reasonable to use the final BFGS geometry as the relaxed structure, even though the force convergence threshold has not been met?</p></li><li><p>Would simply increasing <code>nstep</code> and restarting the relaxation from the last configuration be sufficient, or is it strongly recommended to use selective dynamics (e.g., freezing bottom layers of the slabs) for such heterostructure systems?</p></li><li><p>Are there any best-practice strategies or parameter adjustments (e.g., force thresholds, trust radius, relaxation protocol) that you would recommend for improving convergence in slab-based heterostructure relaxations with large vacuum?</p></li></ol><p>Best regards,<br>Binoy Chandra Dey<br>Ph.D. Scholar<br>IIT Bhubaneswar</p></div>
<br>
<hr><font face="Verdana" size="1"><b>Disclaimer: </b>This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.</font>_______________________________________________________________________________<br>
The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.<br>
--------------------------------------------------------------------------------<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu" rel="noreferrer" target="_blank">www.max-centre.eu</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></blockquote></div>