BF_CUSTOM
This is part of the ves module
It is only available if you configure PLUMED with ./configure –enable-modules=ves . Furthermore, this feature is still being developed so take care when using it and report any problems on the mailing list.

Basis functions given by arbitrary mathematical expressions.

This allows you to define basis functions using arbitrary mathematical expressions that are parsed using the lepton library. The basis functions \(f_{i}(x)\) are given in mathematical expressions with x as a variable using the numbered FUNC keywords that start from FUNC1. Consistent with other basis functions is \(f_{0}(x)=1\) defined as the constant. The interval on which the basis functions are defined is given using the MINIMUM and MAXIMUM keywords.

Using the TRANSFORM keyword it is possible to define a function \(x(t)\) that is used to transform the argument before calculating the basis functions values. The variables min and max can be used to indicate the minimum and the maximum of the interval. By default the arguments are not transformed, i.e. \(x(t)=t\).

For periodic basis functions you should use the PERIODIC flag to indicate that they are periodic.

The basis functions \(f_{i}(x)\) and the transform function \(x(t)\) need to be well behaved in the interval on which the basis functions are defined, e.g. not result in a not a number (nan) or infinity (inf). The code will not perform checks to make sure that this is the case unless the flag CHECK_NAN_INF is enabled.

Examples

Defining Legendre polynomial basis functions of order 6 using BF_CUSTOM where the appropriate transform function is given by the TRANSFORM keyword. This is just an example of what can be done, in practice you should use BF_LEGENDRE for Legendre polynomial basis functions.

Click on the labels of the actions for more information on what each action computes
tested on v2.9
bf1: BF_CUSTOM ...
   
TRANSFORM
An optional function that can be used to transform the argument before calculating the basis function values.
=(t-(min+max)/2)/((max-min)/2)
FUNC1
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=x
FUNC2
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=(1/2)*(3*x^2-1)
FUNC3
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=(1/2)*(5*x^3-3*x)
FUNC4
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=(1/8)*(35*x^4-30*x^2+3)
FUNC5
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=(1/8)*(63*x^5-70*x^3+15*x)
FUNC6
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=(1/16)*(231*x^6-315*x^4+105*x^2-5)
MINIMUM
compulsory keyword The minimum of the interval on which the basis functions are defined.
=-4.0
MAXIMUM
compulsory keyword The maximum of the interval on which the basis functions are defined.
=4.0 ...

Defining Fourier basis functions of order 3 using BF_CUSTOM where the periodicity is indicated using the PERIODIC flag. This is just an example of what can be done, in practice you should use BF_FOURIER for Fourier basis functions.

Click on the labels of the actions for more information on what each action computes
tested on v2.9
bf1: BF_CUSTOM ...
   
FUNC1
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=cos(x)
FUNC2
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=sin(x)
FUNC3
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=cos(2*x)
FUNC4
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=sin(2*x)
FUNC5
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=cos(3*x)
FUNC6
The basis functions f_i(x) given in mathematical expressions using _x_ as a variable..
=sin(3*x)
MINIMUM
compulsory keyword The minimum of the interval on which the basis functions are defined.
=-pi
MAXIMUM
compulsory keyword The maximum of the interval on which the basis functions are defined.
=+pi
PERIODIC
( default=off ) Indicate that the basis functions are periodic.
...
Glossary of keywords and components
Compulsory keywords
MINIMUM The minimum of the interval on which the basis functions are defined.
MAXIMUM The maximum of the interval on which the basis functions are defined.
Options
DEBUG_INFO ( default=off ) Print out more detailed information about the basis set. Useful for debugging.
PERIODIC ( default=off ) Indicate that the basis functions are periodic.
CHECK_NAN_INF

( default=off ) Check that the basis functions do not result in a not a number (nan) or infinity (inf).

FUNC The basis functions f_i(x) given in mathematical expressions using x as a variable.. You can use multiple instances of this keyword i.e. FUNC1, FUNC2, FUNC3...
TRANSFORM An optional function that can be used to transform the argument before calculating the basis function values. You should use t as a variable. You can use the variables min and max to give the minimum and the maximum of the interval.