Skip to content

Action: HBPAMM_MATRIX

Module pamm
Description Usage
Adjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded used in 0 tutorialsused in 0 eggs
output value type
a matrix containing the weights for the bonds between each pair of atoms matrix

Details and examples

Adjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded

This method allows you to calculate an adjacency matrix and use all the methods discussed in the documentation for the CONTACT_MATRIX upon it to define CVs. The element of the matrix that is calculated by this action is one if there is a hydrogen bond connecting atom to atom . Furthermore, we determine whether there is a hydrogen atom between these two atoms by using the PAMM technique that is discussed in the articles from the bibliography below and in the documentation for the PAMM action.

The example shown below illustrates how the method is used in practice

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
m: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=1-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
...
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=m FILEthe name of the file on which to output these quantities=colvar

The input above is outputting the full hbpamm matrix. However, this action is perhaps more usefully used to investigate the connectivity between a collection of water molecules in liquid water. Importantly, however, the output matrix here is not symmetric. We thus calculate the number of hydrogen bonds that these atoms are donating using the following input:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
m: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=1-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
...
ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=64 rsums: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=m,ones DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=1-192:3 ARGthe labels of vectors that should be output in the xyz file=rsums FILEfile on which to output coordinates; extension is automatically detected=donors.xyz

To calculate the number of hydrogen bonds these atoms accept we would use the following input:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
m: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=1-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
...
mT: TRANSPOSECalculate the transpose of a matrix More details ARGthe label of the vector or matrix that should be transposed=m ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=64 rsums: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=mT,ones DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=1-192:3 ARGthe labels of vectors that should be output in the xyz file=rsums FILEfile on which to output coordinates; extension is automatically detected=acceptors.xyz

To calculate the total number of hydorgen bonds these atoms participate in you would use an input like this:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
m: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=1-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
...
mT: TRANSPOSECalculate the transpose of a matrix More details ARGthe label of the vector or matrix that should be transposed=m hbmat: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=m,mT FUNCthe function you wish to evaluate=x+y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=64 rsums: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=hbmat,ones DUMPATOMSDump selected atoms on a file. More details ATOMSthe atom indices whose positions you would like to print out=1-192:3 ARGthe labels of vectors that should be output in the xyz file=rsums FILEfile on which to output coordinates; extension is automatically detected=hbonds.xyz

If you want to investigate whether there are hydrogen bonds between two groups of molecules you can use an input like this:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
m: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPAwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB=1 GROUPBwhen you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA=2-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
...
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=m FILEthe name of the file on which to output these quantities=colvar

This input outputs a matrix in which the th element tells you whether or not atom 1 donates a hydrogen bond to the th element in the group of 63 atoms that was specified using the ACCEPTORS keyword. The th element of the transpose of this matrix tells you if the th center donates a hydrogen bond to atom 1.

In general, it is better to use this action through the HBPAMM_SA, HBPAMM_SD and HBPAMM_SH keywords, which can be used to calculate the number of hydrogen bonds each donor, acceptor or hydrogen atom in your system participates in.

Periodic boundary conditions

Notice that in all the inputs above the distances values that enter the pamm expressions are calculated in a way that takes the periodic boundary conditions into account. If you want to ignore the periodic boundary conditions you can use the NOPBC flag as shown below.

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
m: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=1-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
NOPBC don't use pbc ...

COMPONENTS flag

If you add the flag COMPONENTS to the input as shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
c4: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=1-192:3 GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=2-192:3,3-192:3
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
COMPONENTS also calculate the components of the vector connecting the atoms in the contact matrix ...

then four matrices with the labels c4.w, c4.x, c4.y and c4.z are output by the action. The matrix with the label c4.w is the adjacency matrix that would be output if you had not added the COMPONENTS flag. The component of the matrices c4.x, c4.y and c4.z contain the , and components of the vector connecting atoms and . Importantly, however, the components of these vectors are only stored in c4.x, c4.y and c4.z if the elements of c4.w are non-zero. Using the COMPONENTS flag in this way ensures that you can use HBPAMM_MATRIX in tandem with many of the functionalities that are part of the symfunc module. Remember, however, that the element of the HBPAMM_MATRIX is only non-zero if atom donates a hydrogen bond to atom . You cannot use HBPAMM_MATRIX to identify the set of atoms that each atom is hydrogen bonded to.

The MASK keyword

