Curve fitting in GROMACS#
Sum of exponential functions#
Sometimes it is useful to fit a curve to an analytical function, for example in the case of autocorrelation functions with noisy tails. GROMACS is not a general purpose curve-fitting tool however and therefore GROMACS only supports a limited number of functions. Table 18 lists the available options with the corresponding command-line options. The underlying routines for fitting use the Levenberg-Marquardt algorithm as implemented in the lmfit package 162 (a bare-bones version of which is included in GROMACS in which an option for error-weighted fitting was implemented).
Command line option |
Functional form |
Note |
---|---|---|
exp |
||
aexp |
||
exp_exp |
||
exp5 |
||
exp7 |
||
exp9 |
Error estimation#
Under the hood GROMACS implements some more fitting functions, namely a function to estimate the error in time-correlated data due to Hess 149:
where
where
Interphase boundary demarcation#
In order to determine the position and width of an interface, Steen-Sæthre et al. fitted a density profile to the following function
where
Transverse current autocorrelation function#
In order to establish the transverse current autocorrelation function (useful for computing viscosity 164) the following function is fitted:
with
Viscosity estimation from pressure autocorrelation function#
The viscosity is a notoriously difficult property to extract from simulations 149, 165. It is in principle possible to determine it by integrating the pressure autocorrelation function 160, however this is often hampered by the noisy tail of the ACF. A workaround to this is fitting the ACF to the following function 166:
where
This equation has been applied to computing the bulk and shear viscosity using different elements from the pressure tensor 167.