From a731c430007bfb3332b7ab1322b47c396fe414d1 Mon Sep 17 00:00:00 2001 From: taylor-a-barnes Date: Tue, 27 Apr 2021 12:45:09 -0400 Subject: [PATCH] Add docs for mdi_engine command and fix --- doc/src/Build_extras.rst | 30 ++++++++++++++++++++ doc/src/fix_mdi_engine.rst | 58 ++++++++++++++++++++++++++++++++++++++ doc/src/mdi_engine.rst | 45 +++++++++++++++++++++++++++++ examples/USER/mdi/README | 4 --- 4 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 doc/src/fix_mdi_engine.rst create mode 100644 doc/src/mdi_engine.rst diff --git a/doc/src/Build_extras.rst b/doc/src/Build_extras.rst index 4e23067387..25ef36b430 100644 --- a/doc/src/Build_extras.rst +++ b/doc/src/Build_extras.rst @@ -49,6 +49,7 @@ This is the list of packages that may require additional steps. * :ref:`USER-COLVARS ` * :ref:`USER-H5MD ` * :ref:`USER-INTEL ` + * :ref:`USER-MDI ` * :ref:`USER-MESONT ` * :ref:`USER-MOLFILE ` * :ref:`USER-NETCDF ` @@ -1539,6 +1540,35 @@ TBB and MKL. ---------- +.. _user-mdi: + +USER-MDI package +----------------------------- + +.. tabs:: + + .. tab:: CMake build + + .. code-block:: bash + + -D DOWNLOAD_MDI=value # download MDI Library for build, value = no (default) or yes + + .. tab:: Traditional make + + Before building LAMMPS, you must build the MDI Library in + ``lib/mdi``\ . You can do this by executing a command like one + of the following from the ``lib/mdi`` directory: + + .. code-block:: bash + + $ python Install.py -m gcc # build using gcc compiler + $ python Install.py -m icc # build using icc compiler + + The build should produce two files: ``lib/mdi/includelink/mdi.h`` + and ``lib/mdi/liblink/libmdi.so``\ . + +---------- + .. _user-mesont: USER-MESONT package diff --git a/doc/src/fix_mdi_engine.rst b/doc/src/fix_mdi_engine.rst new file mode 100644 index 0000000000..f4d717b2f2 --- /dev/null +++ b/doc/src/fix_mdi_engine.rst @@ -0,0 +1,58 @@ +.. index:: fix move + +fix mdi/engine command +================ + +Syntax +"""""" + +.. parsed-literal:: + + fix ID group-ID mdi/engine + +* ID, group-ID are documented in :doc:`fix ` command +* mdi/engine = style name of this fix command + +Examples +"""""""" + +.. code-block:: LAMMPS + + fix 1 all mdi/engine + +Description +""""""""""" + +This fix is used alongside the :doc:`mdi_engine ` command +to enable LAMMPS to use the +`MDI Library `_ +to run as an MDI engine. +The fix provides hooks that are enable external drivers to communicate +with LAMMPS at various points within LAMMPS timesteps. + +It is not generally necessary to add this fix to a LAMMPS input file, +even when using the :doc:`mdi_engine ` command; if the +:doc:`mdi_engine ` command is executed and this fix is not +present, it will automatically be added to the end of the fix list and +applied to all atoms for the duration of the command. It is only +necessary to add this fix to an input file for cases in which the user +would like to modify order or group-ID of the fix. + +For more information about running LAMMPS as an MDI engine, see the +:doc:`mdi_engine ` command. + + +Restrictions +"""""""""""" +This command is part of the USER-MDI package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. + +Related commands +"""""""""""""""" + +:doc:`mdi_engine ` + +Default +""""""" + +none diff --git a/doc/src/mdi_engine.rst b/doc/src/mdi_engine.rst new file mode 100644 index 0000000000..248c7b0622 --- /dev/null +++ b/doc/src/mdi_engine.rst @@ -0,0 +1,45 @@ +.. index:: mdi_engine + +mdi_engine command +=============== + +Syntax +"""""" + +.. parsed-literal:: + + mdi_engine + +Description +""""""""""" + +This command causes LAMMPS to use the +`MDI Library `_ +to run as an MDI Engine, responding to commands from an external +MDI Driver. +General information about launching codes that communicate using the +MDI Library can be found in the +`corresponding page `_ +of the MDI Library's documentation. + +---------- + +Other commands can be executed both before and after this command, +but typically this command should be used at the end of a LAMMPS +input script. + +Restrictions +"""""""""""" + +This command is part of the USER-MDI package. It is only enabled if +LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. + +Related commands +"""""""""""""""" + +:doc:`fix mdi/engine ` + +Default +""""""" + +none diff --git a/examples/USER/mdi/README b/examples/USER/mdi/README index ba8ddc3c5b..a77dffe071 100644 --- a/examples/USER/mdi/README +++ b/examples/USER/mdi/README @@ -3,10 +3,6 @@ MDI engine. LAMMPS as an engine performs the MD timestepping. The driver is a simple Python script. Every timestep the driver sends one or more commands to LAMMPS. -See the MDI package documentation Build_extras.html#mdi and -Build_extras.html#mdi for more details on how the LAMMPS MDI -implementation works. - -------------- NOTE: the Script.sh file has comands to perform all the