Skip to content

Shortcut: EVALUATE_FUNCTION_FROM_GRID

Module gridtools
Description Usage
Calculate the function stored on the input grid at an arbitrary point used in 0 tutorialsused in 0 eggs
output value type
interpolation of the input grid to get the value of the function at the input arguments scalar

Details and examples

Calculate the function stored on the input grid at an arbitrary point

This action can be used to evaluate a function that is stored on a grid at an arbitrary point in space via interpolation. For example, the following input illustrates how you can use this action to evaulate the square of the distance between atom 1 and atom 2

Click on the labels of the actions for more information on what each action computes
tested on2.11
d2: REFERENCE_GRIDSetup a constant grid by either reading values from a file or definining a function in input More details GRID_MIN the lower bounds for the grid=0 GRID_MAX the upper bounds for the grid=10 GRID_BINthe number of bins for the grid=20 FUNCthe function to compute on the grid=d1*d1 VARthe names to give each of the grid directions in the function=d1 PERIODICare the grid directions periodic=NO
d1: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2
ff: EVALUATE_FUNCTION_FROM_GRIDCalculate the function stored on the input grid at an arbitrary point More details GRIDthe name of the grid that we are using to evaluate the function=d2
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d1,ff FILEthe name of the file on which to output these quantities=colvar

You can perform the same calculation using CUSTOM, which will do the calculation exactly and not perform any interpolation. However, if for some reaon you only have the values of the function at a grid of point EVALUATE_FUNCTION_FROM_GRID may be a useful alternative as you can use REFERENCE_GRID to read in the values of the function at your grid of point from a file as shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/gridtools/rt-weights-integral/kde.grid

ff: REFERENCE_GRIDSetup a constant grid by either reading values from a file or definining a function in input More details FILEthe name of the file that contains the reference data=
regtest/gridtools/rt-weights-integral/kde.grid
Click here to see an extract from this file.
×

FILE: regtest/gridtools/rt-weights-integral/kde.grid

