:py:mod:`IMLCV.implementations.bias`
====================================

.. py:module:: IMLCV.implementations.bias


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   IMLCV.implementations.bias.MinBias
   IMLCV.implementations.bias.HarmonicBias
   IMLCV.implementations.bias.BiasMTD
   IMLCV.implementations.bias.RbfBias
   IMLCV.implementations.bias.GridBias
   IMLCV.implementations.bias.PlumedBias




.. py:class:: MinBias(biases: collections.abc.Iterable[IMLCV.base.bias.Bias])

   Bases: :py:obj:`IMLCV.base.bias.CompositeBias`

   Class that combines several biases in one single bias.


.. py:class:: HarmonicBias(cvs: IMLCV.base.CV.CollectiveVariable, q0: IMLCV.base.CV.CV, k, k_max: Array | float | None = None)

   Bases: :py:obj:`IMLCV.base.bias.Bias`

   Harmonic bias potential centered arround q0 with force constant k.

   .. py:method:: _compute(cvs: IMLCV.base.CV.CV, *args)

      function that calculates the bias potential. CVs live in mapped space


   .. py:method:: get_args()

      function that return dictionary with kwargs of _compute.



.. py:class:: BiasMTD(cvs: IMLCV.base.CV.CollectiveVariable, K, sigmas, tempering=0.0, start=None, step=None)

   Bases: :py:obj:`IMLCV.base.bias.Bias`

   A sum of Gaussian hills, for instance used in metadynamics:
   Adapted from Yaff.

   V = \sum_{\\alpha} K_{\\alpha}} \exp{-\sum_{i}
   \\frac{(q_i-q_{i,\\alpha}^0)^2}{2\sigma^2}}

   where \\alpha loops over deposited hills and i loops over collective
   variables.

   .. py:method:: update_bias(md: IMLCV.base.MdEngine.MDEngine)

      update the bias.

      Can only change the properties from _get_args


   .. py:method:: _compute(cvs, q0s, Ks)

      Computes sum of hills.


   .. py:method:: get_args()

      function that return dictionary with kwargs of _compute.



.. py:class:: RbfBias(cvs: IMLCV.base.CV.CollectiveVariable, vals: jax.Array, cv: IMLCV.base.CV.CV, start=None, step=None, kernel='linear', epsilon=None, smoothing=0.0, degree=None)

   Bases: :py:obj:`IMLCV.base.bias.Bias`

   Bias interpolated from lookup table on uniform grid.

   values are caluclated in bin centers

   .. py:method:: _compute(cvs: IMLCV.base.CV.CV, *args)

      function that calculates the bias potential. CVs live in mapped space


   .. py:method:: get_args()

      function that return dictionary with kwargs of _compute.



.. py:class:: GridBias(cvs: IMLCV.base.CV.CollectiveVariable, vals, bounds, start=None, step=None, centers=True)

   Bases: :py:obj:`IMLCV.base.bias.Bias`

   Bias interpolated from lookup table on uniform grid.

   values are caluclated in bin centers

   .. py:method:: _compute(cvs: IMLCV.base.CV.CV, *args)

      function that calculates the bias potential. CVs live in mapped space


   .. py:method:: get_args()

      function that return dictionary with kwargs of _compute.



.. py:class:: PlumedBias(collective_variable: IMLCV.base.CV.CollectiveVariable, timestep, kernel=None, fn='plumed.dat', fn_log='plumed.log')

   Bases: :py:obj:`IMLCV.base.bias.Bias`

   base class for biased MD runs.

   .. py:method:: setup_plumed(timestep, restart)

      Send commands to PLUMED to make it computation-ready.

      **Arguments:**

      timestep
          The timestep (in au) of the integrator

      restart
          Set to an integer value different from 0 to let PLUMED know that
          this is a restarted run


   .. py:method:: update_bias(md: IMLCV.base.MdEngine.MDEngine)

      When this point is reached, a complete time integration step was
      finished and PLUMED should be notified about this.


   .. py:method:: _internal_compute(gpos, vtens)



