Hydrogen bonds in water#

Count hydrogen-bonded water pairs in one configuration, then follow the same pairs through a trajectory to distinguish persistent bonds from bonds that break and form again.

Count hydrogen bonds in one configuration#

Install the command-line program using the installation instructions. The example uses the supplied TIP4P configuration, with 250 oxygen atoms (type 2) and 500 hydrogen atoms (type 1). It includes molecule IDs to associate hydrogens with their parent waters.

From the source directory, run the command below. If you installed only the executable, first download the reference configuration into the same relative path:

mkdir -p input/traj
curl -fsSLo input/traj/exampleTraj.lammpstrj \
  https://raw.githubusercontent.com/d-SEAMS/seams-core/v2.14.3/input/traj/exampleTraj.lammpstrj

Count the bonds:

seams hbonds input/traj/exampleTraj.lammpstrj --type 2 --htype 1
nop 250 hbonds 460

The command finds 460 distinct hydrogen-bonded oxygen pairs, not 460 waters or 460 directional donor–acceptor assignments. Each pair contributes to both waters’ neighbour counts, so the mean degree of this network is 2 × 460 / 250 = 3.68.

With the default criterion, oxygen centres must be within 3.5 Å. A hydrogen attached to one oxygen must be within 2.42 Å of the other oxygen, with an acceptor-centred angle of at most 30°. See Hydrogen-bond geometry for the periodic convention and directional definition.

Measure persistence across a trajectory#

A single count cannot determine whether the same molecules remain bonded. Save a trajectory with hydrogen coordinates as well as oxygens, and retain the matching labelled topology. An oxygen-only trajectory can give geometric neighbours but cannot give the directional hydrogen-bond criterion.

Follow the Python hydrogen-bond tutorial to read an example XTC and GRO, count bonded pairs at each frame, compute continuous and intermittent curves, and plot the results. It is a separate three-frame dataset from the TIP4P configuration above.

Continuous survival requires a starting pair to remain bonded at every saved frame up to the chosen lag. Intermittent correlation allows a pair to break and re-form between the start and end. Neither curve can detect an event between saved frames. Use the saved-frame interval, not the molecular dynamics integration timestep, for the lag axis.

For a simulation or analysis program that already supplies bond identities, the trajectory and dynamics how-to shows how to accumulate the same curves in C++.

References#

The d-SEAMS software paper uses hydrogen-bond networks for confined water and ice [Goswami et al., 2020].