#! FIELDS aa tt h dh_aa dh_tt
#! SET min_aa 0
#! SET max_aa pi
#! SET nbins_aa  20
#! SET periodic_aa false
#! SET min_tt -pi
#! SET max_tt pi
#! SET nbins_tt  20
#! SET periodic_tt true
  0.00000 -3.14159  0.00000  0.00000  0.00000
  0.15708 -3.14159  0.00000  0.00000  0.00000
  0.31416 -3.14159  0.00000  0.00000  0.00000
  0.47124 -3.14159  0.00000  0.00000  0.00000
  0.62832 -3.14159  0.00000  0.00000  0.00000
  0.78540 -3.14159  0.00000  0.00000  0.00000
  0.94248 -3.14159  0.00000  0.00000  0.00000
  1.09956 -3.14159  0.00000  0.00000  0.00000
  1.25664 -3.14159  0.00000  0.00000  0.00000
  1.41372 -3.14159  0.00000  0.00000  0.00000
  1.57080 -3.14159  0.00000  0.00000  0.00000
  1.72788 -3.14159  0.00000  0.00000  0.00000
  1.88496 -3.14159  0.00000  0.00000 -0.00000
  2.04204 -3.14159  0.00000  0.00000 -0.00000
  2.19911 -3.14159  0.00000  0.00000 -0.00000
  2.35619 -3.14159  0.00000  0.00001 -0.00000
  2.51327 -3.14159  0.00000  0.00003 -0.00002
  2.67035 -3.14159  0.00001  0.00003 -0.00004
  2.82743 -3.14159  0.00001 -0.00001 -0.00005
  2.98451 -3.14159  0.00001 -0.00004 -0.00003
  3.14159 -3.14159  0.00000 -0.00003 -0.00001

  0.00000 -2.82743  0.00000  0.00000  0.00000
  0.15708 -2.82743  0.00000  0.00000  0.00000
  0.31416 -2.82743  0.00000  0.00000  0.00000
  0.47124 -2.82743  0.00000  0.00000  0.00000
  0.62832 -2.82743  0.00000  0.00000  0.00000
  0.78540 -2.82743  0.00000  0.00000  0.00000
  0.94248 -2.82743  0.00000  0.00000  0.00000
  1.09956 -2.82743  0.00000  0.00000  0.00000
  1.25664 -2.82743  0.00000  0.00000  0.00000
  1.41372 -2.82743  0.00000  0.00000  0.00000
  1.57080 -2.82743  0.00000  0.00000  0.00000
  1.72788 -2.82743  0.00000  0.00000  0.00000
  1.88496 -2.82743  0.00000  0.00000 -0.00000
  2.04204 -2.82743  0.00000  0.00000 -0.00000
  2.19911 -2.82743  0.00000  0.00000 -0.00000
  2.35619 -2.82743  0.00000  0.00000 -0.00000
  2.51327 -2.82743  0.00000  0.00000 -0.00000
  2.67035 -2.82743  0.00000  0.00000 -0.00001
  2.82743 -2.82743  0.00000 -0.00000 -0.00001
  2.98451 -2.82743  0.00000 -0.00000 -0.00001
  3.14159 -2.82743  0.00000 -0.00000 -0.00000

  0.00000 -2.51327  0.00000  0.00000  0.00000
  0.15708 -2.51327  0.00000  0.00000  0.00000
  0.31416 -2.51327  0.00000  0.00000  0.00000
  0.47124 -2.51327  0.00000  0.00000  0.00000
  0.62832 -2.51327  0.00000  0.00000  0.00000
  0.78540 -2.51327  0.00000  0.00000  0.00000
  0.94248 -2.51327  0.00000  0.00000  0.00000
  1.09956 -2.51327  0.00000  0.00000  0.00000
  1.25664 -2.51327  0.00000  0.00000  0.00000
  1.41372 -2.51327  0.00000  0.00000  0.00000
  1.57080 -2.51327  0.00000  0.00000  0.00000
  1.72788 -2.51327  0.00000  0.00000  0.00000
  1.88496 -2.51327  0.00000  0.00000 -0.00000
  2.04204 -2.51327  0.00000  0.00000 -0.00000
  2.19911 -2.51327  0.00000  0.00000 -0.00000
  2.35619 -2.51327  0.00000  0.00000 -0.00000
  2.51327 -2.51327  0.00000  0.00000 -0.00000
  2.67035 -2.51327  0.00000  0.00000 -0.00000
  2.82743 -2.51327  0.00000 -0.00000 -0.00000
  2.98451 -2.51327  0.00000 -0.00000 -0.00000
  3.14159 -2.51327  0.00000 -0.00000 -0.00000

  0.00000 -2.19911  0.00000  0.00000  0.00000
  0.15708 -2.19911  0.00000  0.00000  0.00000
  0.31416 -2.19911  0.00000  0.00000  0.00000
  0.47124 -2.19911  0.00000  0.00000  0.00000
  0.62832 -2.19911  0.00000  0.00000  0.00000
  0.78540 -2.19911  0.00000  0.00000  0.00000
  0.94248 -2.19911  0.00000  0.00000  0.00000
  1.09956 -2.19911  0.00000  0.00000  0.00000
  1.25664 -2.19911  0.00000  0.00000  0.00000
  1.41372 -2.19911  0.00000  0.00000  0.00000
  1.57080 -2.19911  0.00000  0.00000  0.00000
  1.72788 -2.19911  0.00000  0.00000  0.00000
  1.88496 -2.19911  0.00000  0.00000  0.00000
  2.04204 -2.19911  0.00000  0.00000  0.00000
  2.19911 -2.19911  0.00000  0.00000  0.00000
  2.35619 -2.19911  0.00000  0.00000  0.00000
  2.51327 -2.19911  0.00000  0.00000  0.00000
  2.67035 -2.19911  0.00000  0.00000  0.00000
  2.82743 -2.19911  0.00000  0.00000  0.00000
  2.98451 -2.19911  0.00000  0.00000  0.00000
  3.14159 -2.19911  0.00000  0.00000  0.00000

  0.00000 -1.88496  0.00000  0.00000  0.00000
  0.15708 -1.88496  0.00000  0.00000  0.00000
  0.31416 -1.88496  0.00000  0.00000  0.00000
  0.47124 -1.88496  0.00000  0.00000  0.00000
  0.62832 -1.88496  0.00000  0.00000  0.00000
  0.78540 -1.88496  0.00000  0.00000  0.00000
  0.94248 -1.88496  0.00000  0.00000  0.00000
  1.09956 -1.88496  0.00000  0.00000  0.00000
  1.25664 -1.88496  0.00000  0.00000  0.00000
  1.41372 -1.88496  0.00000  0.00000  0.00000
  1.57080 -1.88496  0.00000  0.00000  0.00000
  1.72788 -1.88496  0.00000  0.00000  0.00000
  1.88496 -1.88496  0.00000  0.00000  0.00000
  2.04204 -1.88496  0.00000  0.00000  0.00000
  2.19911 -1.88496  0.00000  0.00000  0.00000
  2.35619 -1.88496  0.00000  0.00000  0.00000
  2.51327 -1.88496  0.00000  0.00000  0.00000
  2.67035 -1.88496  0.00000  0.00000  0.00000
  2.82743 -1.88496  0.00000  0.00000  0.00000
  2.98451 -1.88496  0.00000  0.00000  0.00000
  3.14159 -1.88496  0.00000  0.00000  0.00000

  0.00000 -1.57080  0.00000  0.00000  0.00000
  0.15708 -1.57080  0.00000  0.00000  0.00000
  0.31416 -1.57080  0.00000  0.00000  0.00000
  0.47124 -1.57080  0.00000  0.00000  0.00000
  0.62832 -1.57080  0.00000  0.00000  0.00000
  0.78540 -1.57080  0.00000  0.00000  0.00000
  0.94248 -1.57080  0.00000  0.00000  0.00000
  1.09956 -1.57080  0.00000  0.00000  0.00000
  1.25664 -1.57080  0.00000 -0.00000  0.00000
  1.41372 -1.57080  0.00000 -0.00000  0.00000
  1.57080 -1.57080  0.00000 -0.00000  0.00000
  1.72788 -1.57080  0.00000 -0.00000  0.00000
  1.88496 -1.57080  0.00000 -0.00000  0.00000
  2.04204 -1.57080  0.00000  0.00000  0.00000
  2.19911 -1.57080  0.00000  0.00000  0.00000
  2.35619 -1.57080  0.00000  0.00000  0.00000
  2.51327 -1.57080  0.00000  0.00000  0.00000
  2.67035 -1.57080  0.00000  0.00000  0.00000
  2.82743 -1.57080  0.00000  0.00000  0.00000
  2.98451 -1.57080  0.00000  0.00000  0.00000
  3.14159 -1.57080  0.00000  0.00000  0.00000

  0.00000 -1.25664  0.00000  0.00000  0.00000
  0.15708 -1.25664  0.00000  0.00000  0.00000
  0.31416 -1.25664  0.00000  0.00000  0.00000
  0.47124 -1.25664  0.00000  0.00000  0.00000
  0.62832 -1.25664  0.00000  0.00002  0.00003
  0.78540 -1.25664  0.00001  0.00015  0.00029
  0.94248 -1.25664  0.00006  0.00047  0.00133
  1.09956 -1.25664  0.00015  0.00058  0.00334
  1.25664 -1.25664  0.00020 -0.00001  0.00451
  1.41372 -1.25664  0.00015 -0.00059  0.00329
  1.57080 -1.25664  0.00006 -0.00046  0.00129
  1.72788 -1.25664  0.00001 -0.00015  0.00027
  1.88496 -1.25664  0.00000 -0.00002  0.00003
  2.04204 -1.25664  0.00000  0.00000  0.00000
  2.19911 -1.25664  0.00000  0.00000  0.00000
  2.35619 -1.25664  0.00000  0.00000  0.00000
  2.51327 -1.25664  0.00000  0.00000  0.00000
  2.67035 -1.25664  0.00000  0.00000  0.00000
  2.82743 -1.25664  0.00000  0.00000  0.00000
  2.98451 -1.25664  0.00000  0.00000  0.00000
  3.14159 -1.25664  0.00000  0.00000  0.00000

  0.00000 -0.94248  0.00000  0.00000  0.00000
  0.15708 -0.94248  0.00000  0.00000  0.00000
  0.31416 -0.94248  0.00000  0.00002  0.00001
  0.47124 -0.94248  0.00003  0.00058  0.00042
  0.62832 -0.94248  0.00047  0.00735  0.00674
  0.78540 -0.94248  0.00404  0.04737  0.05795
  0.94248 -0.94248  0.01873  0.14626  0.26892
  1.09956 -0.94248  0.04691  0.18203  0.67341
  1.25664 -0.94248  0.06339 -0.00296  0.91000
  1.41372 -0.94248  0.04623 -0.18370  0.66360
  1.57080 -0.94248  0.01819 -0.14373  0.26114
  1.72788 -0.94248  0.00386 -0.04569  0.05546
  1.88496 -0.94248  0.00044 -0.00698  0.00636
  2.04204 -0.94248  0.00000  0.00000  0.00000
  2.19911 -0.94248  0.00000  0.00000  0.00000
  2.35619 -0.94248  0.00000  0.00000  0.00000
  2.51327 -0.94248  0.00000  0.00000  0.00000
  2.67035 -0.94248  0.00000  0.00000  0.00000
  2.82743 -0.94248  0.00000  0.00000  0.00000
  2.98451 -0.94248  0.00000  0.00000  0.00000
  3.14159 -0.94248  0.00000  0.00000  0.00000

  0.00000 -0.62832  0.00000  0.00000  0.00000
  0.15708 -0.62832  0.00000  0.00000  0.00000
  0.31416 -0.62832  0.00003  0.00062  0.00017
  0.47124 -0.62832  0.00078  0.01528  0.00507
  0.62832 -0.62832  0.01243  0.19462  0.08078
  0.78540 -0.62832  0.10686  1.25389  0.69464
  0.94248 -0.62832  0.49585  3.87126  3.22336
  1.09956 -0.62832  1.24168  4.81806  8.07169
  1.25664 -0.62832  1.67791 -0.07837 10.90751
  1.41372 -0.62832  1.22359 -4.86218  7.95412
  1.57080 -0.62832  0.48151 -3.80428  3.13014
  1.72788 -0.62832  0.10226 -1.20944  0.66472
  1.88496 -0.62832  0.01172 -0.18462  0.07618
  2.04204 -0.62832  0.00000  0.00000  0.00000
  2.19911 -0.62832  0.00000  0.00000  0.00000
  2.35619 -0.62832  0.00000  0.00000  0.00000
  2.51327 -0.62832  0.00000  0.00000  0.00000
  2.67035 -0.62832  0.00000  0.00000  0.00000
  2.82743 -0.62832  0.00000  0.00000  0.00000
  2.98451 -0.62832  0.00000  0.00000  0.00000
  3.14159 -0.62832  0.00000  0.00000  0.00000

  0.00000 -0.31416  0.00000  0.00000  0.00000
  0.15708 -0.31416  0.00000  0.00000  0.00000
  0.31416 -0.31416  0.00006  0.00139 -0.00008
  0.47124 -0.31416  0.00175  0.03429 -0.00237
  0.62832 -0.31416  0.02789  0.43684 -0.03775
  0.78540 -0.31416  0.23985  2.81450 -0.32460
  0.94248 -0.31416  1.11300  8.68950 -1.50627
  1.09956 -0.31416  2.78709 10.81470 -3.77189
  1.25664 -0.31416  3.76628 -0.17591 -5.09706
  1.41372 -0.31416  2.74649 -10.91373 -3.71695
  1.57080 -0.31416  1.08081 -8.53916 -1.46271
  1.72788 -0.31416  0.22952 -2.71473 -0.31062
  1.88496 -0.31416  0.02630 -0.41440 -0.03560
  2.04204 -0.31416  0.00000  0.00000  0.00000
  2.19911 -0.31416  0.00000  0.00000  0.00000
  2.35619 -0.31416  0.00000 -0.00000  0.00000
  2.51327 -0.31416  0.00000 -0.00000  0.00000
  2.67035 -0.31416  0.00000 -0.00000  0.00000
  2.82743 -0.31416  0.00000 -0.00000  0.00000
  2.98451 -0.31416  0.00000 -0.00000  0.00000
  3.14159 -0.31416  0.00000  0.00000  0.00000

  0.00000  0.00000  0.00000  0.00000  0.00000
  0.15708  0.00000  0.00000  0.00000  0.00000
  0.31416  0.00000  0.00001  0.00027 -0.00010
  0.47124  0.00000  0.00033  0.00653 -0.00307
  0.62832  0.00000  0.00531  0.08316 -0.04889
  0.78540  0.00000  0.04566  0.53575 -0.42038
  0.94248  0.00000  0.21186  1.65409 -1.95071
  1.09956  0.00000  0.53054  2.05863 -4.88482
  1.25664  0.00000  0.71693 -0.03349 -6.60099
  1.41372  0.00000  0.52281 -2.07748 -4.81366
  1.57080  0.00000  0.20574 -1.62547 -1.89429
  1.72788  0.00000  0.04369 -0.51675 -0.40226
  1.88496  0.00000  0.00501 -0.07885 -0.04603
  2.04204  0.00000  0.00001  0.00007  0.00024
  2.19911  0.00000  0.00002  0.00004  0.00042
  2.35619  0.00000  0.00002 -0.00004  0.00041
  2.51327  0.00000  0.00001 -0.00006  0.00021
  2.67035  0.00000  0.00000 -0.00003  0.00006
  2.82743  0.00000  0.00000 -0.00001  0.00001
  2.98451  0.00000  0.00000 -0.00000  0.00000
  3.14159  0.00000  0.00000  0.00000  0.00000

  0.00000  0.31416  0.00000  0.00000  0.00000
  0.15708  0.31416  0.00000  0.00000  0.00000
  0.31416  0.31416  0.00000  0.00000 -0.00000
  0.47124  0.31416  0.00001  0.00011 -0.00009
  0.62832  0.31416  0.00009  0.00134 -0.00146
  0.78540  0.31416  0.00074  0.00865 -0.01257
  0.94248  0.31416  0.00342  0.02670 -0.05835
  1.09956  0.31416  0.00856  0.03323 -0.14612
  1.25664  0.31416  0.01157 -0.00054 -0.19746
  1.41372  0.31416  0.00844 -0.03353 -0.14399
  1.57080  0.31416  0.00333 -0.02610 -0.05657
  1.72788  0.31416  0.00080 -0.00709 -0.01090
  1.88496  0.31416  0.00065  0.00418  0.00558
  2.04204  0.31416  0.00188  0.01068  0.02308
  2.19911  0.31416  0.00337  0.00587  0.04129
  2.35619  0.31416  0.00326 -0.00712  0.03987
  2.51327  0.31416  0.00170 -0.01037  0.02078
  2.67035  0.31416  0.00048 -0.00479  0.00584
  2.82743  0.31416  0.00007 -0.00101  0.00089
  2.98451  0.31416  0.00001 -0.00011  0.00007
  3.14159  0.31416  0.00000  0.00000  0.00000

  0.00000  0.62832  0.00000  0.00000  0.00000
  0.15708  0.62832  0.00000  0.00000  0.00000
  0.31416  0.62832  0.00000  0.00000  0.00000
  0.47124  0.62832  0.00000  0.00000  0.00000
  0.62832  0.62832  0.00000  0.00000  0.00000
  0.78540  0.62832  0.00000  0.00000  0.00000
  0.94248  0.62832  0.00000  0.00000  0.00000
  1.09956  0.62832  0.00000  0.00000  0.00000
  1.25664  0.62832  0.00000  0.00000  0.00000
  1.41372  0.62832  0.00001  0.00011  0.00002
  1.57080  0.62832  0.00011  0.00193  0.00049
  1.72788  0.62832  0.00126  0.01707  0.00554
  1.88496  0.62832  0.00775  0.07440  0.03406
  2.04204  0.62832  0.02571  0.14573  0.11292
  2.19911  0.62832  0.04601  0.08008  0.20204
  2.35619  0.62832  0.04442 -0.09713  0.19509
  2.51327  0.62832  0.02315 -0.14152  0.10165
  2.67035  0.62832  0.00651 -0.06535  0.02858
  2.82743  0.62832  0.00099 -0.01380  0.00434
  2.98451  0.62832  0.00008 -0.00145  0.00036
  3.14159  0.62832  0.00000  0.00000  0.00000

  0.00000  0.94248  0.00000  0.00000  0.00000
  0.15708  0.94248  0.00000  0.00000  0.00000
  0.31416  0.94248  0.00000  0.00000  0.00000
  0.47124  0.94248  0.00000  0.00000  0.00000
  0.62832  0.94248  0.00000  0.00000  0.00000
  0.78540  0.94248  0.00000  0.00000  0.00000
  0.94248  0.94248  0.00000  0.00000  0.00000
  1.09956  0.94248  0.00000  0.00000  0.00000
  1.25664  0.94248  0.00000  0.00000  0.00000
  1.41372  0.94248  0.00001  0.00013 -0.00002
  1.57080  0.94248  0.00013  0.00224 -0.00044
  1.72788  0.94248  0.00146  0.01975 -0.00506
  1.88496  0.94248  0.00897  0.08609 -0.03107
  2.04204  0.94248  0.02975  0.16862 -0.10302
  2.19911  0.94248  0.05324  0.09265 -0.18433
  2.35619  0.94248  0.05140 -0.11239 -0.17799
  2.51327  0.94248  0.02678 -0.16374 -0.09274
  2.67035  0.94248  0.00753 -0.07562 -0.02608
  2.82743  0.94248  0.00114 -0.01596 -0.00396
  2.98451  0.94248  0.00009 -0.00167 -0.00032
  3.14159  0.94248  0.00000  0.00000  0.00000

  0.00000  1.25664  0.00000  0.00000  0.00000
  0.15708  1.25664  0.00000  0.00000  0.00000
  0.31416  1.25664  0.00000  0.00000  0.00000
  0.47124  1.25664  0.00000  0.00000  0.00000
  0.62832  1.25664  0.00000  0.00000  0.00000
  0.78540  1.25664  0.00000  0.00000  0.00000
  0.94248  1.25664  0.00000  0.00000  0.00000
  1.09956  1.25664  0.00000  0.00000  0.00000
  1.25664  1.25664  0.00000  0.00000  0.00000
  1.41372  1.25664  0.00000  0.00001 -0.00001
  1.57080  1.25664  0.00001  0.00022 -0.00014
  1.72788  1.25664  0.00014  0.00194 -0.00162
  1.88496  1.25664  0.00088  0.00845 -0.00996
  2.04204  1.25664  0.00292  0.01655 -0.03304
  2.19911  1.25664  0.00522  0.00909 -0.05911
  2.35619  1.25664  0.00504 -0.01103 -0.05708
  2.51327  1.25664  0.00263 -0.01607 -0.02974
  2.67035  1.25664  0.00074 -0.00742 -0.00836
  2.82743  1.25664  0.00011 -0.00157 -0.00127
  2.98451  1.25664  0.00001 -0.00016 -0.00010
  3.14159  1.25664  0.00000  0.00000  0.00000

  0.00000  1.57080  0.00000  0.00000  0.00000
  0.15708  1.57080  0.00000  0.00000  0.00000
  0.31416  1.57080  0.00000  0.00000  0.00000
  0.47124  1.57080  0.00000  0.00000  0.00000
  0.62832  1.57080  0.00000  0.00000  0.00000
  0.78540  1.57080  0.00000  0.00000  0.00000
  0.94248  1.57080  0.00000  0.00000  0.00000
  1.09956  1.57080  0.00000  0.00000  0.00000
  1.25664  1.57080  0.00000  0.00000  0.00000
  1.41372  1.57080  0.00000  0.00000 -0.00000
  1.57080  1.57080  0.00000  0.00000 -0.00000
  1.72788  1.57080  0.00000  0.00002 -0.00002
  1.88496  1.57080  0.00001  0.00007 -0.00014
  2.04204  1.57080  0.00002  0.00014 -0.00047
  2.19911  1.57080  0.00004  0.00008 -0.00083
  2.35619  1.57080  0.00004 -0.00009 -0.00080
  2.51327  1.57080  0.00002 -0.00013 -0.00042
  2.67035  1.57080  0.00001 -0.00006 -0.00012
  2.82743  1.57080  0.00000 -0.00001 -0.00002
  2.98451  1.57080  0.00000 -0.00000 -0.00000
  3.14159  1.57080  0.00000  0.00000  0.00000

  0.00000  1.88496  0.00000  0.00000  0.00000
  0.15708  1.88496  0.00000  0.00000  0.00000
  0.31416  1.88496  0.00000  0.00000  0.00000
  0.47124  1.88496  0.00000  0.00000  0.00000
  0.62832  1.88496  0.00000  0.00000  0.00000
  0.78540  1.88496  0.00000  0.00000  0.00000
  0.94248  1.88496  0.00000  0.00000  0.00000
  1.09956  1.88496  0.00000  0.00000  0.00000
  1.25664  1.88496  0.00000  0.00000  0.00000
  1.41372  1.88496  0.00000  0.00000  0.00000
  1.57080  1.88496  0.00000  0.00000  0.00000
  1.72788  1.88496  0.00000  0.00000  0.00000
  1.88496  1.88496  0.00000  0.00000  0.00000
  2.04204  1.88496  0.00000  0.00000  0.00000
  2.19911  1.88496  0.00000  0.00000  0.00000
  2.35619  1.88496  0.00000  0.00000  0.00000
  2.51327  1.88496  0.00000  0.00000  0.00000
  2.67035  1.88496  0.00000  0.00000  0.00000
  2.82743  1.88496  0.00000 -0.00000  0.00000
  2.98451  1.88496  0.00000 -0.00000  0.00000
  3.14159  1.88496  0.00000 -0.00000  0.00000

  0.00000  2.19911  0.00000  0.00000  0.00000
  0.15708  2.19911  0.00000  0.00000  0.00000
  0.31416  2.19911  0.00000  0.00000  0.00000
  0.47124  2.19911  0.00000  0.00000  0.00000
  0.62832  2.19911  0.00000  0.00000  0.00000
  0.78540  2.19911  0.00000  0.00000  0.00000
  0.94248  2.19911  0.00000  0.00000  0.00000
  1.09956  2.19911  0.00000  0.00000  0.00000
  1.25664  2.19911  0.00000  0.00000  0.00000
  1.41372  2.19911  0.00000  0.00000  0.00000
  1.57080  2.19911  0.00000  0.00000  0.00000
  1.72788  2.19911  0.00000  0.00000  0.00000
  1.88496  2.19911  0.00000  0.00000  0.00000
  2.04204  2.19911  0.00000  0.00000  0.00000
  2.19911  2.19911  0.00000  0.00000  0.00000
  2.35619  2.19911  0.00000  0.00000  0.00000
  2.51327  2.19911  0.00000  0.00000  0.00000
  2.67035  2.19911  0.00000  0.00000  0.00000
  2.82743  2.19911  0.00000 -0.00000  0.00000
  2.98451  2.19911  0.00000 -0.00000  0.00000
  3.14159  2.19911  0.00000 -0.00000  0.00000

  0.00000  2.51327  0.00000  0.00000  0.00000
  0.15708  2.51327  0.00000  0.00000  0.00000
  0.31416  2.51327  0.00000  0.00000  0.00000
  0.47124  2.51327  0.00000  0.00000  0.00000
  0.62832  2.51327  0.00000  0.00000  0.00000
  0.78540  2.51327  0.00000  0.00000  0.00000
  0.94248  2.51327  0.00000  0.00000  0.00000
  1.09956  2.51327  0.00000  0.00000  0.00000
  1.25664  2.51327  0.00000  0.00000  0.00000
  1.41372  2.51327  0.00000  0.00000  0.00000
  1.57080  2.51327  0.00000  0.00000  0.00000
  1.72788  2.51327  0.00000  0.00000  0.00000
  1.88496  2.51327  0.00000  0.00000  0.00000
  2.04204  2.51327  0.00000  0.00000  0.00000
  2.19911  2.51327  0.00000  0.00000  0.00000
  2.35619  2.51327  0.00000  0.00000  0.00000
  2.51327  2.51327  0.00000  0.00000  0.00001
  2.67035  2.51327  0.00000  0.00000  0.00001
  2.82743  2.51327  0.00000 -0.00000  0.00001
  2.98451  2.51327  0.00000 -0.00000  0.00001
  3.14159  2.51327  0.00000 -0.00000  0.00000

  0.00000  2.82743  0.00000  0.00000  0.00000
  0.15708  2.82743  0.00000  0.00000  0.00000
  0.31416  2.82743  0.00000  0.00000  0.00000
  0.47124  2.82743  0.00000  0.00000  0.00000
  0.62832  2.82743  0.00000  0.00000  0.00000
  0.78540  2.82743  0.00000  0.00000  0.00000
  0.94248  2.82743  0.00000  0.00000  0.00000
  1.09956  2.82743  0.00000  0.00000  0.00000
  1.25664  2.82743  0.00000  0.00000  0.00000
  1.41372  2.82743  0.00000  0.00000  0.00000
  1.57080  2.82743  0.00000  0.00000  0.00000
  1.72788  2.82743  0.00000  0.00000  0.00000
  1.88496  2.82743  0.00000  0.00000  0.00000
  2.04204  2.82743  0.00000  0.00000  0.00000
  2.19911  2.82743  0.00000  0.00000  0.00000
  2.35619  2.82743  0.00000  0.00001  0.00000
  2.51327  2.82743  0.00000  0.00004  0.00002
  2.67035  2.82743  0.00001  0.00004  0.00004
  2.82743  2.82743  0.00001 -0.00001  0.00005
  2.98451  2.82743  0.00001 -0.00004  0.00003
  3.14159  2.82743  0.00000 -0.00003  0.00001
