MetadynamicsBias¶
- class openxps.MetadynamicsBias(extra_dofs, bandwidth, initial_height, temperature, bias_factor, grid_sizes)[source]¶
A Metadynamics potential applied to extra degrees of freedom.
\[V({\bf x}) = \sum_{i=1}^{N} h_i \exp\left\{ -\frac{1}{2} \left( {\bf x} - {\bf c}_i \right)^T [{\bf D}({\boldsymbol \sigma}_i)]^{-2} \left( {\bf x} - {\bf c}_i \right) \right\}\]where \({\bf x}\) is the vector of extra degrees of freedom, \(h_i\) is the height of the Gaussian kernel, \({\bf c}_i\) is the center of the kernel, \({\boldsymbol \sigma}_i\) is the bandwidth vector of the kernel, and \({\bf D}(\cdot)\) builds a diagonal matrix from a vector.
The bias potential can be interpolated on a grid using natural splines for 1D, 2D, or 3D functions. This is done by providing the number of points in each dimension of the grid. If the grid is not provided, the bias potential is evaluated directly from the mathematical expression, which gets more expensive as the number of added kernels increases.
- Parameters:
extra_dofs (Sequence[ExtraDOF]) – The extra degrees of freedom subject to the bias potential.
bandwidth (Sequence[Quantity]) – The bandwidth vector of the Gaussian kernel. Each element must have units of the corresponding extra degree of freedom.
initial_height (Quantity) – The initial height of the Gaussian kernels. It must have units of molar energy.
temperature (Quantity) – The temperature of the system (with units).
bias_factor (float) – The bias factor that controls the equilibrium bias potential and the rate of convergence. It must be larger than 1.
grid_sizes (Sequence[int] | None) – The number of points in each dimension of the grid used to interpolate the bias potential.
- Raises:
ValueError – If the bias factor is not larger than 1 or if temperature does not have valid units.
Methods