You use the MASK keyword with HBPAMM_MATRIX in the same way that is used in CONTACT_MATRIX. This keyword thus expects a vector in input, which tells HBOND_MATRIX that it is safe to not calculate certain rows of the output matrix. An example where this keyword is used is shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/pamm/rt-hbpamm/b3lyp.pamm
# The atoms that are of interest
ow: GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More details ATOMSthe numerical indexes for the set of atoms in the group=1-1650
# Fixed virtual atom which serves as the probe volume's center (pos. in nm)
center: FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More details ATcoordinates of the virtual atom=2.5,2.5,2.5
# Vector in which element i is one if atom i is in sphere of interest and zero otherwise
sphere: INSPHEREThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. More details ATOMSthe group of atoms that you would like to investigate=ow CENTERthe atom whose vicinity we are interested in examining=center RADIUSthe switching function that tells us the extent of the sphereical region of interest. Options for this keyword are explained in the documentation for LESS_THAN.={GAUSSIAN D_0=0.5 R_0=0.01 D_MAX=0.52}
# Calculates cooordination numbers
cmap: HBPAMM_MATRIXAdjacency matrix in which two electronegative atoms are adjacent if they are hydrogen bonded This action has hidden defaults. More details ...
  GROUPthe atoms for which you would like to calculate the adjacency matrix=ow GROUPCa group of atoms that must be summed over when calculating each element of the adjacency matrix=1650-3000
  CLUSTERSthe name of the file that contains the definitions of all the kernels for PAMM=
regtest/pamm/rt-hbpamm/b3lyp.pamm
Click here to see an extract from this file.
×

FILE: regtest/pamm/rt-hbpamm/b3lyp.pamm

#! FIELDS height ptc ssc adc sigma_ptc_ptc sigma_ptc_ssc sigma_ptc_adc sigma_ssc_ptc sigma_ssc_ssc sigma_ssc_adc sigma_adc_ptc sigma_adc_ssc sigma_adc_adc
#! SET multivariate true
#! SET kerneltype gaussian
      7.62333341E-0002     -8.18288945E-0001      2.82463003E+0000      2.74063420E+0000      8.16250857E-0002     -6.73769671E-0002     -4.59932811E-0002     -6.73769671E-0002      6.75337422E-0002      4.53759149E-0002     -4.59932811E-0002      4.53759149E-0002      4.43189576E-0002 
      6.99310782E-0002      8.69642605E-0001      2.87365811E+0000      2.79326509E+0000      4.26992535E-0002      3.05953458E-0002      2.05388393E-0002      3.05953458E-0002      3.29012486E-0002      2.12273873E-0002      2.05388393E-0002      2.12273873E-0002      2.45196159E-0002 
      1.98671093E-0001     -2.27062808E+0000      4.25703566E+0000      2.78401408E+0000      7.98163641E-0002     -7.27264015E-0002     -1.99919283E-0002     -7.27264015E-0002      8.18886784E-0002      2.09866914E-0002     -1.99919283E-0002      2.09866914E-0002      4.62997869E-0002 
      1.45233007E-0002     -1.21470165E+0000      4.79894096E+0000      2.84314625E+0000      1.86259108E-0001     -2.27095842E-0002      2.85921248E-0002     -2.27095842E-0002      3.74404487E-0002     -3.26295559E-0003      2.85921248E-0002     -3.26295559E-0003      5.65919817E-0002 
      2.04518164E-0001      2.26156229E+0000      4.22597375E+0000      2.79821642E+0000      7.75379113E-0002      6.98466908E-0002      2.95665680E-0002      6.98466908E-0002      8.00913946E-0002      3.26640646E-0002      2.95665680E-0002      3.26640646E-0002      5.40779543E-0002 
      1.46258706E-0002      1.26722013E+0000      4.80633662E+0000      2.89897290E+0000      8.80357941E-0002      2.26981492E-0002      4.05790153E-0003      2.26981492E-0002      4.60485360E-0002     -7.70322510E-0003      4.05790153E-0003     -7.70322510E-0003      5.45100475E-0002 
      1.84562156E-0001     -2.60991008E+0000      4.59285310E+0000      4.03390174E+0000      1.51456600E-0001     -1.42734555E-0001     -1.17741061E-0001     -1.42734555E-0001      1.50000160E-0001      1.19653950E-0001     -1.17741061E-0001      1.19653950E-0001      2.01301812E-0001 
      2.87297679E-0002     -1.34664608E+0000      4.81762077E+0000      4.11037008E+0000      1.20169846E-0001     -2.40092647E-0002     -9.50215564E-0002     -2.40092647E-0002      3.53100140E-0002      4.17402875E-0002     -9.50215564E-0002      4.17402875E-0002      2.59240031E-0001 
      1.12880383E-0001      2.26335545E+0000      4.25751027E+0000      3.68162217E+0000      1.34662241E-0001      1.26724092E-0001      7.24910086E-0002      1.26724092E-0001      1.35760215E-0001      7.81381697E-0002      7.24910086E-0002      7.81381697E-0002      1.13119071E-0001 
      2.86798480E-0002      1.33616209E+0000      4.85052180E+0000      4.23465934E+0000      1.80874139E-0001      3.35404961E-0002      1.71858062E-0001      3.35404961E-0002      3.57517317E-0002      5.62338216E-0002      1.71858062E-0001      5.62338216E-0002      3.56622291E-0001 
      6.66450035E-0002      2.74946369E+0000      4.74656373E+0000      4.24763632E+0000      2.54371954E-0002      1.64469606E-0002      4.36734028E-0003      1.64469606E-0002      2.24742542E-0002      6.72714867E-0003      4.36734028E-0003      6.72714867E-0003      9.75985896E-0002 