VALUEthe name of the value that should be read from the grid=h aa: ANGLECalculate one or multiple angle/s. More details ATOMSthe list of atoms involved in this collective variable (either 3 or 4 atoms)=1,2,3 tt: TORSIONCalculate one or multiple torsional angles. More details ATOMSthe four atoms involved in the torsional angle=1,2,3,4 val: EVALUATE_FUNCTION_FROM_GRIDCalculate the function stored on the input grid at an arbitrary point More details ... GRIDthe name of the grid that we are using to evaluate the function=ff INTERPOLATION_TYPE the method to use for interpolation=spline ZERO_OUTSIDE_GRID_RANGE if we are asked to evaluate the function for a number that is outside the range of the grid set it to zero ... PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=aa,tt,val FILEthe name of the file on which to output these quantities=colvar

Notice that the ARG command does not need to be used with the EVALUATE_FUNCTION_FROM_GRID command to specify the labels of the input arguments at which you would like the function to be evaluated. Instead, you only specify the GRID that is being used as input for the interpolation. The reason that it is not necessary to specify the arguments is that PLUMED stores labels for each coordinate axis of a grid. These labels appear at the top of the columns that contain the grid points when you output grids using DUMPGRID. Furthermore, in the first of the inputs above the labels of these input arguments are specified using the VAR option for REFERENCE_GRID. Meanwhile, for the second the titles of the columsn are read in from the input file. Consequently, PLUMED searches for a value named d1 when evaluating ff in the first input. For the second input it searches for values labelled aa and tt and evaluates val from them. You can, however, also use an ARG keyword in the input file as illustrated below if this helps you to remember what precisely is being evluated:

Click on the labels of the actions for more information on what each action computes
tested on2.11
d2: REFERENCE_GRIDSetup a constant grid by either reading values from a file or definining a function in input More details GRID_MIN the lower bounds for the grid=0 GRID_MAX the upper bounds for the grid=10 GRID_BINthe number of bins for the grid=20 FUNCthe function to compute on the grid=d1*d1 VARthe names to give each of the grid directions in the function=d1 PERIODICare the grid directions periodic=NO
d1: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMSthe pair of atom that we are calculating the distance between=1,2
ff: EVALUATE_FUNCTION_FROM_GRIDCalculate the function stored on the input grid at an arbitrary point More details GRIDthe name of the grid that we are using to evaluate the function=d2 ARGthe arguments that you would like to use when evaluating the function=d1
PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=d1,ff FILEthe name of the file on which to output these quantities=colvar

Notice that input the inputs above the input values are scalars. The output from EVALUATE_FUNCTION_FROM_GRID is thus also a scalar. If, however, one uses an input such as the one shown below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/gridtools/rt-weights-integral/kde.grid

ff: REFERENCE_GRIDSetup a constant grid by either reading values from a file or definining a function in input More details FILEthe name of the file that contains the reference data=
regtest/gridtools/rt-weights-integral/kde.grid
Click here to see an extract from this file.
×

FILE: regtest/gridtools/rt-weights-integral/kde.grid

