Good morning Marcella,<div>Thank you so much for your reply. Indeed, I am not actually too sure why I would like to use a Lagrange scheme. Initially, I had employed a Lagrange scheme for the CVs as it had reminded me of the treatment of CP-MD with regards to electron dynamics (I realise now that the 373K refers to this auxillary temperature, much like "electron temperature" in CP-MD). I switched to a non Lagrange scheme just now and can see that the number of columns have reduced. Should I wish to continue with a Lagrangian scheme, I assume my choice of mass and lambda should be optimised such that the auxiliary CV and the instantaneous CV are sufficiently similar (of course, without just setting lambda to a large number...)? For context, I am interested in carbonation reactions of underground wellbores, hence my choice of NVT reflects that the system I am modelling is effectively a thermal reservoir with respect to the computational cell and not subject to cell expansion/compression. I will spend some more time reading the literature before giving it another go, I will stick with the direct metadynamics method for now, and I will repost on to this thread with my latest scripts as soon as I can get it working for the benefit of anyone reading this in the future...</div><div>Thank you again, your insight is invaluable!</div><div>Kindest regards,</div><div>James</div><div><br /></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Tuesday, 15 April 2025 at 08:59:22 UTC+1 Marcella Iannuzzi 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;">Der very confused man,<div><br></div><div>You have activated the Lagrangian MTD scheme ... I hope you know why you want to use this scheme.</div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">With this scheme, an auxiliary variable is associated to each CV, and when the biasing potential is added, it is defined as function of the auxiliary variables rather than of the CVs. The auxiliary variable behaves as additional degree of freedom. Therefore, an inertial mass is associated to it and its dynamics is determined by integrating the same type of equations of motion as for all the other degrees of freedom. The variable is coupled to the corresponding CV through a harmonic potential, and the forces acting on it are those derived from the harmonic potential and from the MTD biasing potential, when it is present. </span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">input section, two additional parameters are needed, which are the mass of the auxiliary variable and the coupling constant for the harmonic potential: lambda.</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">A temperature is associated to the auxiliary variables and can be controlled by temperature rescaling. The use of thermostats for such few degrees of freedom is questionable. The Lagrangian MTD formalism is used in order to better control the kinetics of the CV. This control is obtained through the coupled to the auxiliary variables, whose dynamics depends on the mass and the temperature, besides the intensity of two contribution to the force. Hence, by tuning properly the coupling constant and the mass, the desired effect can be obtained. This might become important in order to collect the correct probability distribution in the configurations space defined by the CV, it is important that the system visits all the accessible conformations. </span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"><br></span></div><div><font color="#333333" face="Arial, sans-serif"><span>If lambda =0 or very small, METAVAR and CV are not coupled and METAVAR is a rather parameter moved only by the MTD potential and the kinetic term. If lambda large (1 is large) METAVAR=CV and there is no point of running Lagrangian MTD.</span></font></div><div><font color="#333333" face="Arial, sans-serif"><span><br></span></font></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">When such Lagrangian scheme is used more columns appear in the </span><span title="COLlective VARiable" style="border-bottom-width:1px;border-bottom-style:dotted;border-bottom-color:currentcolor;color:rgb(51,51,51);font-family:Arial,sans-serif">COLVAR</span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">, which contain all the relevant information. The 1st column is always the time in fs, the next </span><span style="display:contents;font-family:Arial,sans-serif"></span><span role="presentation" style="white-space:nowrap;display:inline-block;line-height:0;font-size:16.379999px;font-size-adjust:none;float:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px;color:rgb(51,51,51);font-family:Arial,sans-serif"><span aria-hidden="true" style="display:inline-block;border-collapse:separate;border-spacing:0px"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw;padding-top:0.491em;padding-bottom:0.308em;padding-right:0.085em;box-sizing:content-box">N</span></span></span><span style="display:inline-block;font-size:11.580659px;vertical-align:-0.23em;padding-right:0.071em;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-main-R,MJXc-TeX-main-Rw;padding-top:0.43em;padding-bottom:0.369em;box-sizing:content-box">CV</span></span></span></span></span></span></span></span></span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> columns are the instantaneous values of the auxiliary variables, followed by </span><span style="display:contents;font-family:Arial,sans-serif"></span><span role="presentation" style="white-space:nowrap;display:inline-block;line-height:0;font-size:16.379999px;font-size-adjust:none;float:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px;color:rgb(51,51,51);font-family:Arial,sans-serif"><span aria-hidden="true" style="display:inline-block;border-collapse:separate;border-spacing:0px"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw;padding-top:0.491em;padding-bottom:0.308em;padding-right:0.085em;box-sizing:content-box">N</span></span></span><span style="display:inline-block;font-size:11.580659px;vertical-align:-0.23em;padding-right:0.071em;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-main-R,MJXc-TeX-main-Rw;padding-top:0.43em;padding-bottom:0.369em;box-sizing:content-box">CV</span></span></span></span></span></span></span></span></span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> columns where the instantaneous values of the CVs are reported. The next columns report the values of the potential gradients: </span><span style="display:contents;font-family:Arial,sans-serif"></span><span role="presentation" style="white-space:nowrap;display:inline-block;line-height:0;font-size:16.379999px;font-size-adjust:none;float:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px;color:rgb(51,51,51);font-family:Arial,sans-serif"><span aria-hidden="true" style="display:inline-block;border-collapse:separate;border-spacing:0px"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw;padding-top:0.491em;padding-bottom:0.308em;padding-right:0.085em;box-sizing:content-box">N</span></span></span><span style="display:inline-block;font-size:11.580659px;vertical-align:-0.23em;padding-right:0.071em;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-main-R,MJXc-TeX-main-Rw;padding-top:0.43em;padding-bottom:0.369em;box-sizing:content-box">CV</span></span></span></span></span></span></span></span></span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> columns for the gradients of the harmonic potential, </span><span style="display:contents;font-family:Arial,sans-serif"></span><span role="presentation" style="white-space:nowrap;display:inline-block;line-height:0;font-size:16.379999px;font-size-adjust:none;float:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px;color:rgb(51,51,51);font-family:Arial,sans-serif"><span aria-hidden="true" style="display:inline-block;border-collapse:separate;border-spacing:0px"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw;padding-top:0.491em;padding-bottom:0.308em;padding-right:0.085em;box-sizing:content-box">N</span></span></span><span style="display:inline-block;font-size:11.580659px;vertical-align:-0.23em;padding-right:0.071em;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-main-R,MJXc-TeX-main-Rw;padding-top:0.43em;padding-bottom:0.369em;box-sizing:content-box">CV</span></span></span></span></span></span></span></span></span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> for the gradients of the MTD biasing potential, and </span><span style="display:contents;font-family:Arial,sans-serif"></span><span role="presentation" style="white-space:nowrap;display:inline-block;line-height:0;font-size:16.379999px;font-size-adjust:none;float:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px;color:rgb(51,51,51);font-family:Arial,sans-serif"><span aria-hidden="true" style="display:inline-block;border-collapse:separate;border-spacing:0px"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw;padding-top:0.491em;padding-bottom:0.308em;padding-right:0.085em;box-sizing:content-box">N</span></span></span><span style="display:inline-block;font-size:11.580659px;vertical-align:-0.23em;padding-right:0.071em;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-main-R,MJXc-TeX-main-Rw;padding-top:0.43em;padding-bottom:0.369em;box-sizing:content-box">CV</span></span></span></span></span></span></span></span></span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> for the gradient of the WALL potential (these are zeros when the corresponding potential is not activated). The following </span><span style="display:contents;font-family:Arial,sans-serif"></span><span role="presentation" style="white-space:nowrap;display:inline-block;line-height:0;font-size:16.379999px;font-size-adjust:none;float:none;direction:ltr;max-width:none;max-height:none;min-width:0px;min-height:0px;border:0px;margin:0px;padding:1px 0px;color:rgb(51,51,51);font-family:Arial,sans-serif"><span aria-hidden="true" style="display:inline-block;border-collapse:separate;border-spacing:0px"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-math-I,MJXc-TeX-math-Ix,MJXc-TeX-math-Iw;padding-top:0.491em;padding-bottom:0.308em;padding-right:0.085em;box-sizing:content-box">N</span></span></span><span style="display:inline-block;font-size:11.580659px;vertical-align:-0.23em;padding-right:0.071em;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:inline-block;box-sizing:content-box"><span style="display:block;white-space:pre;font-family:MJXc-TeX-main-R,MJXc-TeX-main-Rw;padding-top:0.43em;padding-bottom:0.369em;box-sizing:content-box">CV</span></span></span></span></span></span></span></span></span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> are the velocities of the auxiliary variables. Then there are the instantaneous values of the harmonic potential, of the MTD potential, and of the WALL potential. The last column is the temperature of the auxiliary variables.</span></div><div><font color="#333333" face="Arial, sans-serif"><span><br></span></font></div><div><font color="#333333" face="Arial, sans-serif"><span>HTH</span></font></div><div><font color="#333333" face="Arial, sans-serif"><span>Regards</span></font></div><div><font color="#333333" face="Arial, sans-serif"><span>Marcella<br></span></font><br></div><div class="gmail_quote"><div dir="auto" class="gmail_attr">On Monday, April 14, 2025 at 11:34:43 AM UTC+2 <a href data-email-masked rel="nofollow">jhans...@gmail.com</a> 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">Good morning CP2K community,<div>I have been attempting some metadynamics studies for the reaction of carbonic acid (H2CO3) on a surface of portlandite (Ca(OH)2) when in a phase of humid CO2. I set three CVs as follows:</div><div>1.) Coordination between the carbon atom of my H2CO3 (indexed as atom "88") and all Calcium atoms</div><div>2.) The z-axis distance between the carbon atom of my H2CO3 and the nearest layer of Calcium atoms (I simply chose one of these Calciums, indexed 179)</div><div>3.) Coordination between the carbon atom of my H2CO3 and any surrounding hydrogens.</div><div>Note, I only want exploration of the first CV (i.e. bond formation of the ), hence I have set lambda = 1 for CV1, lambda=0 for CV2, and lamba=0.005 for CV3 (not equal to 0 as the H2CO3 will lose it's hydrogens in order to react with the calcium). I have also imposed a wall on CV2 such that if the H2CO3 drifts too far from the surface it will be repelled back. </div><div><br></div><div>I ran an NVT for 3000 steps (timestep=1fs) with no issues. And the first step of my *-COLVAR.metadynLog is as follows: </div><div>3001.00000000     0.00022663    13.55591332     2.83252720     0.00022504    13.55217251     2.82544777    -0.00000159     0.00000000    -0.00003540     0.00000000     0.00000000     0.00000000     0.00000000***************     0.00000000    -0.00000000     0.00019718    -0.00000000     0.00000013     0.00000000***************   373.00000000</div><div>I am very confused to what these numbers mean, would someone please explain what I am looking at here? For instance, the 2nd to 4th numbers appear to be the instantaneous values of my CVs? However, what are then the 5th to 7th, why do they appear similar? Moreover, why is the temperature listed as a perfect 373 K, even though *.ener is fluctuating around 373K (and rightly so!)?</div><div><br></div><div>After 1431 steps, the latest print is: </div><div>   4431.00000000     0.00034802    25.20968437     2.93700752     0.00034484    13.10788947     2.94859093    -0.00000473    -0.00000000     0.00005719    -0.00000182     0.05079545    -0.00083906     0.00000000     0.00000000     0.00000000    -0.00000004     0.00019715    -0.00000352     0.00000033     0.00846389     0.00000000   373.00000000</div><div>Take note of CV2: 25.20968437 Bhor == 13.34 Ang. This number is alarming as it would imply that my H2CO3 has jumped the wall I positioned at 20 Bohr (as seen in my input file). However, upon inspection of the atomic structure, I can see that atom 88 has not drifted at all by 13.34 Angstroms. In fact, CV2's actual instantaneous value is much closer to the value in column 6: 

13.10788947  == 6.93 Ang (the value displayed in my screenshot is 7.07 Ang because it is an absolute distance measurement as opposed to purely just along the z-axis). What is happening here, which numbers in the .metadynLog should i read as my CVs?? Thank you in advance...</div><div><br></div><div>Signed,</div><div>A very confused man...</div><div><br></div><div><br></div></blockquote></div></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/6b9ca552-f9f3-4504-80f6-d9f0a646acd1n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/6b9ca552-f9f3-4504-80f6-d9f0a646acd1n%40googlegroups.com</a>.<br />