CP2K constrained MD: O–H coordination number constraint does not prevent OH bond breaking

28 views
Skip to first unread message

Qi Zhang

unread,
Feb 28, 2026, 7:53:54 AM (5 days ago) Feb 28
to cp2k

Hello CP2K developers and users,

I am running a constrained MD simulation in CP2K and trying to keep the O–H coordination number (CN) of hydroxyl groups constrained during the trajectory. However, the constraint does not seem to hold as expected.

My setup is:

&COLVAR
&COORDINATION
KINDS_FROM Oh
KINDS_TO H
R_0 [angstrom] 1.25
NN 8
ND 16
&END COORDINATION
&END COLVAR

&CONSTRAINT
&COLLECTIVE
COLVAR 1
INTERMOLECULAR
TARGET 0.88
&END COLLECTIVE
&LAGRANGE_MULTIPLIERS
COMMON_ITERATION_LEVELS 1
&END
&END CONSTRAINT

My intention is to constrain the O–H CN so that each hydroxyl oxygen keeps its single bonded H during the MD run.

However, after about 15 ps of simulation, I found from the trajectory analysis that the CN is not actually maintained. Around ~8 ps, some O atoms in OH groups lose their only H, so their O–H CN effectively becomes 0.

To diagnose this, I checked:

  • the O–H distances in the OH groups

  • the number of H atoms around each hydroxyl O as a function of time

Both analyses suggest that some hydroxyl O atoms indeed lose their bonded H during the simulation, even though the collective variable is supposed to be constrained.

My questions are:

  1. Is this the correct way to constrain an intramolecular O–H coordination number in CP2K?

  2. Could the use of INTERMOLECULAR here be incorrect for this purpose?

  3. What should I do to correctly constrain the O–H coordination number to 1?

I will attach the figures and the input file showing:

  • O–H bond distances vs time

  • the number of H atoms around each hydroxyl O vs time

Any suggestions would be greatly appreciated. Thank you very much for your help.

Best regards

OH_distances_vs_time.png

O_H_count_vs_time.png

GeClOH_solution.inp

Marcella Iannuzzi

unread,
Feb 28, 2026, 8:13:11 AM (5 days ago) Feb 28
to cp2k
Hi

The fact that the distance between one Oh and one  hydrogen increases does not mean that the coordination number is not maintained.
You should monitor the coordination number not the distance. 
If I understand correctly, the definition of the coordination number in the input considers all the Oh and all the H. The distance between one specific Oh and one specific H is not that relevant.
Regards
Marcella

Qi Zhang

unread,
Mar 1, 2026, 8:17:20 PM (3 days ago) Mar 1
to cp2k

Hi Marcella,

Thank you very much for your helpful reply. Your explanation was very insightful and gave me a much clearer understanding of the issue.

I now realize that I was focusing too much on the distance between one specific O and one specific H, while the constrained variable in my input is actually the global coordination number defined over all Oh and all H atoms. This was a very important point, and your comment helped me see the problem from the correct perspective.

Thank you again for your clarification. It was very helpful for me.

Best regards,
Qi Zhang

Reply all
Reply to author
Forward
0 new messages