#! FIELDS aa tt h dh_aa dh_tt
#! SET min_aa 0
#! SET max_aa pi
#! SET nbins_aa  20
#! SET periodic_aa false
#! SET min_tt -pi
#! SET max_tt pi
#! SET nbins_tt  20
#! SET periodic_tt true
  0.00000 -3.14159  0.00000  0.00000  0.00000
  0.15708 -3.14159  0.00000  0.00000  0.00000
  0.31416 -3.14159  0.00000  0.00000  0.00000
  0.47124 -3.14159  0.00000  0.00000  0.00000
  0.62832 -3.14159  0.00000  0.00000  0.00000
  0.78540 -3.14159  0.00000  0.00000  0.00000
  0.94248 -3.14159  0.00000  0.00000  0.00000
  1.09956 -3.14159  0.00000  0.00000  0.00000
  1.25664 -3.14159  0.00000  0.00000  0.00000
  1.41372 -3.14159  0.00000  0.00000  0.00000
  1.57080 -3.14159  0.00000  0.00000  0.00000
  1.72788 -3.14159  0.00000  0.00000  0.00000
  1.88496 -3.14159  0.00000  0.00000 -0.00000
  2.04204 -3.14159  0.00000  0.00000 -0.00000
  2.19911 -3.14159  0.00000  0.00000 -0.00000
  2.35619 -3.14159  0.00000  0.00001 -0.00000
  2.51327 -3.14159  0.00000  0.00003 -0.00002
  2.67035 -3.14159  0.00001  0.00003 -0.00004
  2.82743 -3.14159  0.00001 -0.00001 -0.00005
  2.98451 -3.14159  0.00001 -0.00004 -0.00003
  3.14159 -3.14159  0.00000 -0.00003 -0.00001

  0.00000 -2.82743  0.00000  0.00000  0.00000
  0.15708 -2.82743  0.00000  0.00000  0.00000
  0.31416 -2.82743  0.00000  0.00000  0.00000
  0.47124 -2.82743  0.00000  0.00000  0.00000
  0.62832 -2.82743  0.00000  0.00000  0.00000
  0.78540 -2.82743  0.00000  0.00000  0.00000
  0.94248 -2.82743  0.00000  0.00000  0.00000
  1.09956 -2.82743  0.00000  0.00000  0.00000
  1.25664 -2.82743  0.00000  0.00000  0.00000
  1.41372 -2.82743  0.00000  0.00000  0.00000
  1.57080 -2.82743  0.00000  0.00000  0.00000
  1.72788 -2.82743  0.00000  0.00000  0.00000
  1.88496 -2.82743  0.00000  0.00000 -0.00000
  2.04204 -2.82743  0.00000  0.00000 -0.00000
  2.19911 -2.82743  0.00000  0.00000 -0.00000
  2.35619 -2.82743  0.00000  0.00000 -0.00000
  2.51327 -2.82743  0.00000  0.00000 -0.00000
  2.67035 -2.82743  0.00000  0.00000 -0.00001
  2.82743 -2.82743  0.00000 -0.00000 -0.00001
  2.98451 -2.82743  0.00000 -0.00000 -0.00001
  3.14159 -2.82743  0.00000 -0.00000 -0.00000

  0.00000 -2.51327  0.00000  0.00000  0.00000
  0.15708 -2.51327  0.00000  0.00000  0.00000
  0.31416 -2.51327  0.00000  0.00000  0.00000
  0.47124 -2.51327  0.00000  0.00000  0.00000
  0.62832 -2.51327  0.00000  0.00000  0.00000
  0.78540 -2.51327  0.00000  0.00000  0.00000
  0.94248 -2.51327  0.00000  0.00000  0.00000
  1.09956 -2.51327  0.00000  0.00000  0.00000
  1.25664 -2.51327  0.00000  0.00000  0.00000
  1.41372 -2.51327  0.00000  0.00000  0.00000
  1.57080 -2.51327  0.00000  0.00000  0.00000
  1.72788 -2.51327  0.00000  0.00000  0.00000
  1.88496 -2.51327  0.00000  0.00000 -0.00000
  2.04204 -2.51327  0.00000  0.00000 -0.00000
  2.19911 -2.51327  0.00000  0.00000 -0.00000
  2.35619 -2.51327  0.00000  0.00000 -0.00000
  2.51327 -2.51327  0.00000  0.00000 -0.00000
  2.67035 -2.51327  0.00000  0.00000 -0.00000
  2.82743 -2.51327  0.00000 -0.00000 -0.00000
  2.98451 -2.51327  0.00000 -0.00000 -0.00000
  3.14159 -2.51327  0.00000 -0.00000 -0.00000

  0.00000 -2.19911  0.00000  0.00000  0.00000
  0.15708 -2.19911  0.00000  0.00000  0.00000
  0.31416 -2.19911  0.00000  0.00000  0.00000
  0.47124 -2.19911  0.00000  0.00000  0.00000
  0.62832 -2.19911  0.00000  0.00000  0.00000
  0.78540 -2.19911  0.00000  0.00000  0.00000
  0.94248 -2.19911  0.00000  0.00000  0.00000
  1.09956 -2.19911  0.00000  0.00000  0.00000
  1.25664 -2.19911  0.00000  0.00000  0.00000
  1.41372 -2.19911  0.00000  0.00000  0.00000
  1.57080 -2.19911  0.00000  0.00000  0.00000
  1.72788 -2.19911  0.00000  0.00000  0.00000
  1.88496 -2.19911  0.00000  0.00000  0.00000
  2.04204 -2.19911  0.00000  0.00000  0.00000
  2.19911 -2.19911  0.00000  0.00000  0.00000
  2.35619 -2.19911  0.00000  0.00000  0.00000
  2.51327 -2.19911  0.00000  0.00000  0.00000
  2.67035 -2.19911  0.00000  0.00000  0.00000
  2.82743 -2.19911  0.00000  0.00000  0.00000
  2.98451 -2.19911  0.00000  0.00000  0.00000
  3.14159 -2.19911  0.00000  0.00000  0.00000

  0.00000 -1.88496  0.00000  0.00000  0.00000
  0.15708 -1.88496  0.00000  0.00000  0.00000
  0.31416 -1.88496  0.00000  0.00000  0.00000
  0.47124 -1.88496  0.00000  0.00000  0.00000
  0.62832 -1.88496  0.00000  0.00000  0.00000
  0.78540 -1.88496  0.00000  0.00000  0.00000
  0.94248 -1.88496  0.00000  0.00000  0.00000
  1.09956 -1.88496  0.00000  0.00000  0.00000
  1.25664 -1.88496  0.00000  0.00000  0.00000
  1.41372 -1.88496  0.00000  0.00000  0.00000
  1.57080 -1.88496  0.00000  0.00000  0.00000
  1.72788 -1.88496  0.00000  0.00000  0.00000
  1.88496 -1.88496  0.00000  0.00000  0.00000
  2.04204 -1.88496  0.00000  0.00000  0.00000
  2.19911 -1.88496  0.00000  0.00000  0.00000
  2.35619 -1.88496  0.00000  0.00000  0.00000
  2.51327 -1.88496  0.00000  0.00000  0.00000
  2.67035 -1.88496  0.00000  0.00000  0.00000
  2.82743 -1.88496  0.00000  0.00000  0.00000
  2.98451 -1.88496  0.00000  0.00000  0.00000
  3.14159 -1.88496  0.00000  0.00000  0.00000

  0.00000 -1.57080  0.00000  0.00000  0.00000
  0.15708 -1.57080  0.00000  0.00000  0.00000
  0.31416 -1.57080  0.00000  0.00000  0.00000
  0.47124 -1.57080  0.00000  0.00000  0.00000
  0.62832 -1.57080  0.00000  0.00000  0.00000
  0.78540 -1.57080  0.00000  0.00000  0.00000
  0.94248 -1.57080  0.00000  0.00000  0.00000
  1.09956 -1.57080  0.00000  0.00000  0.00000
  1.25664 -1.57080  0.00000 -0.00000  0.00000
  1.41372 -1.57080  0.00000 -0.00000  0.00000
  1.57080 -1.57080  0.00000 -0.00000  0.00000
  1.72788 -1.57080  0.00000 -0.00000  0.00000
  1.88496 -1.57080  0.00000 -0.00000  0.00000
  2.04204 -1.57080  0.00000  0.00000  0.00000
  2.19911 -1.57080  0.00000  0.00000  0.00000
  2.35619 -1.57080  0.00000  0.00000  0.00000
  2.51327 -1.57080  0.00000  0.00000  0.00000
  2.67035 -1.57080  0.00000  0.00000  0.00000
  2.82743 -1.57080  0.00000  0.00000  0.00000
  2.98451 -1.57080  0.00000  0.00000  0.00000
  3.14159 -1.57080  0.00000  0.00000  0.00000

  0.00000 -1.25664  0.00000  0.00000  0.00000
  0.15708 -1.25664  0.00000  0.00000  0.00000
  0.31416 -1.25664  0.00000  0.00000  0.00000
  0.47124 -1.25664  0.00000  0.00000  0.00000
  0.62832 -1.25664  0.00000  0.00002  0.00003
  0.78540 -1.25664  0.00001  0.00015  0.00029
  0.94248 -1.25664  0.00006  0.00047  0.00133
  1.09956 -1.25664  0.00015  0.00058  0.00334
  1.25664 -1.25664  0.00020 -0.00001  0.00451
  1.41372 -1.25664  0.00015 -0.00059  0.00329
  1.57080 -1.25664  0.00006 -0.00046  0.00129
  1.72788 -1.25664  0.00001 -0.00015  0.00027
  1.88496 -1.25664  0.00000 -0.00002  0.00003
  2.04204 -1.25664  0.00000  0.00000  0.00000
  2.19911 -1.25664  0.00000  0.00000  0.00000
  2.35619 -1.25664  0.00000  0.00000  0.00000
  2.51327 -1.25664  0.00000  0.00000  0.00000
  2.67035 -1.25664  0.00000  0.00000  0.00000
  2.82743 -1.25664  0.00000  0.00000  0.00000
  2.98451 -1.25664  0.00000  0.00000  0.00000
  3.14159 -1.25664  0.00000  0.00000  0.00000

  0.00000 -0.94248  0.00000  0.00000  0.00000
  0.15708 -0.94248  0.00000  0.00000  0.00000
  0.31416 -0.94248  0.00000  0.00002  0.00001
  0.47124 -0.94248  0.00003  0.00058  0.00042
  0.62832 -0.94248  0.00047  0.00735  0.00674
  0.78540 -0.94248  0.00404  0.04737  0.05795
  0.94248 -0.94248  0.01873  0.14626  0.26892
  1.09956 -0.94248  0.04691  0.18203  0.67341
  1.25664 -0.94248  0.06339 -0.00296  0.91000
  1.41372 -0.94248  0.04623 -0.18370  0.66360
  1.57080 -0.94248  0.01819 -0.14373  0.26114
  1.72788 -0.94248  0.00386 -0.04569  0.05546
  1.88496 -0.94248  0.00044 -0.00698  0.00636
  2.04204 -0.94248  0.00000  0.00000  0.00000
  2.19911 -0.94248  0.00000  0.00000  0.00000
  2.35619 -0.94248  0.00000  0.00000  0.00000
  2.51327 -0.94248  0.00000  0.00000  0.00000
  2.67035 -0.94248  0.00000  0.00000  0.00000
  2.82743 -0.94248  0.00000  0.00000  0.00000
  2.98451 -0.94248  0.00000  0.00000  0.00000
  3.14159 -0.94248  0.00000  0.00000  0.00000

  0.00000 -0.62832  0.00000  0.00000  0.00000
  0.15708 -0.62832  0.00000  0.00000  0.00000
  0.31416 -0.62832  0.00003  0.00062  0.00017
  0.47124 -0.62832  0.00078  0.01528  0.00507
  0.62832 -0.62832  0.01243  0.19462  0.08078
  0.78540 -0.62832  0.10686  1.25389  0.69464
  0.94248 -0.62832  0.49585  3.87126  3.22336
  1.09956 -0.62832  1.24168  4.81806  8.07169
  1.25664 -0.62832  1.67791 -0.07837 10.90751
  1.41372 -0.62832  1.22359 -4.86218  7.95412
  1.57080 -0.62832  0.48151 -3.80428  3.13014
  1.72788 -0.62832  0.10226 -1.20944  0.66472
  1.88496 -0.62832  0.01172 -0.18462  0.07618
  2.04204 -0.62832  0.00000  0.00000  0.00000
  2.19911 -0.62832  0.00000  0.00000  0.00000
  2.35619 -0.62832  0.00000  0.00000  0.00000
  2.51327 -0.62832  0.00000  0.00000  0.00000
  2.67035 -0.62832  0.00000  0.00000  0.00000
  2.82743 -0.62832  0.00000  0.00000  0.00000
  2.98451 -0.62832  0.00000  0.00000  0.00000
  3.14159 -0.62832  0.00000  0.00000  0.00000

  0.00000 -0.31416  0.00000  0.00000  0.00000
  0.15708 -0.31416  0.00000  0.00000  0.00000
  0.31416 -0.31416  0.00006  0.00139 -0.00008
  0.47124 -0.31416  0.00175  0.03429 -0.00237
  0.62832 -0.31416  0.02789  0.43684 -0.03775
  0.78540 -0.31416  0.23985  2.81450 -0.32460
  0.94248 -0.31416  1.11300  8.68950 -1.50627
  1.09956 -0.31416  2.78709 10.81470 -3.77189
  1.25664 -0.31416  3.76628 -0.17591 -5.09706
  1.41372 -0.31416  2.74649 -10.91373 -3.71695
  1.57080 -0.31416  1.08081 -8.53916 -1.46271
  1.72788 -0.31416  0.22952 -2.71473 -0.31062
  1.88496 -0.31416  0.02630 -0.41440 -0.03560
  2.04204 -0.31416  0.00000  0.00000  0.00000
  2.19911 -0.31416  0.00000  0.00000  0.00000
  2.35619 -0.31416  0.00000 -0.00000  0.00000
  2.51327 -0.31416  0.00000 -0.00000  0.00000
  2.67035 -0.31416  0.00000 -0.00000  0.00000
  2.82743 -0.31416  0.00000 -0.00000  0.00000
  2.98451 -0.31416  0.00000 -0.00000  0.00000
  3.14159 -0.31416  0.00000  0.00000  0.00000

  0.00000  0.00000  0.00000  0.00000  0.00000
  0.15708  0.00000  0.00000  0.00000  0.00000
  0.31416  0.00000  0.00001  0.00027 -0.00010
  0.47124  0.00000  0.00033  0.00653 -0.00307
  0.62832  0.00000  0.00531  0.08316 -0.04889
  0.78540  0.00000  0.04566  0.53575 -0.42038
  0.94248  0.00000  0.21186  1.65409 -1.95071
  1.09956  0.00000  0.53054  2.05863 -4.88482
  1.25664  0.00000  0.71693 -0.03349 -6.60099
  1.41372  0.00000  0.52281 -2.07748 -4.81366
  1.57080  0.00000  0.20574 -1.62547 -1.89429
  1.72788  0.00000  0.04369 -0.51675 -0.40226
  1.88496  0.00000  0.00501 -0.07885 -0.04603
  2.04204  0.00000  0.00001  0.00007  0.00024
  2.19911  0.00000  0.00002  0.00004  0.00042
  2.35619  0.00000  0.00002 -0.00004  0.00041
  2.51327  0.00000  0.00001 -0.00006  0.00021
  2.67035  0.00000  0.00000 -0.00003  0.00006
  2.82743  0.00000  0.00000 -0.00001  0.00001
  2.98451  0.00000  0.00000 -0.00000  0.00000
  3.14159  0.00000  0.00000  0.00000  0.00000

  0.00000  0.31416  0.00000  0.00000  0.00000
  0.15708  0.31416  0.00000  0.00000  0.00000
  0.31416  0.31416  0.00000  0.00000 -0.00000
  0.47124  0.31416  0.00001  0.00011 -0.00009
  0.62832  0.31416  0.00009  0.00134 -0.00146
  0.78540  0.31416  0.00074  0.00865 -0.01257
  0.94248  0.31416  0.00342  0.02670 -0.05835
  1.09956  0.31416  0.00856  0.03323 -0.14612
  1.25664  0.31416  0.01157 -0.00054 -0.19746
  1.41372  0.31416  0.00844 -0.03353 -0.14399
  1.57080  0.31416  0.00333 -0.02610 -0.05657
  1.72788  0.31416  0.00080 -0.00709 -0.01090
  1.88496  0.31416  0.00065  0.00418  0.00558
  2.04204  0.31416  0.00188  0.01068  0.02308
  2.19911  0.31416  0.00337  0.00587  0.04129
  2.35619  0.31416  0.00326 -0.00712  0.03987
  2.51327  0.31416  0.00170 -0.01037  0.02078
  2.67035  0.31416  0.00048 -0.00479  0.00584
  2.82743  0.31416  0.00007 -0.00101  0.00089
  2.98451  0.31416  0.00001 -0.00011  0.00007
  3.14159  0.31416  0.00000  0.00000  0.00000

  0.00000  0.62832  0.00000  0.00000  0.00000
  0.15708  0.62832  0.00000  0.00000  0.00000
  0.31416  0.62832  0.00000  0.00000  0.00000
  0.47124  0.62832  0.00000  0.00000  0.00000
  0.62832  0.62832  0.00000  0.00000  0.00000
  0.78540  0.62832  0.00000  0.00000  0.00000
  0.94248  0.62832  0.00000  0.00000  0.00000
  1.09956  0.62832  0.00000  0.00000  0.00000
  1.25664  0.62832  0.00000  0.00000  0.00000
  1.41372  0.62832  0.00001  0.00011  0.00002
  1.57080  0.62832  0.00011  0.00193  0.00049
  1.72788  0.62832  0.00126  0.01707  0.00554
  1.88496  0.62832  0.00775  0.07440  0.03406
  2.04204  0.62832  0.02571  0.14573  0.11292
  2.19911  0.62832  0.04601  0.08008  0.20204
  2.35619  0.62832  0.04442 -0.09713  0.19509
  2.51327  0.62832  0.02315 -0.14152  0.10165
  2.67035  0.62832  0.00651 -0.06535  0.02858
  2.82743  0.62832  0.00099 -0.01380  0.00434
  2.98451  0.62832  0.00008 -0.00145  0.00036
  3.14159  0.62832  0.00000  0.00000  0.00000

  0.00000  0.94248  0.00000  0.00000  0.00000
  0.15708  0.94248  0.00000  0.00000  0.00000
  0.31416  0.94248  0.00000  0.00000  0.00000
  0.47124  0.94248  0.00000  0.00000  0.00000
  0.62832  0.94248  0.00000  0.00000  0.00000
  0.78540  0.94248  0.00000  0.00000  0.00000
  0.94248  0.94248  0.00000  0.00000  0.00000
  1.09956  0.94248  0.00000  0.00000  0.00000
  1.25664  0.94248  0.00000  0.00000  0.00000
  1.41372  0.94248  0.00001  0.00013 -0.00002
  1.57080  0.94248  0.00013  0.00224 -0.00044
  1.72788  0.94248  0.00146  0.01975 -0.00506
  1.88496  0.94248  0.00897  0.08609 -0.03107
  2.04204  0.94248  0.02975  0.16862 -0.10302
  2.19911  0.94248  0.05324  0.09265 -0.18433
  2.35619  0.94248  0.05140 -0.11239 -0.17799
  2.51327  0.94248  0.02678 -0.16374 -0.09274
  2.67035  0.94248  0.00753 -0.07562 -0.02608
  2.82743  0.94248  0.00114 -0.01596 -0.00396
  2.98451  0.94248  0.00009 -0.00167 -0.00032
  3.14159  0.94248  0.00000  0.00000  0.00000

  0.00000  1.25664  0.00000  0.00000  0.00000
  0.15708  1.25664  0.00000  0.00000  0.00000
  0.31416  1.25664  0.00000  0.00000  0.00000
  0.47124  1.25664  0.00000  0.00000  0.00000
  0.62832  1.25664  0.00000  0.00000  0.00000
  0.78540  1.25664  0.00000  0.00000  0.00000
  0.94248  1.25664  0.00000  0.00000  0.00000
  1.09956  1.25664  0.00000  0.00000  0.00000
  1.25664  1.25664  0.00000  0.00000  0.00000
  1.41372  1.25664  0.00000  0.00001 -0.00001
  1.57080  1.25664  0.00001  0.00022 -0.00014
  1.72788  1.25664  0.00014  0.00194 -0.00162
  1.88496  1.25664  0.00088  0.00845 -0.00996
  2.04204  1.25664  0.00292  0.01655 -0.03304
  2.19911  1.25664  0.00522  0.00909 -0.05911
  2.35619  1.25664  0.00504 -0.01103 -0.05708
  2.51327  1.25664  0.00263 -0.01607 -0.02974
  2.67035  1.25664  0.00074 -0.00742 -0.00836
  2.82743  1.25664  0.00011 -0.00157 -0.00127
  2.98451  1.25664  0.00001 -0.00016 -0.00010
  3.14159  1.25664  0.00000  0.00000  0.00000

  0.00000  1.57080  0.00000  0.00000  0.00000
  0.15708  1.57080  0.00000  0.00000  0.00000
  0.31416  1.57080  0.00000  0.00000  0.00000
  0.47124  1.57080  0.00000  0.00000  0.00000
  0.62832  1.57080  0.00000  0.00000  0.00000
  0.78540  1.57080  0.00000  0.00000  0.00000
  0.94248  1.57080  0.00000  0.00000  0.00000
  1.09956  1.57080  0.00000  0.00000  0.00000
  1.25664  1.57080  0.00000  0.00000  0.00000
  1.41372  1.57080  0.00000  0.00000 -0.00000
  1.57080  1.57080  0.00000  0.00000 -0.00000
  1.72788  1.57080  0.00000  0.00002 -0.00002
  1.88496  1.57080  0.00001  0.00007 -0.00014
  2.04204  1.57080  0.00002  0.00014 -0.00047
  2.19911  1.57080  0.00004  0.00008 -0.00083
  2.35619  1.57080  0.00004 -0.00009 -0.00080
  2.51327  1.57080  0.00002 -0.00013 -0.00042
  2.67035  1.57080  0.00001 -0.00006 -0.00012
  2.82743  1.57080  0.00000 -0.00001 -0.00002
  2.98451  1.57080  0.00000 -0.00000 -0.00000
  3.14159  1.57080  0.00000  0.00000  0.00000

  0.00000  1.88496  0.00000  0.00000  0.00000
  0.15708  1.88496  0.00000  0.00000  0.00000
  0.31416  1.88496  0.00000  0.00000  0.00000
  0.47124  1.88496  0.00000  0.00000  0.00000
  0.62832  1.88496  0.00000  0.00000  0.00000
  0.78540  1.88496  0.00000  0.00000  0.00000
  0.94248  1.88496  0.00000  0.00000  0.00000
  1.09956  1.88496  0.00000  0.00000  0.00000
  1.25664  1.88496  0.00000  0.00000  0.00000
  1.41372  1.88496  0.00000  0.00000  0.00000
  1.57080  1.88496  0.00000  0.00000  0.00000
  1.72788  1.88496  0.00000  0.00000  0.00000
  1.88496  1.88496  0.00000  0.00000  0.00000
  2.04204  1.88496  0.00000  0.00000  0.00000
  2.19911  1.88496  0.00000  0.00000  0.00000
  2.35619  1.88496  0.00000  0.00000  0.00000
  2.51327  1.88496  0.00000  0.00000  0.00000
  2.67035  1.88496  0.00000  0.00000  0.00000
  2.82743  1.88496  0.00000 -0.00000  0.00000
  2.98451  1.88496  0.00000 -0.00000  0.00000
  3.14159  1.88496  0.00000 -0.00000  0.00000

  0.00000  2.19911  0.00000  0.00000  0.00000
  0.15708  2.19911  0.00000  0.00000  0.00000
  0.31416  2.19911  0.00000  0.00000  0.00000
  0.47124  2.19911  0.00000  0.00000  0.00000
  0.62832  2.19911  0.00000  0.00000  0.00000
  0.78540  2.19911  0.00000  0.00000  0.00000
  0.94248  2.19911  0.00000  0.00000  0.00000
  1.09956  2.19911  0.00000  0.00000  0.00000
  1.25664  2.19911  0.00000  0.00000  0.00000
  1.41372  2.19911  0.00000  0.00000  0.00000
  1.57080  2.19911  0.00000  0.00000  0.00000
  1.72788  2.19911  0.00000  0.00000  0.00000
  1.88496  2.19911  0.00000  0.00000  0.00000
  2.04204  2.19911  0.00000  0.00000  0.00000
  2.19911  2.19911  0.00000  0.00000  0.00000
  2.35619  2.19911  0.00000  0.00000  0.00000
  2.51327  2.19911  0.00000  0.00000  0.00000
  2.67035  2.19911  0.00000  0.00000  0.00000
  2.82743  2.19911  0.00000 -0.00000  0.00000
  2.98451  2.19911  0.00000 -0.00000  0.00000
  3.14159  2.19911  0.00000 -0.00000  0.00000

  0.00000  2.51327  0.00000  0.00000  0.00000
  0.15708  2.51327  0.00000  0.00000  0.00000
  0.31416  2.51327  0.00000  0.00000  0.00000
  0.47124  2.51327  0.00000  0.00000  0.00000
  0.62832  2.51327  0.00000  0.00000  0.00000
  0.78540  2.51327  0.00000  0.00000  0.00000
  0.94248  2.51327  0.00000  0.00000  0.00000
  1.09956  2.51327  0.00000  0.00000  0.00000
  1.25664  2.51327  0.00000  0.00000  0.00000
  1.41372  2.51327  0.00000  0.00000  0.00000
  1.57080  2.51327  0.00000  0.00000  0.00000
  1.72788  2.51327  0.00000  0.00000  0.00000
  1.88496  2.51327  0.00000  0.00000  0.00000
  2.04204  2.51327  0.00000  0.00000  0.00000
  2.19911  2.51327  0.00000  0.00000  0.00000
  2.35619  2.51327  0.00000  0.00000  0.00000
  2.51327  2.51327  0.00000  0.00000  0.00001
  2.67035  2.51327  0.00000  0.00000  0.00001
  2.82743  2.51327  0.00000 -0.00000  0.00001
  2.98451  2.51327  0.00000 -0.00000  0.00001
  3.14159  2.51327  0.00000 -0.00000  0.00000

  0.00000  2.82743  0.00000  0.00000  0.00000
  0.15708  2.82743  0.00000  0.00000  0.00000
  0.31416  2.82743  0.00000  0.00000  0.00000
  0.47124  2.82743  0.00000  0.00000  0.00000
  0.62832  2.82743  0.00000  0.00000  0.00000
  0.78540  2.82743  0.00000  0.00000  0.00000
  0.94248  2.82743  0.00000  0.00000  0.00000
  1.09956  2.82743  0.00000  0.00000  0.00000
  1.25664  2.82743  0.00000  0.00000  0.00000
  1.41372  2.82743  0.00000  0.00000  0.00000
  1.57080  2.82743  0.00000  0.00000  0.00000
  1.72788  2.82743  0.00000  0.00000  0.00000
  1.88496  2.82743  0.00000  0.00000  0.00000
  2.04204  2.82743  0.00000  0.00000  0.00000
  2.19911  2.82743  0.00000  0.00000  0.00000
  2.35619  2.82743  0.00000  0.00001  0.00000
  2.51327  2.82743  0.00000  0.00004  0.00002
  2.67035  2.82743  0.00001  0.00004  0.00004
  2.82743  2.82743  0.00001 -0.00001  0.00005
  2.98451  2.82743  0.00001 -0.00004  0.00003
  3.14159  2.82743  0.00000 -0.00003  0.00001