MASKa vector that is used to used to determine which rows of the adjancency matrix to compute=sphere ...
ones: ONESCreate a constant vector with all elements equal to one This action is a shortcut. More details SIZEthe number of ones that you would like to create=1650 cc: MATRIX_VECTOR_PRODUCTCalculate the product of the matrix and the vector More details ARGthe label for the matrix and the vector/scalar that are being multiplied=cmap,ones # Multiply coordination numbers by sphere vector prod: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=cc,sphere FUNCthe function you wish to evaluate=x*y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Sum of coordination numbers for atoms that are in the sphere of interest numer: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=prod PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Number of atoms that are in sphere of interest denom: SUMCalculate the sum of the arguments More details ARGthe vector/matrix/grid whose elements shuld be added together=sphere PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # Average coordination number for atoms in sphere of interest av: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=prod,denom FUNCthe function you wish to evaluate=x/y PERIODICif the output of your function is periodic then you should specify the periodicity of the function=NO # And print out final CV to a file PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=av FILEthe name of the file on which to output these quantities=colvar STRIDE the frequency with which the quantities of interest should be output=1

This input calculates the average number of hydrogen bonds each of the atoms that are within a spherical region that is centered on the point donate.

Input

The arguments and atoms that serve as the input for this action are specified using one or more of the keywords in the following table.

Keyword Type Description
MASK vector a vector that is used to used to determine which rows of the adjancency matrix to compute
GROUP atoms the atoms for which you would like to calculate the adjacency matrix
GROUPA atoms when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB
GROUPB atoms when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA
GROUPC atoms a group of atoms that must be summed over when calculating each element of the adjacency matrix

Output components

This action can calculate the values in the following table when the associated keyword is included in the input for the action. These values can be referenced elsewhere in the input by using this Action's label followed by a dot and the name of the value required from the list below.

Name Type Keyword Description
w matrix COMPONENTS a matrix containing the weights for the bonds between each pair of atoms
x matrix COMPONENTS the projection of the bond on the x axis
y matrix COMPONENTS the projection of the bond on the y axis
z matrix COMPONENTS the projection of the bond on the z axis

Full list of keywords

The following table describes the keywords and options that can be used with this action

Keyword Type Default Description
MASK input none a vector that is used to used to determine which rows of the adjancency matrix to compute
GROUP input none the atoms for which you would like to calculate the adjacency matrix
GROUPA input none when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPB
GROUPB input none when you are calculating the adjacency matrix between two sets of atoms this keyword is used to specify the atoms along with the keyword GROUPA
GROUPC input none a group of atoms that must be summed over when calculating each element of the adjacency matrix
NL_CUTOFF compulsory 0.0 The cutoff for the neighbor list
NL_STRIDE compulsory 1 The frequency with which we are updating the atoms in the neighbor list
ORDER compulsory dah the order in which the groups are specified in the input
CLUSTERS compulsory none the name of the file that contains the definitions of all the kernels for PAMM
REGULARISE compulsory 0.001 don't allow the denominator to be smaller then this value
GAUSS_CUTOFF compulsory 6.25 the cutoff at which to stop evaluating the kernel function is set equal to sqrt(2x)(max(adc)+cov(adc))
COMPONENTS optional false also calculate the components of the vector connecting the atoms in the contact matrix
NOPBC optional false don't use pbc
SERIAL optional false do the calculation in serial. Further information about this flag can be found here.
USEGPU optional false run this calculation on the GPU. Further information about this flag can be found here.

deprecated keywords

The keywords in the following table can still be used with this action but have been deprecated

Keyword Description
ATOMS You should use GROUP instead of this keyword which was used in older versions of PLUMED and is provided for back compatibility only

References

More information about how this action can be used is available in the following articles: