<p>This fix implements the “Interactive MD” (IMD) protocol which allows
realtime visualization and manipulation of MD simulations through the
IMD protocol, as initially implemented in VMD and NAMD. Specifically
it allows LAMMPS to connect an IMD client, for example the <aclass="reference external"href="http://www.ks.uiuc.edu/Research/vmd">VMD visualization program</a>, so that it can monitor the progress of the
simulation and interactively apply forces to selected atoms.</p>
<p>If LAMMPS is compiled with the preprocessor flag -DLAMMPS_ASYNC_IMD
then fix imd will use POSIX threads to spawn a IMD communication
thread on MPI rank 0 in order to offload data reading and writing
from the main execution thread and potentially lower the inferred
latencies for slow communication links. This feature has only been
tested under linux.</p>
<p>There are example scripts for using this package with LAMMPS in
examples/USER/imd. Additional examples and a driver for use with the
Novint Falcon game controller as haptic device can be found at:
<p>This assumes that <em>fix imd</em> was started with 5678 as a port
number for the IMD protocol.</p>
<p>The steps to do interactive manipulation of a running simulation in
VMD are the following:</p>
<p>In the Mouse menu of the VMD Main window, select “Mouse -> Force ->
Atom”. You may alternately select “Residue”, or “Fragment” to apply
forces to whole residues or fragments. Your mouse can now be used to
apply forces to your simulation. Click on an atom, residue, or
fragment and drag to apply a force. Click quickly without moving the
mouse to turn the force off. You can also use a variety of 3D position
trackers to apply forces to your simulation. Game controllers or haptic
devices with force-feedback such as the Novint Falcon or Sensable
PHANTOM allow you to feel the resistance due to inertia or interactions
with neighbors that the atoms experience you are trying to move, as if
they were real objects. See the <aclass="reference external"href="http://www.ks.uiuc.edu/Research/vmd/imd/">VMD IMD Homepage</a> and the
<aclass="reference external"href="http://sites.google.com/site/akohlmey/software/vrpn-icms">VRPN-ICMS Homepage</a> for more details.</p>
<p>If IMD control messages are received, a line of text describing the
message and its effect will be printed to the LAMMPS output screen, if
screen output is active.</p>
<p><strong>Restart, fix_modify, output, run start/stop, minimize info:</strong></p>
<p>No information about this fix is written to <aclass="reference internal"href="restart.html"><spanclass="doc">binary restart files</span></a>. None of the <aclass="reference internal"href="fix_modify.html"><spanclass="doc">fix_modify</span></a> options
are relevant to this fix. No global scalar or vector or per-atom
quantities are stored by this fix for access by various <aclass="reference internal"href="Section_howto.html#howto-15"><spanclass="std std-ref">output commands</span></a>. No parameter of this fix can
be used with the <em>start/stop</em> keywords of the <aclass="reference internal"href="run.html"><spanclass="doc">run</span></a> command.
This fix is not invoked during <aclass="reference internal"href="minimize.html"><spanclass="doc">energy minimization</span></a>.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions</h2>
<p>This fix is part of the USER-MISC package. It is only enabled if
LAMMPS was built with that package. See the <aclass="reference internal"href="Section_start.html#start-3"><spanclass="std std-ref">Making LAMMPS</span></a> section for more info.</p>
<p>When used in combination with VMD, a topology or coordinate file has
to be loaded, which matches (in number and ordering of atoms) the
group the fix is applied to. The fix internally sorts atom IDs by
ascending integer value; in VMD (and thus the IMD protocol) those will
be assigned 0-based consecutive index numbers.</p>
<p>When using multiple active IMD connections at the same time, each
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.