VALUEthe name of the value that should be read from the grid=h aa: ANGLECalculate one or multiple angle/s. More details ATOMS1the list of atoms involved in this collective variable (either 3 or 4 atoms)=1,2,3 ATOMS2the list of atoms involved in this collective variable (either 3 or 4 atoms)=4,5,6 ATOMS3the list of atoms involved in this collective variable (either 3 or 4 atoms)=7,8,9 tt: TORSIONCalculate one or multiple torsional angles. More details ATOMS1the four atoms involved in the torsional angle=1,2,3,4 ATOMS2the four atoms involved in the torsional angle=5,6,7,8 ATOMS3the four atoms involved in the torsional angle=9,10,11,12 val: EVALUATE_FUNCTION_FROM_GRIDCalculate the function stored on the input grid at an arbitrary point More details GRIDthe name of the grid that we are using to evaluate the function=ff PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=aa,tt,val FILEthe name of the file on which to output these quantities=colvar

The value, val, that is output by the EVALUATE_FUNCTION_FROM_GRID action will be a vector. In other words, in the same way you can use scalars, vectors, matrices and even functions on grids in the input to the CUSTOM command you can also use scalars, vectors, matrices and functions on grid in the input to the EVALUATE_FUNCTION_FROM_GRID command.

The MASK keyword

