[CP2K-user] [CP2K:21367] Re: Understanding the COLVAR file

James Hanson jhanson0035 at gmail.com
Tue Apr 15 08:39:29 UTC 2025


Good morning Marcella,
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...
Thank you again, your insight is invaluable!
Kindest regards,
James

On Tuesday, 15 April 2025 at 08:59:22 UTC+1 Marcella Iannuzzi wrote:

> Der very confused man,
>
> You have activated the Lagrangian MTD scheme ... I hope you know why you 
> want to use this scheme.
> 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. 
> input section, two additional parameters are needed, which are the mass of 
> the auxiliary variable and the coupling constant for the harmonic 
> potential: lambda.
> 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. 
>
> 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.
>
> When such Lagrangian scheme is used more columns appear in the COLVAR, 
> which contain all the relevant information. The 1st column is always the 
> time in fs, the next NCV columns are the instantaneous values of the 
> auxiliary variables, followed by NCV columns where the instantaneous 
> values of the CVs are reported. The next columns report the values of the 
> potential gradients: NCV columns for the gradients of the harmonic 
> potential, NCV for the gradients of the MTD biasing potential, and NCV for 
> the gradient of the WALL potential (these are zeros when the corresponding 
> potential is not activated). The following NCV 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.
>
> HTH
> Regards
> Marcella
>
> On Monday, April 14, 2025 at 11:34:43 AM UTC+2 jhans... at gmail.com wrote:
>
>> Good morning CP2K community,
>> 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:
>> 1.) Coordination between the carbon atom of my H2CO3 (indexed as atom 
>> "88") and all Calcium atoms
>> 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)
>> 3.) Coordination between the carbon atom of my H2CO3 and any surrounding 
>> hydrogens.
>> 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. 
>>
>> I ran an NVT for 3000 steps (timestep=1fs) with no issues. And the first 
>> step of my *-COLVAR.metadynLog is as follows: 
>> 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
>> 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!)?
>>
>> After 1431 steps, the latest print is: 
>>    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
>> 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...
>>
>> Signed,
>> A very confused man...
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/6b9ca552-f9f3-4504-80f6-d9f0a646acd1n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20250415/9e679874/attachment-0001.htm>


More information about the CP2K-user mailing list