[Table-Form]
section¶
This section of the input serves a similar purpose to the [Potential-Form] section as it allows custom potential functions to be defined. However, instead of being defined using a mathematical expression they are specified as tables of x,y points with interpolation providing intermediate values.
It is sometimes to convenient to use pre-tabulated values for very complex expressions however you should always use caution. It is recommended that when using [Table-Form]
that you plot the resulting functions and derivatives. This is because interpolation can sometimes introduce spurious effects, so it’s worth checking that nothing odd has happened.
Defining a Table Form¶
The general form of a [Table-Form]
section is:
[Table-Form:NAME]
interpolation : INTERPOLATION_TYPE
xy : DATA
Multiple [Table-Form]
sections can appear in a potable
input file and are distinguished by the NAME
identifier included after the colon in the section header. This identifier can be used elsewhere, such as in [Pair]
to use the function.
The value of INTERPOLATION_TYPE
specifies how values are calculated between data-points. A list of supported interpolation schemes can be found here, but for the examples that follow we will use cubic_spline
interpolation.
Finally the function’s data is provided through the xy
option. The value of DATA
is a list of space separated x,y pairs. To aid readability these can appear on separate lines as long as they are indented. Alternatively, table data can be specified as separate arrays of x and y values see here for more .
Example: [Table-Form] pair-potential¶
Revisiting the example from earlier (see Potential model) the following shows how the O-U interaction from the Basak model [Basak2003] can be represented as a [Table-Form]
:
The data points from Fig. 3 (blue) have been included in the potable
input file basak_table_form.aspot
using the xy option.
The third line of the [Pair]
section deserves notice:
O-U = tabulated
The potential-form tabulated
specified for the O-U
interaction refers to the name of the table-form: [Table-Form:tabulated]
. It should also be noted that instances of the potential form do not take any parameters.
[Tabulation]
target : LAMMPS
cutoff : 6.5
nr : 652
[Pair]
O-O = as.buck 1633.010242995040 0.327022 3.948787
U-U = as.buck 294.640906285709 0.327022 0.0
O-U = tabulated
[Table-Form:tabulated]
interpolation : cubic_spline
xy : 0.019969278 1939.293892
0.169738863 1188.215091
0.319508449 726.7144999
0.469278034 443.3947902
0.619047619 269.6704607
0.768817204 163.3187664
0.91858679 98.35155402
1.068356375 58.77819733
1.21812596 34.76429963
1.367895545 20.26573351
1.517665131 11.57134322
1.667434716 6.405364338
1.817204301 3.374649118
1.966973886 1.62831462
2.116743472 0.648256084
2.266513057 0.120274645
2.416282642 -0.14514429
2.566052227 -0.261481615
2.715821813 -0.29602021
2.865591398 -0.288108481
3.015360983 -0.260312815
3.165130568 -0.225205576
3.314900154 -0.189478838
3.464669739 -0.15642305
3.614439324 -0.127408946
3.764208909 -0.102764146
3.913978495 -0.082284087
4.06374808 -0.065523547
4.213517665 -0.051957769
4.36328725 -0.04106708
4.513056836 -0.032377452
4.662826421 -0.025476347
4.812596006 -0.020015289
4.962365591 -0.015705784
5.112135177 -0.012312372
5.261904762 -0.009644843
5.411674347 -0.007550718
5.561443932 -0.005908467
5.711213518 -0.004621653
5.860983103 -0.00361401
6.010752688 -0.002825384
6.160522273 -0.002208426
6.310291859 -0.001725927
6.460061444 -0.001348681
6.5 0.0
The following figure shows the good match between the analytical and tabulated forms resulting from the use of the [Table-Form]
.