If the input to this action is a vector you can use the MASK keyword as illustrated below:

Click on the labels of the actions for more information on what each action computes
tested on2.11
#SETTINGS INPUTFILES=regtest/gridtools/rt-weights-integral/kde.grid

ff: REFERENCE_GRIDSetup a constant grid by either reading values from a file or definining a function in input More details FILEthe name of the file that contains the reference data=
regtest/gridtools/rt-weights-integral/kde.grid
Click here to see an extract from this file.
×

FILE: regtest/gridtools/rt-weights-integral/kde.grid

#! FIELDS aa tt h dh_aa dh_tt
#! SET min_aa 0
#! SET max_aa pi
#! SET nbins_aa  20
#! SET periodic_aa false
#! SET min_tt -pi
#! SET max_tt pi
#! SET nbins_tt  20
#! SET periodic_tt true
  0.00000 -3.14159  0.00000  0.00000  0.00000
  0.15708 -3.14159  0.00000  0.00000  0.00000
  0.31416 -3.14159  0.00000  0.00000  0.00000
  0.47124 -3.14159  0.00000  0.00000  0.00000
  0.62832 -3.14159  0.00000  0.00000  0.00000
  0.78540 -3.14159  0.00000  0.00000  0.00000
  0.94248 -3.14159  0.00000  0.00000  0.00000
  1.09956 -3.14159  0.00000  0.00000  0.00000
  1.25664 -3.14159  0.00000  0.00000  0.00000
  1.41372 -3.14159  0.00000  0.00000  0.00000
  1.57080 -3.14159  0.00000  0.00000  0.00000
  1.72788 -3.14159  0.00000  0.00000  0.00000
  1.88496 -3.14159  0.00000  0.00000 -0.00000
  2.04204 -3.14159  0.00000  0.00000 -0.00000
  2.19911 -3.14159  0.00000  0.00000 -0.00000
  2.35619 -3.14159  0.00000  0.00001 -0.00000
  2.51327 -3.14159  0.00000  0.00003 -0.00002
  2.67035 -3.14159  0.00001  0.00003 -0.00004
  2.82743 -3.14159  0.00001 -0.00001 -0.00005
  2.98451 -3.14159  0.00001 -0.00004 -0.00003
  3.14159 -3.14159  0.00000 -0.00003 -0.00001

  0.00000 -2.82743  0.00000  0.00000  0.00000
  0.15708 -2.82743  0.00000  0.00000  0.00000
  0.31416 -2.82743  0.00000  0.00000  0.00000
  0.47124 -2.82743  0.00000  0.00000  0.00000
  0.62832 -2.82743  0.00000  0.00000  0.00000
  0.78540 -2.82743  0.00000  0.00000  0.00000
  0.94248 -2.82743  0.00000  0.00000  0.00000
  1.09956 -2.82743  0.00000  0.00000  0.00000
  1.25664 -2.82743  0.00000  0.00000  0.00000
  1.41372 -2.82743  0.00000  0.00000  0.00000
  1.57080 -2.82743  0.00000  0.00000  0.00000
  1.72788 -2.82743  0.00000  0.00000  0.00000
  1.88496 -2.82743  0.00000  0.00000 -0.00000
  2.04204 -2.82743  0.00000  0.00000 -0.00000
  2.19911 -2.82743  0.00000  0.00000 -0.00000
  2.35619 -2.82743  0.00000  0.00000 -0.00000
  2.51327 -2.82743  0.00000  0.00000 -0.00000
  2.67035 -2.82743  0.00000  0.00000 -0.00001
  2.82743 -2.82743  0.00000 -0.00000 -0.00001
  2.98451 -2.82743  0.00000 -0.00000 -0.00001
  3.14159 -2.82743  0.00000 -0.00000 -0.00000

  0.00000 -2.51327  0.00000  0.00000  0.00000
  0.15708 -2.51327  0.00000  0.00000  0.00000
  0.31416 -2.51327  0.00000  0.00000  0.00000
  0.47124 -2.51327  0.00000  0.00000  0.00000
  0.62832 -2.51327  0.00000  0.00000  0.00000
  0.78540 -2.51327  0.00000  0.00000  0.00000
  0.94248 -2.51327  0.00000  0.00000  0.00000
  1.09956 -2.51327  0.00000  0.00000  0.00000
  1.25664 -2.51327  0.00000  0.00000  0.00000
  1.41372 -2.51327  0.00000  0.00000  0.00000
  1.57080 -2.51327  0.00000  0.00000  0.00000
  1.72788 -2.51327  0.00000  0.00000  0.00000
  1.88496 -2.51327  0.00000  0.00000 -0.00000
  2.04204 -2.51327  0.00000  0.00000 -0.00000
  2.19911 -2.51327  0.00000  0.00000 -0.00000
  2.35619 -2.51327  0.00000  0.00000 -0.00000
  2.51327 -2.51327  0.00000  0.00000 -0.00000
  2.67035 -2.51327  0.00000  0.00000 -0.00000
  2.82743 -2.51327  0.00000 -0.00000 -0.00000
  2.98451 -2.51327  0.00000 -0.00000 -0.00000
  3.14159 -2.51327  0.00000 -0.00000 -0.00000

  0.00000 -2.19911  0.00000  0.00000  0.00000
  0.15708 -2.19911  0.00000  0.00000  0.00000
  0.31416 -2.19911  0.00000  0.00000  0.00000
  0.47124 -2.19911  0.00000  0.00000  0.00000
  0.62832 -2.19911  0.00000  0.00000  0.00000
  0.78540 -2.19911  0.00000  0.00000  0.00000
  0.94248 -2.19911  0.00000  0.00000  0.00000
  1.09956 -2.19911  0.00000  0.00000  0.00000
  1.25664 -2.19911  0.00000  0.00000  0.00000
  1.41372 -2.19911  0.00000  0.00000  0.00000
  1.57080 -2.19911  0.00000  0.00000  0.00000
  1.72788 -2.19911  0.00000  0.00000  0.00000
  1.88496 -2.19911  0.00000  0.00000  0.00000
  2.04204 -2.19911  0.00000  0.00000  0.00000
  2.19911 -2.19911  0.00000  0.00000  0.00000
  2.35619 -2.19911  0.00000  0.00000  0.00000
  2.51327 -2.19911  0.00000  0.00000  0.00000
  2.67035 -2.19911  0.00000  0.00000  0.00000
  2.82743 -2.19911  0.00000  0.00000  0.00000
  2.98451 -2.19911  0.00000  0.00000  0.00000
  3.14159 -2.19911  0.00000  0.00000  0.00000

  0.00000 -1.88496  0.00000  0.00000  0.00000
  0.15708 -1.88496  0.00000  0.00000  0.00000
  0.31416 -1.88496  0.00000  0.00000  0.00000
  0.47124 -1.88496  0.00000  0.00000  0.00000
  0.62832 -1.88496  0.00000  0.00000  0.00000
  0.78540 -1.88496  0.00000  0.00000  0.00000
  0.94248 -1.88496  0.00000  0.00000  0.00000
  1.09956 -1.88496  0.00000  0.00000  0.00000
  1.25664 -1.88496  0.00000  0.00000  0.00000
  1.41372 -1.88496  0.00000  0.00000  0.00000
  1.57080 -1.88496  0.00000  0.00000  0.00000
  1.72788 -1.88496  0.00000  0.00000  0.00000
  1.88496 -1.88496  0.00000  0.00000  0.00000
  2.04204 -1.88496  0.00000  0.00000  0.00000
  2.19911 -1.88496  0.00000  0.00000  0.00000
  2.35619 -1.88496  0.00000  0.00000  0.00000
  2.51327 -1.88496  0.00000  0.00000  0.00000
  2.67035 -1.88496  0.00000  0.00000  0.00000
  2.82743 -1.88496  0.00000  0.00000  0.00000
  2.98451 -1.88496  0.00000  0.00000  0.00000
  3.14159 -1.88496  0.00000  0.00000  0.00000

  0.00000 -1.57080  0.00000  0.00000  0.00000
  0.15708 -1.57080  0.00000  0.00000  0.00000
  0.31416 -1.57080  0.00000  0.00000  0.00000
  0.47124 -1.57080  0.00000  0.00000  0.00000
  0.62832 -1.57080  0.00000  0.00000  0.00000
  0.78540 -1.57080  0.00000  0.00000  0.00000
  0.94248 -1.57080  0.00000  0.00000  0.00000
  1.09956 -1.57080  0.00000  0.00000  0.00000
  1.25664 -1.57080  0.00000 -0.00000  0.00000
  1.41372 -1.57080  0.00000 -0.00000  0.00000
  1.57080 -1.57080  0.00000 -0.00000  0.00000
  1.72788 -1.57080  0.00000 -0.00000  0.00000
  1.88496 -1.57080  0.00000 -0.00000  0.00000
  2.04204 -1.57080  0.00000  0.00000  0.00000
  2.19911 -1.57080  0.00000  0.00000  0.00000
  2.35619 -1.57080  0.00000  0.00000  0.00000
  2.51327 -1.57080  0.00000  0.00000  0.00000
  2.67035 -1.57080  0.00000  0.00000  0.00000
  2.82743 -1.57080  0.00000  0.00000  0.00000
  2.98451 -1.57080  0.00000  0.00000  0.00000
  3.14159 -1.57080  0.00000  0.00000  0.00000

  0.00000 -1.25664  0.00000  0.00000  0.00000
  0.15708 -1.25664  0.00000  0.00000  0.00000
  0.31416 -1.25664  0.00000  0.00000  0.00000
  0.47124 -1.25664  0.00000  0.00000  0.00000
  0.62832 -1.25664  0.00000  0.00002  0.00003
  0.78540 -1.25664  0.00001  0.00015  0.00029
  0.94248 -1.25664  0.00006  0.00047  0.00133
  1.09956 -1.25664  0.00015  0.00058  0.00334
  1.25664 -1.25664  0.00020 -0.00001  0.00451
  1.41372 -1.25664  0.00015 -0.00059  0.00329
  1.57080 -1.25664  0.00006 -0.00046  0.00129
  1.72788 -1.25664  0.00001 -0.00015  0.00027
  1.88496 -1.25664  0.00000 -0.00002  0.00003
  2.04204 -1.25664  0.00000  0.00000  0.00000
  2.19911 -1.25664  0.00000  0.00000  0.00000
  2.35619 -1.25664  0.00000  0.00000  0.00000
  2.51327 -1.25664  0.00000  0.00000  0.00000
  2.67035 -1.25664  0.00000  0.00000  0.00000
  2.82743 -1.25664  0.00000  0.00000  0.00000
  2.98451 -1.25664  0.00000  0.00000  0.00000
  3.14159 -1.25664  0.00000  0.00000  0.00000

  0.00000 -0.94248  0.00000  0.00000  0.00000
  0.15708 -0.94248  0.00000  0.00000  0.00000
  0.31416 -0.94248  0.00000  0.00002  0.00001
  0.47124 -0.94248  0.00003  0.00058  0.00042
  0.62832 -0.94248  0.00047  0.00735  0.00674
  0.78540 -0.94248  0.00404  0.04737  0.05795
  0.94248 -0.94248  0.01873  0.14626  0.26892
  1.09956 -0.94248  0.04691  0.18203  0.67341
  1.25664 -0.94248  0.06339 -0.00296  0.91000
  1.41372 -0.94248  0.04623 -0.18370  0.66360
  1.57080 -0.94248  0.01819 -0.14373  0.26114
  1.72788 -0.94248  0.00386 -0.04569  0.05546
  1.88496 -0.94248  0.00044 -0.00698  0.00636
  2.04204 -0.94248  0.00000  0.00000  0.00000
  2.19911 -0.94248  0.00000  0.00000  0.00000
  2.35619 -0.94248  0.00000  0.00000  0.00000
  2.51327 -0.94248  0.00000  0.00000  0.00000
  2.67035 -0.94248  0.00000  0.00000  0.00000
  2.82743 -0.94248  0.00000  0.00000  0.00000
  2.98451 -0.94248  0.00000  0.00000  0.00000
  3.14159 -0.94248  0.00000  0.00000  0.00000

  0.00000 -0.62832  0.00000  0.00000  0.00000
  0.15708 -0.62832  0.00000  0.00000  0.00000
  0.31416 -0.62832  0.00003  0.00062  0.00017
  0.47124 -0.62832  0.00078  0.01528  0.00507
  0.62832 -0.62832  0.01243  0.19462  0.08078
  0.78540 -0.62832  0.10686  1.25389  0.69464
  0.94248 -0.62832  0.49585  3.87126  3.22336
  1.09956 -0.62832  1.24168  4.81806  8.07169
  1.25664 -0.62832  1.67791 -0.07837 10.90751
  1.41372 -0.62832  1.22359 -4.86218  7.95412
  1.57080 -0.62832  0.48151 -3.80428  3.13014
  1.72788 -0.62832  0.10226 -1.20944  0.66472
  1.88496 -0.62832  0.01172 -0.18462  0.07618
  2.04204 -0.62832  0.00000  0.00000  0.00000
  2.19911 -0.62832  0.00000  0.00000  0.00000
  2.35619 -0.62832  0.00000  0.00000  0.00000
  2.51327 -0.62832  0.00000  0.00000  0.00000
  2.67035 -0.62832  0.00000  0.00000  0.00000
  2.82743 -0.62832  0.00000  0.00000  0.00000
  2.98451 -0.62832  0.00000  0.00000  0.00000
  3.14159 -0.62832  0.00000  0.00000  0.00000

  0.00000 -0.31416  0.00000  0.00000  0.00000
  0.15708 -0.31416  0.00000  0.00000  0.00000
  0.31416 -0.31416  0.00006  0.00139 -0.00008
  0.47124 -0.31416  0.00175  0.03429 -0.00237
  0.62832 -0.31416  0.02789  0.43684 -0.03775
  0.78540 -0.31416  0.23985  2.81450 -0.32460
  0.94248 -0.31416  1.11300  8.68950 -1.50627
  1.09956 -0.31416  2.78709 10.81470 -3.77189
  1.25664 -0.31416  3.76628 -0.17591 -5.09706
  1.41372 -0.31416  2.74649 -10.91373 -3.71695
  1.57080 -0.31416  1.08081 -8.53916 -1.46271
  1.72788 -0.31416  0.22952 -2.71473 -0.31062
  1.88496 -0.31416  0.02630 -0.41440 -0.03560
  2.04204 -0.31416  0.00000  0.00000  0.00000
  2.19911 -0.31416  0.00000  0.00000  0.00000
  2.35619 -0.31416  0.00000 -0.00000  0.00000
  2.51327 -0.31416  0.00000 -0.00000  0.00000
  2.67035 -0.31416  0.00000 -0.00000  0.00000
  2.82743 -0.31416  0.00000 -0.00000  0.00000
  2.98451 -0.31416  0.00000 -0.00000  0.00000
  3.14159 -0.31416  0.00000  0.00000  0.00000

  0.00000  0.00000  0.00000  0.00000  0.00000
  0.15708  0.00000  0.00000  0.00000  0.00000
  0.31416  0.00000  0.00001  0.00027 -0.00010
  0.47124  0.00000  0.00033  0.00653 -0.00307
  0.62832  0.00000  0.00531  0.08316 -0.04889
  0.78540  0.00000  0.04566  0.53575 -0.42038
  0.94248  0.00000  0.21186  1.65409 -1.95071
  1.09956  0.00000  0.53054  2.05863 -4.88482
  1.25664  0.00000  0.71693 -0.03349 -6.60099
  1.41372  0.00000  0.52281 -2.07748 -4.81366
  1.57080  0.00000  0.20574 -1.62547 -1.89429
  1.72788  0.00000  0.04369 -0.51675 -0.40226
  1.88496  0.00000  0.00501 -0.07885 -0.04603
  2.04204  0.00000  0.00001  0.00007  0.00024
  2.19911  0.00000  0.00002  0.00004  0.00042
  2.35619  0.00000  0.00002 -0.00004  0.00041
  2.51327  0.00000  0.00001 -0.00006  0.00021
  2.67035  0.00000  0.00000 -0.00003  0.00006
  2.82743  0.00000  0.00000 -0.00001  0.00001
  2.98451  0.00000  0.00000 -0.00000  0.00000
  3.14159  0.00000  0.00000  0.00000  0.00000

  0.00000  0.31416  0.00000  0.00000  0.00000
  0.15708  0.31416  0.00000  0.00000  0.00000
  0.31416  0.31416  0.00000  0.00000 -0.00000
  0.47124  0.31416  0.00001  0.00011 -0.00009
  0.62832  0.31416  0.00009  0.00134 -0.00146
  0.78540  0.31416  0.00074  0.00865 -0.01257
  0.94248  0.31416  0.00342  0.02670 -0.05835
  1.09956  0.31416  0.00856  0.03323 -0.14612
  1.25664  0.31416  0.01157 -0.00054 -0.19746
  1.41372  0.31416  0.00844 -0.03353 -0.14399
  1.57080  0.31416  0.00333 -0.02610 -0.05657
  1.72788  0.31416  0.00080 -0.00709 -0.01090
  1.88496  0.31416  0.00065  0.00418  0.00558
  2.04204  0.31416  0.00188  0.01068  0.02308
  2.19911  0.31416  0.00337  0.00587  0.04129
  2.35619  0.31416  0.00326 -0.00712  0.03987
  2.51327  0.31416  0.00170 -0.01037  0.02078
  2.67035  0.31416  0.00048 -0.00479  0.00584
  2.82743  0.31416  0.00007 -0.00101  0.00089
  2.98451  0.31416  0.00001 -0.00011  0.00007
  3.14159  0.31416  0.00000  0.00000  0.00000

  0.00000  0.62832  0.00000  0.00000  0.00000
  0.15708  0.62832  0.00000  0.00000  0.00000
  0.31416  0.62832  0.00000  0.00000  0.00000
  0.47124  0.62832  0.00000  0.00000  0.00000
  0.62832  0.62832  0.00000  0.00000  0.00000
  0.78540  0.62832  0.00000  0.00000  0.00000
  0.94248  0.62832  0.00000  0.00000  0.00000
  1.09956  0.62832  0.00000  0.00000  0.00000
  1.25664  0.62832  0.00000  0.00000  0.00000
  1.41372  0.62832  0.00001  0.00011  0.00002
  1.57080  0.62832  0.00011  0.00193  0.00049
  1.72788  0.62832  0.00126  0.01707  0.00554
  1.88496  0.62832  0.00775  0.07440  0.03406
  2.04204  0.62832  0.02571  0.14573  0.11292
  2.19911  0.62832  0.04601  0.08008  0.20204
  2.35619  0.62832  0.04442 -0.09713  0.19509
  2.51327  0.62832  0.02315 -0.14152  0.10165
  2.67035  0.62832  0.00651 -0.06535  0.02858
  2.82743  0.62832  0.00099 -0.01380  0.00434
  2.98451  0.62832  0.00008 -0.00145  0.00036
  3.14159  0.62832  0.00000  0.00000  0.00000

  0.00000  0.94248  0.00000  0.00000  0.00000
  0.15708  0.94248  0.00000  0.00000  0.00000
  0.31416  0.94248  0.00000  0.00000  0.00000
  0.47124  0.94248  0.00000  0.00000  0.00000
  0.62832  0.94248  0.00000  0.00000  0.00000
  0.78540  0.94248  0.00000  0.00000  0.00000
  0.94248  0.94248  0.00000  0.00000  0.00000
  1.09956  0.94248  0.00000  0.00000  0.00000
  1.25664  0.94248  0.00000  0.00000  0.00000
  1.41372  0.94248  0.00001  0.00013 -0.00002
  1.57080  0.94248  0.00013  0.00224 -0.00044
  1.72788  0.94248  0.00146  0.01975 -0.00506
  1.88496  0.94248  0.00897  0.08609 -0.03107
  2.04204  0.94248  0.02975  0.16862 -0.10302
  2.19911  0.94248  0.05324  0.09265 -0.18433
  2.35619  0.94248  0.05140 -0.11239 -0.17799
  2.51327  0.94248  0.02678 -0.16374 -0.09274
  2.67035  0.94248  0.00753 -0.07562 -0.02608
  2.82743  0.94248  0.00114 -0.01596 -0.00396
  2.98451  0.94248  0.00009 -0.00167 -0.00032
  3.14159  0.94248  0.00000  0.00000  0.00000

  0.00000  1.25664  0.00000  0.00000  0.00000
  0.15708  1.25664  0.00000  0.00000  0.00000
  0.31416  1.25664  0.00000  0.00000  0.00000
  0.47124  1.25664  0.00000  0.00000  0.00000
  0.62832  1.25664  0.00000  0.00000  0.00000
  0.78540  1.25664  0.00000  0.00000  0.00000
  0.94248  1.25664  0.00000  0.00000  0.00000
  1.09956  1.25664  0.00000  0.00000  0.00000
  1.25664  1.25664  0.00000  0.00000  0.00000
  1.41372  1.25664  0.00000  0.00001 -0.00001
  1.57080  1.25664  0.00001  0.00022 -0.00014
  1.72788  1.25664  0.00014  0.00194 -0.00162
  1.88496  1.25664  0.00088  0.00845 -0.00996
  2.04204  1.25664  0.00292  0.01655 -0.03304
  2.19911  1.25664  0.00522  0.00909 -0.05911
  2.35619  1.25664  0.00504 -0.01103 -0.05708
  2.51327  1.25664  0.00263 -0.01607 -0.02974
  2.67035  1.25664  0.00074 -0.00742 -0.00836
  2.82743  1.25664  0.00011 -0.00157 -0.00127
  2.98451  1.25664  0.00001 -0.00016 -0.00010
  3.14159  1.25664  0.00000  0.00000  0.00000

  0.00000  1.57080  0.00000  0.00000  0.00000
  0.15708  1.57080  0.00000  0.00000  0.00000
  0.31416  1.57080  0.00000  0.00000  0.00000
  0.47124  1.57080  0.00000  0.00000  0.00000
  0.62832  1.57080  0.00000  0.00000  0.00000
  0.78540  1.57080  0.00000  0.00000  0.00000
  0.94248  1.57080  0.00000  0.00000  0.00000
  1.09956  1.57080  0.00000  0.00000  0.00000
  1.25664  1.57080  0.00000  0.00000  0.00000
  1.41372  1.57080  0.00000  0.00000 -0.00000
  1.57080  1.57080  0.00000  0.00000 -0.00000
  1.72788  1.57080  0.00000  0.00002 -0.00002
  1.88496  1.57080  0.00001  0.00007 -0.00014
  2.04204  1.57080  0.00002  0.00014 -0.00047
  2.19911  1.57080  0.00004  0.00008 -0.00083
  2.35619  1.57080  0.00004 -0.00009 -0.00080
  2.51327  1.57080  0.00002 -0.00013 -0.00042
  2.67035  1.57080  0.00001 -0.00006 -0.00012
  2.82743  1.57080  0.00000 -0.00001 -0.00002
  2.98451  1.57080  0.00000 -0.00000 -0.00000
  3.14159  1.57080  0.00000  0.00000  0.00000

  0.00000  1.88496  0.00000  0.00000  0.00000
  0.15708  1.88496  0.00000  0.00000  0.00000
  0.31416  1.88496  0.00000  0.00000  0.00000
  0.47124  1.88496  0.00000  0.00000  0.00000
  0.62832  1.88496  0.00000  0.00000  0.00000
  0.78540  1.88496  0.00000  0.00000  0.00000
  0.94248  1.88496  0.00000  0.00000  0.00000
  1.09956  1.88496  0.00000  0.00000  0.00000
  1.25664  1.88496  0.00000  0.00000  0.00000
  1.41372  1.88496  0.00000  0.00000  0.00000
  1.57080  1.88496  0.00000  0.00000  0.00000
  1.72788  1.88496  0.00000  0.00000  0.00000
  1.88496  1.88496  0.00000  0.00000  0.00000
  2.04204  1.88496  0.00000  0.00000  0.00000
  2.19911  1.88496  0.00000  0.00000  0.00000
  2.35619  1.88496  0.00000  0.00000  0.00000
  2.51327  1.88496  0.00000  0.00000  0.00000
  2.67035  1.88496  0.00000  0.00000  0.00000
  2.82743  1.88496  0.00000 -0.00000  0.00000
  2.98451  1.88496  0.00000 -0.00000  0.00000
  3.14159  1.88496  0.00000 -0.00000  0.00000

  0.00000  2.19911  0.00000  0.00000  0.00000
  0.15708  2.19911  0.00000  0.00000  0.00000
  0.31416  2.19911  0.00000  0.00000  0.00000
  0.47124  2.19911  0.00000  0.00000  0.00000
  0.62832  2.19911  0.00000  0.00000  0.00000
  0.78540  2.19911  0.00000  0.00000  0.00000
  0.94248  2.19911  0.00000  0.00000  0.00000
  1.09956  2.19911  0.00000  0.00000  0.00000
  1.25664  2.19911  0.00000  0.00000  0.00000
  1.41372  2.19911  0.00000  0.00000  0.00000
  1.57080  2.19911  0.00000  0.00000  0.00000
  1.72788  2.19911  0.00000  0.00000  0.00000
  1.88496  2.19911  0.00000  0.00000  0.00000
  2.04204  2.19911  0.00000  0.00000  0.00000
  2.19911  2.19911  0.00000  0.00000  0.00000
  2.35619  2.19911  0.00000  0.00000  0.00000
  2.51327  2.19911  0.00000  0.00000  0.00000
  2.67035  2.19911  0.00000  0.00000  0.00000
  2.82743  2.19911  0.00000 -0.00000  0.00000
  2.98451  2.19911  0.00000 -0.00000  0.00000
  3.14159  2.19911  0.00000 -0.00000  0.00000

  0.00000  2.51327  0.00000  0.00000  0.00000
  0.15708  2.51327  0.00000  0.00000  0.00000
  0.31416  2.51327  0.00000  0.00000  0.00000
  0.47124  2.51327  0.00000  0.00000  0.00000
  0.62832  2.51327  0.00000  0.00000  0.00000
  0.78540  2.51327  0.00000  0.00000  0.00000
  0.94248  2.51327  0.00000  0.00000  0.00000
  1.09956  2.51327  0.00000  0.00000  0.00000
  1.25664  2.51327  0.00000  0.00000  0.00000
  1.41372  2.51327  0.00000  0.00000  0.00000
  1.57080  2.51327  0.00000  0.00000  0.00000
  1.72788  2.51327  0.00000  0.00000  0.00000
  1.88496  2.51327  0.00000  0.00000  0.00000
  2.04204  2.51327  0.00000  0.00000  0.00000
  2.19911  2.51327  0.00000  0.00000  0.00000
  2.35619  2.51327  0.00000  0.00000  0.00000
  2.51327  2.51327  0.00000  0.00000  0.00001
  2.67035  2.51327  0.00000  0.00000  0.00001
  2.82743  2.51327  0.00000 -0.00000  0.00001
  2.98451  2.51327  0.00000 -0.00000  0.00001
  3.14159  2.51327  0.00000 -0.00000  0.00000

  0.00000  2.82743  0.00000  0.00000  0.00000
  0.15708  2.82743  0.00000  0.00000  0.00000
  0.31416  2.82743  0.00000  0.00000  0.00000
  0.47124  2.82743  0.00000  0.00000  0.00000
  0.62832  2.82743  0.00000  0.00000  0.00000
  0.78540  2.82743  0.00000  0.00000  0.00000
  0.94248  2.82743  0.00000  0.00000  0.00000
  1.09956  2.82743  0.00000  0.00000  0.00000
  1.25664  2.82743  0.00000  0.00000  0.00000
  1.41372  2.82743  0.00000  0.00000  0.00000
  1.57080  2.82743  0.00000  0.00000  0.00000
  1.72788  2.82743  0.00000  0.00000  0.00000
  1.88496  2.82743  0.00000  0.00000  0.00000
  2.04204  2.82743  0.00000  0.00000  0.00000
  2.19911  2.82743  0.00000  0.00000  0.00000
  2.35619  2.82743  0.00000  0.00001  0.00000
  2.51327  2.82743  0.00000  0.00004  0.00002
  2.67035  2.82743  0.00001  0.00004  0.00004
  2.82743  2.82743  0.00001 -0.00001  0.00005
  2.98451  2.82743  0.00001 -0.00004  0.00003
  3.14159  2.82743  0.00000 -0.00003  0.00001
