@@ -26,6 +26,29 @@ Syntax
2626 *nowait * arg = *on * or *off *
2727 off = LAMMPS waits to be connected to an IMD client before continuing (default)
2828 on = LAMMPS listens for an IMD client, but continues with the run
29+ *version * arg = *2 * or *3 *
30+ 2 = use IMD protocol version 2 (default)
31+ 3 = use IMD protocol version 3.
32+
33+ The following keywords are only supported for IMD protocol version 3.
34+
35+ .. parsed-literal ::
36+
37+ *time * arg = *on * or *off *
38+ off = simulation time is not transmitted (default)
39+ on = simulation time is transmitted.
40+ *box * arg = *on * or *off *
41+ off = simulation box data is not transmitted (default)
42+ on = simulation box data is transmitted.
43+ *coordinates * arg = *on * or *off *
44+ off = atomic coordinates are not transmitted (default)
45+ on = atomic coordinates are transmitted.
46+ *velocities * arg = *on * or *off *
47+ off = atomic velocities are not transmitted (default)
48+ on = atomic velocities are transmitted.
49+ *forces * arg = *on * or *off *
50+ off = atomic forces are not transmitted (default)
51+ on = atomic forces are transmitted.
2952
3053 Examples
3154""""""""
@@ -40,16 +63,19 @@ Description
4063
4164This fix implements the "Interactive MD" (IMD) protocol which allows
4265realtime visualization and manipulation of MD simulations through the
43- IMD protocol, as initially implemented in VMD and NAMD. Specifically
44- it allows LAMMPS to connect an IMD client, for example the `VMD visualization program <VMD _>`_, so that it can monitor the progress of the
45- simulation and interactively apply forces to selected atoms.
46-
47- If LAMMPS is compiled with the pre-processor flag -DLAMMPS_ASYNC_IMD
48- then fix imd will use POSIX threads to spawn a IMD communication
49- thread on MPI rank 0 in order to offload data reading and writing
50- from the main execution thread and potentially lower the inferred
51- latencies for slow communication links. This feature has only been
52- tested under linux.
66+ IMD protocol, as initially implemented in VMD and NAMD. Specifically it
67+ allows LAMMPS to connect an IMD client, for example the `VMD
68+ visualization program <VMD_> `_ (currently only supports IMDv2) or the
69+ `Python IMDClient <IMDClient _>`_ (supports both IMDv2 and IMDv3), so
70+ that it can monitor the progress of the simulation and interactively
71+ apply forces to selected atoms.
72+
73+ If LAMMPS is compiled with the pre-processor flag
74+ :ref: `-DLAMMPS_ASYNC_IMD <misc >` then fix imd will use POSIX threads to
75+ spawn an IMD communication thread on MPI rank 0 in order to offload data
76+ exchange with the IMD client from the main execution thread and
77+ potentially lower the inferred latencies for slow communication
78+ links. This feature has only been tested under linux.
5379
5480The source code for this fix includes code developed by the Theoretical
5581and Computational Biophysics Group in the Beckman Institute for Advanced
@@ -94,6 +120,15 @@ with different units or as a measure to tweak the forces generated by
94120the manipulation of the IMD client, this option allows to make
95121adjustments.
96122
123+ .. versionadded :: TBD
124+
125+ In `IMDv3 <IMDv3 _>`_, the IMD protocol has been extended to allow for
126+ the transmission of simulation time, box dimensions, atomic coordinates,
127+ velocities, and forces. The *version * keyword allows to select the
128+ version of the protocol to be used. The *time *, *box *, *coordinates *,
129+ *velocities *, and *forces * keywords allow to select which data is
130+ transmitted to the IMD client. The default is to transmit all data.
131+
97132To connect VMD to a listening LAMMPS simulation on the same machine
98133with fix imd enabled, one needs to start VMD and load a coordinate or
99134topology file that matches the fix group. When the VMD command
@@ -129,6 +164,10 @@ screen output is active.
129164
130165.. _imdvmd : https://www.ks.uiuc.edu/Research/vmd/imd/
131166
167+ .. _IMDClient : https://github.com/Becksteinlab/imdclient/tree/main/imdclient
168+
169+ .. _IMDv3 : https://imdclient.readthedocs.io/en/latest/protocol_v3.html
170+
132171Restart, fix_modify, output, run start/stop, minimize info
133172"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
134173
@@ -147,14 +186,14 @@ This fix is part of the MISC package. It is only enabled if LAMMPS was
147186built with that package. See the :doc: `Build package <Build_package >`
148187page for more info.
149188
150- When used in combination with VMD, a topology or coordinate file has
151- to be loaded, which matches (in number and ordering of atoms) the
152- group the fix is applied to. The fix internally sorts atom IDs by
153- ascending integer value; in VMD (and thus the IMD protocol) those will
154- be assigned 0-based consecutive index numbers.
189+ When used in combination with VMD, a topology or coordinate file has to
190+ be loaded, which matches (in number and ordering of atoms) the group the
191+ fix is applied to. The fix internally sorts atom IDs by ascending
192+ integer value; in VMD (and thus the IMD protocol) those will be assigned
193+ 0-based consecutive index numbers.
155194
156195When using multiple active IMD connections at the same time, each
157- needs to use a different port number.
196+ fix instance needs to use a different port number.
158197
159198Related commands
160199""""""""""""""""
0 commit comments