Hi Qi,<br /><br />I checked the attached input and output. The output was produced with CP2K 2024.2. In that version, kind-based collective variables nested inside COMBINE_COLVAR were not post-processed correctly. Consequently, the KINDS_FROM/KINDS_TO atom lists of the first COORDINATION remained empty, its value became NaN, and the numerical derivative code subsequently reported its 1.0E30 error sentinel.<br /><br />This was fixed in CP2K by PR #4128:<br />https://github.com/cp2k/cp2k/pull/4128<br /><br />The fix is included in CP2K 2025.2 and newer releases, so the preferred solution is to upgrade CP2K.<br /><br />As a workaround for CP2K 2024.2, replace the kind-based selection in the first nested COORDINATION by explicit atom indices:<br /><br /> ATOMS_FROM 1<br /> ATOMS_TO 2<br /><br />and remove KINDS_FROM/KINDS_TO there. In your input, atom 1 is Ge and atom 2 is Cl; the second nested COORDINATION already uses explicit indices.<br /><br />The attached energy file also shows that the MD itself continues for at least 50 steps; it is specifically the combined metadynamics CV that is NaN from step 0. I also verified that the existing upstream regression test for a nested kind-based COORDINATION inside COMBINE_COLVAR completes without NaNs on current CP2K.<br /><br />Best regards,<br />Thomas<div class="gmail_quote"><div dir="auto" class="gmail_attr">On Wednesday, May 27, 2026 at 4:11:30 PM UTC+2 Qi Zhang wrote:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi CP2K users,<p>I am running a Well-Tempered Metadynamics simulation, but it fails at the very first step (0.00000000 ps) with NaN in the metadynLog file.</p><p>Meanwhile, the stdout shows the following warning:</p><p>*** WARNING in colvar_methods.F:4530 :: ASSERTION (cond) failed at line ***<br>*** 4531 Error (0.100000E+31) in computing numerical ***<br>*** derivatives larger then(0.100000E-11) . ***</p><p> Here is how I defined my CV section (nesting two &COORDINATION blocks under &COMBINE_COLVAR):</p>&COLVAR<br> &COMBINE_COLVAR<br> &COLVAR<br> &COORDINATION<br> KINDS_FROM Ge<br> KINDS_TO Cl<br> R_0 [angstrom] 2.80<br> NN 12<br> ND 24<br> &END COORDINATION<br> &END COLVAR<br> &COLVAR<br> &COORDINATION<br> ATOMS_FROM 1<br> ATOMS_TO 3 5 7 9<br> R_0 [angstrom] 2.30<br> NN 12<br> ND 24<br> &END COORDINATION<br> &END COLVAR<br> FUNCTION CV2-CV1<br> VARIABLES CV1 CV2<br> &END COMBINE_COLVAR<br><p> &END COLVAR </p><p>Does anyone know what is causing this NaN and derivative error? How should I modify my input file to fix this issue and get the simulation running properly?</p><p>I have attached my full input (.inp) and output (.out) files for your reference.</p><p>Thank you for your help!</p><p>Best regards,</p><p>Qi Zhang</p></blockquote></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion visit <a href="https://groups.google.com/d/msgid/cp2k/437fa7d2-3d9d-46a0-ab4e-64d53fbd0742n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/437fa7d2-3d9d-46a0-ab4e-64d53fbd0742n%40googlegroups.com</a>.<br />