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

.. py:module:: IMLCV.implementations.MdEngine

.. autoapi-nested-parse::

   MD engine class peforms MD simulations in a given NVT/NPT ensemble.

   Currently, the MD is done with YAFF/OpenMM



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

Classes
~~~~~~~

.. autoapisummary::

   IMLCV.implementations.MdEngine.YaffEngine
   IMLCV.implementations.MdEngine.PlumedEngine




.. py:class:: YaffEngine(bias: IMLCV.base.bias.Bias, static_trajectory_info: IMLCV.base.MdEngine.StaticTrajectoryInfo, energy: IMLCV.base.bias.Energy, trajectory_file=None, sp: SystemParams | None = None, additional_parts=[])

   Bases: :py:obj:`IMLCV.base.MdEngine.MDEngine`, :py:obj:`yaff.sampling.iterative.Hook`

   MD engine with YAFF as backend.

   :param ff:
   :type ff: yaff.pes.ForceField

   .. py:class:: YaffFF(md_engine: IMLCV.base.MdEngine.MDEngine, name='IMLCV_YAFF_forcepart', additional_parts=[])

      Bases: :py:obj:`yaff.pes.ForceField`

      A complete force field model.

      .. py:property:: system


      .. py:property:: sp


      .. py:method:: update_rvecs(rvecs)

         See :meth:`yaff.pes.ff.ForcePart.update_rvecs`


      .. py:method:: update_pos(pos)

         See :meth:`yaff.pes.ff.ForcePart.update_pos`


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

         Subclasses implement their compute code here.



   .. py:method:: __call__(iterative: yaff.sampling.verlet.VerletIntegrator)


   .. py:method:: _setup_verlet()


   .. py:method:: load(file, **kwargs) -> IMLCV.base.MdEngine.MDEngine
      :staticmethod:


   .. py:method:: _run(steps)



.. py:class:: PlumedEngine(bias: IMLCV.base.bias.Bias, static_trajectory_info: IMLCV.base.MdEngine.StaticTrajectoryInfo, energy: IMLCV.base.bias.Energy, trajectory_file=None, sp: SystemParams | None = None)

   Bases: :py:obj:`YaffEngine`

   MD engine with YAFF as backend.

   :param ff:
   :type ff: yaff.pes.ForceField

   .. py:attribute:: plumed_dat
      :value: Multiline-String

       .. raw:: html

           <details><summary>Show Value</summary>

       .. code-block:: python

           """
               LOAD FILE=libpybias.so
           
               dist: DISTANCE ATOMS=1,2
           
           
               rc: PYTHONCV ATOMS=1,4,3 IMPORT=curvature FUNCTION=r
           
               # Creat a PyBias action, which executes "bias.py"
               PYBIAS ARG=rc
           
           
               RESTRAINT ARG=rc AT=0 KAPPA=0 SLOPE=1
               """

       .. raw:: html

           </details>

      