VALUEthe name of the value that should be read from the grid=h d: DISTANCECalculate the distance/s between pairs of atoms. More details ATOMS1the pair of atom that we are calculating the distance between=1,2 ATOMS2the pair of atom that we are calculating the distance between=4,5 ATOMS3the pair of atom that we are calculating the distance between=7,8 m: LESS_THANUse a switching function to determine how many of the input variables are less than a certain cutoff. More details ARGthe values input to this function=d SWITCHThis keyword is used if you want to employ an alternative to the continuous swiching function defined above={CUSTOM R_0=1 FUNC=step(0.1-x)} aa: ANGLECalculate one or multiple angle/s. More details ATOMS1the list of atoms involved in this collective variable (either 3 or 4 atoms)=1,2,3 ATOMS2the list of atoms involved in this collective variable (either 3 or 4 atoms)=4,5,6 ATOMS3the list of atoms involved in this collective variable (either 3 or 4 atoms)=7,8,9 tt: TORSIONCalculate one or multiple torsional angles. More details ATOMS1the four atoms involved in the torsional angle=1,2,3,4 ATOMS2the four atoms involved in the torsional angle=5,6,7,8 ATOMS3the four atoms involved in the torsional angle=9,10,11,12 val: EVALUATE_FUNCTION_FROM_GRIDCalculate the function stored on the input grid at an arbitrary point More details GRIDthe name of the grid that we are using to evaluate the function=ff MASKthe label for a sparse vector/matrix that should be used to determine which elements of the vector/matrix should be computed=m prod: CUSTOMCalculate a combination of variables using a custom expression. More details ARGthe values input to this function=m,val 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: 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 PRINTPrint quantities to a file. More details ARGthe labels of the values that you would like to print to the file=sum FILEthe name of the file on which to output these quantities=colvar

This input calculates the function of the angles and torsions that is provided in the input grid file for the three pairs of input angles and torsions. The sum of these quantities is then computed. Importantly, however, each of the evaluated values of the function is only added to the final sum if the corresponding distance that is calculated by the DISTANCE action with label d is less than 0.1 nm.

Input

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

Keyword Type Description
GRID grid the name of the grid that we are using to evaluate the function
ARG scalar/vector the arguments that you would like to use when evaluating the function
MASK vector/matrix the label for a sparse vector/matrix that should be used to determine which elements of the vector/matrix should be computed

Full list of keywords

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

Keyword Type Default Description
GRID input none the name of the grid that we are using to evaluate the function
ARG input none the arguments that you would like to use when evaluating the function
MASK input none the label for a sparse vector/matrix that should be used to determine which elements of the vector/matrix should be computed
INTERPOLATION_TYPE compulsory spline the method to use for interpolation
ZERO_OUTSIDE_GRID_RANGE optional false if we are asked to evaluate the function for a number that is outside the range of the grid set it to zero