<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks, Tom. This was then my misuderstanding of the explanation of force components, rather being those in the forces.f90 module. </div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Much appreciated,<br>
Adam</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> users <users-bounces@lists.quantum-espresso.org> on behalf of Tom Demeyere via users <users@lists.quantum-espresso.org><br>
<b>Sent:</b> 04 January 2024 1:34 AM<br>
<b>To:</b> Quantum ESPRESSO users Forum <users@lists.quantum-espresso.org><br>
<b>Subject:</b> Re: [QE-users] forc conv thr not converging force components?</font>
<div> </div>
</div>
<div style="line-break:after-white-space">
<table border="0" cellspacing="0" cellpadding="0" align="left" width="100%">
<tbody>
<tr>
<td style="background-color:#ffeb9c; width:10%; border:1px solid #ffeb9c; padding:2pt; border-style:solid; border-color:#9c6500">
<b>CAUTION:</b> This email originated from outside the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.</td>
</tr>
</tbody>
</table>
<br>
<div>
<div>If my memory serves me correctly “forc_conv_thr" does not correspond to the max forces on any atoms, I don’t remember exactly how it is calculated but it is a more complex expression. </div>
<div><br>
</div>
By experience it is not always possible to reach very low forces on all atoms, especially if you are using some functional/corrections where the forces are not always perfectly consistent with the energy.
<div><br>
</div>
<div>If you made sure that conv_thr is small enough so that non-scf correction to the forces is extremely small you might want to call pw.x as an energy/forces evaluator and interface it with a more specialised optimiser. Scipy(L)BFGS often does the trick for
me.
<div>
<div><br id="x_lineBreakAtBeginningOfMessage">
<div>
<div>-----------------------------------------<br>
Tom Demeyere MSc<br>
PhD student<br>
Skylaris Research Group<br>
School of Chemistry, University of Southampton<br>
</div>
</div>
<div><br>
<blockquote type="cite">
<div>On 28 Dec 2023, at 16:39, Adam Michalchuk <a.a.l.michalchuk@bham.ac.uk> wrote:</div>
<br class="x_Apple-interchange-newline">
<div>
<table border="0" cellspacing="0" cellpadding="0" width="100%" align="left" style="font-family:Helvetica; letter-spacing:normal; orphans:auto; text-transform:none; widows:auto; word-spacing:0px; text-decoration:none; border:0px; display:table; width:1005px; table-layout:fixed; float:none">
<tbody style="display:block">
<tr>
<td valign="middle" width="1px" bgcolor="#A6A6A6" cellpadding="7px 2px 7px 2px" style="padding:7px 2px; background-color:rgb(166,166,166)">
</td>
<td valign="middle" width="100%" bgcolor="#EAEAEA" cellpadding="7px 5px 7px 15px" style="width:971px; background-color:rgb(234,234,234); padding:7px 5px 7px 15px; font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size:12px; font-weight:normal; color:rgb(33,33,33); text-align:left">
<div>You don't often get email from<span class="x_Apple-converted-space"> </span><a href="mailto:a.a.l.michalchuk@bham.ac.uk">a.a.l.michalchuk@bham.ac.uk</a>.<span class="x_Apple-converted-space"> </span><a href="https://aka.ms/LearnAboutSenderIdentification">Learn
why this is important</a></div>
</td>
<td valign="middle" align="left" width="75px" bgcolor="#EAEAEA" cellpadding="7px 5px 7px 5px" style="width:75px; background-color:rgb(234,234,234); padding:7px 5px; font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size:12px; font-weight:normal; color:rgb(33,33,33); text-align:left">
</td>
</tr>
</tbody>
</table>
<div style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div style="padding-bottom:10px; padding-top:5px">
<div style="padding:12px; border:1px solid rgb(141,57,112); background-color:rgb(247,249,250); color:rgb(141,57,112); font-size:14px; line-height:22px; font-family:Calibri,Arial,Helvetica,sans-serif">
<strong>CAUTION:</strong><span class="x_Apple-converted-space"> </span>This e-mail originated outside the University of Southampton.</div>
</div>
<div>
<div class="x_elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
Dear all, </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
I appreciate this topic has been discussed a number of times in the forum, with the answer that all components of all forces should satisfy the forc_conv_thr. This leads me to my probably very simple query that likely stems from a misunderstanding. </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
<br>
</div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
when I run a vc-relax calculation with e.g. a very tight forc_conv_thr=<span style="background-color:rgb(255,255,0)">1.0D-5</span>, my calculation finishes 'successfully' with e.g.:</div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> </span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 1 type 3 force = 0.00000250 0.00000250 0.00000250</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 2 type 3 force = 0.00000432 0.00000559 0.00000432</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 3 type 3 force = 0.00000432 0.00000432 0.00000559</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 4 type 3 force = 0.00000559 0.00000432 0.00000432</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 5 type 2 force = -0.00000391 0.00000100 0.00000100</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 6 type 2 force = 0.00000361 -</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)">0.00001336
<span class="x_Apple-converted-space"> </span></span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">-0.00001336</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 7 type 2 force = 0.00000100 -0.00000391 0.00000100</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 8 type 2 force = 0.00000100 0.00000100 -0.00000391</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 9 type 2 force = </span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)"> -0.00001336</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
-</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)">0.00001336 </span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">0.00000361</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 10 type 2 force = </span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)"> -0.00001336</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">
0.00000361 -</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)">0.00001336</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">even if I put rather ridiculous thresholds of forc_conv_thr=1.0D-7 it makes no real difference to the force components:</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 1 type 3 force = -0.00000456 -0.00000456 -0.00000456</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 2 type 3 force = 0.00000832 </span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)">0.00001867
</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">0.00000832</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 3 type 3 force = 0.00000832 0.00000832 0.00001867</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 4 type 3 force = <span class="x_Apple-converted-space"> </span></span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)">0.00001867
</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">0.00000832 0.00000832</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 5 type 2 force = -0.00000414 -0.00000409 -0.00000409</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"> atom 6 type 2 force = -0.00000040 -</span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; background-color:rgb(255,255,0)">0.00004042
<span class="x_Apple-converted-space"> </span></span><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">-0.00004042</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">If I understand the output correctly, it appears as though some force components have converged fine, though quite
a few components have not reached the threshold, and changing the threshold makes little difference. As we do a lot of work on vibrational dynamics in dispersion bound crystals, tight forces are usually quite important. We've recently moved into using QE and
I'm trying to get to grips with how to control the forces in QE optimisations but am clearly missing something. Could anybody please point me in the right direction? </span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">Many thanks in advance,</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt">Adam</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div style="direction:ltr"><span style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt"><br>
</span></div>
<div id="x_x_Signature">
<div style="margin:0px 0cm; font-family:Calibri,sans-serif; font-size:11pt"><span style="color:rgb(67,67,67)"> Adam Michalchuk </span></div>
<div style="margin:0cm; font-family:Calibri,sans-serif; font-size:11pt"><span style="color:rgb(64,64,64)">University of Birmingham UK</span></div>
<div style="margin:0cm; font-family:Calibri,sans-serif; font-size:11pt"><span style="font-family:Calibri,Arial,Helvetica,sans-serif"><br>
</span></div>
</div>
</div>
</div>
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">The
Quantum ESPRESSO community stands by the Ukrainian</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">people
and expresses its concerns about the devastating</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">effects
that the Russian military offensive has on their</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">country
and on the free and peaceful scientific, cultural,</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">and
economic cooperation amongst peoples</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">Quantum
ESPRESSO is supported by MaX (</span><a href="http://www.max-centre.eu/" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">www.max-centre.eu</a><span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">)</span><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">users
mailing list<span class="x_Apple-converted-space"> </span></span><a href="mailto:users@lists.quantum-espresso.org" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">users@lists.quantum-espresso.org</a><br style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" style="font-family:Helvetica; font-size:14px; font-style:normal; font-variant-caps:normal; font-weight:400; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">https://lists.quantum-espresso.org/mailman/listinfo/users</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>