.. _md:

**************
MD Simulations
**************

.. py:class:: MD([theory=None, driver='namd', ...])

MD simulations can be carried out using the :py:obj:`MD()` driver, which
expects a :ref:`Theory <theories>` object and a :py:attr:`driver` option, e.g.

.. code-block:: python

   my_theory = NAMD(...)
   my_job = MD(theory=my_theory, driver='namd', ...)

Though :py:obj:`MD()` is a general-purpose driver, we currently only support classical
MDs with the `NAMD <https://www.ks.uiuc.edu/Research/namd/>`__ molecular dynamics simulation
package. Please read:

.. toctree::
   :titlesonly:

   md_classical

For ChemShell's basic MD analysis tool please see: :ref:`MD analysis <md_analysis>`.

Methods
=======

.. py:method:: MD.run(dryrun=False, info_filename='_profile_md.npz')

   :param dryrun: If the function is called with ``dryrun=True``, the job will only
                       generate input scripts without executing real calculatons
   :type dryrun: bool, optional

   :param info_filename: Filename for writing out compressed trajectory profile data
                                for plotting purpose. Please see: :ref:`how to plot trajectories <plotting_trajectories>`
   :type info_filename: str, optional

The MD simulation is run with this method, for example::

   my_job.run()

