7
$\begingroup$

I am trying to program a collective variable in PLUMED which is basically the number of bonds in the shortest Hydrogen bond wire in a system of water molecules. I plan to use the HBond_Matrix from plumed to accomplish this.

As per documentation, I can use the following to...

...analyze the number of hydrogen bonds each of the oxygen atoms in a box of water participates in. Each water molecule can participate in a hydrogen bond in one of two ways. It can either donate one of its hydrogen atom to the neighboring oxygen or it can accept a bond between the hydrogen of a neighboring water molecule and its own oxygen. The input below allows you to output information on the number of hydrogen bonds each of the water molecules donates and accepts. This information is output in two xyz files which each contain five columns of data. The first four of these columns are a label for the atom and the x, y and z position of the oxygen. The last column is then the number of accepted/donated hydrogen bonds.

mat: HBOND_MATRIX ATOMS=1-192:3 HYDROGENS=2-192:3,3-192:3 SWITCH={RATIONAL R_0=3.20} HSWITCH={RATIONAL R_0=2.30} ASWITCH={RATIONAL R_0=0.167pi} SUM
rsums: ROWSUMS MATRIX=mat MEAN
csums: COLUMNSUMS MATRIX=mat MEAN
DUMPMULTICOLVAR DATA=rsums FILE=donors.xyz
DUMPMULTICOLVAR DATA=csums FILE=acceptors.xyz

Since I can't loop over the matrix and determine the number of bonds in each H-Bond wire, is there another amalgamation of basic functions that might do the trick?

$\endgroup$
6
  • $\begingroup$ +1. Hopefully someone can help you out. I appreciate you taking on the responsibility of explaining the usage guidance for your newly created collective-variable tag. Let's see if it gets used by others. $\endgroup$ Aug 11, 2020 at 23:51
  • $\begingroup$ Is this something that you need to do in PLUMED or would it be possible to determine this in a another software? Asking since I know nothing of this software but maybe it is possible via ASE for example. It would require enough effort though that I would only want to go through with it if this would work for you. $\endgroup$ Sep 7, 2020 at 22:34
  • $\begingroup$ @TristanMaxson I just need to code a Collective Variable that can be plugged into LAMMPS - any software works $\endgroup$
    – fireball.1
    Sep 7, 2020 at 22:54
  • $\begingroup$ Can you make a small diagram defining the problem better? Are you wanting to identify the longest H-bond wire, all H-bond wires, etc. Also what exactly is the meaning on an H-bond wire and what if it is cyclic? $\endgroup$ Sep 8, 2020 at 15:28
  • $\begingroup$ Fireball, have you been able to consider @TristanMaxson's comments? Shall we close the question while you need more time to update the details? $\endgroup$ Nov 8, 2020 at 1:50

0