<spanid="index-0"></span><h1>fix imd command<aclass="headerlink"href="#fix-imd-command"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="syntax">
<h2>Syntax<aclass="headerlink"href="#syntax"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>fix ID group-ID imd trate port keyword values ...
</pre></div>
</div>
<ulclass="simple">
<li>ID, group-ID are documented in <aclass="reference internal"href="fix.html"><em>fix</em></a> command</li>
<li>imd = style name of this fix command</li>
<li>port = port number on which the fix listens for an IMD client</li>
<li>keyword = <em>unwrap</em> or <em>fscale</em> or <em>trate</em></li>
</ul>
<preclass="literal-block">
<em>unwrap</em> arg = <em>on</em> or <em>off</em>
off = coordinates are wrapped back into the principal unit cell (default)
on = "unwrapped" coordinates using the image flags used
<em>fscale</em> arg = factor
factor = floating point number to scale IMD forces (default: 1.0)
<em>trate</em> arg = transmission rate of coordinate data sets (default: 1)
<em>nowait</em> arg = <em>on</em> or <em>off</em>
off = LAMMPS waits to be connected to an IMD client before continuing (default)
on = LAMMPS listens for an IMD client, but continues with the run
</pre>
</div>
<divclass="section"id="examples">
<h2>Examples<aclass="headerlink"href="#examples"title="Permalink to this headline">¶</a></h2>
<divclass="highlight-python"><divclass="highlight"><pre>fix vmd all imd 5678
fix comm all imd 8888 trate 5 unwrap on fscale 10.0
</pre></div>
</div>
</div>
<divclass="section"id="description">
<h2>Description<aclass="headerlink"href="#description"title="Permalink to this headline">¶</a></h2>
<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:
<h2>Restart, fix_modify, output, run start/stop, minimize info<aclass="headerlink"href="#restart-fix-modify-output-run-start-stop-minimize-info"title="Permalink to this headline">¶</a></h2>
<p>No information about this fix is written to <aclass="reference internal"href="restart.html"><em>binary restart files</em></a>. None of the <aclass="reference internal"href="fix_modify.html"><em>fix_modify</em></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"><span>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"><em>run</em></a> command.
This fix is not invoked during <aclass="reference internal"href="minimize.html"><em>energy minimization</em></a>.</p>
</div>
<divclass="section"id="restrictions">
<h2>Restrictions<aclass="headerlink"href="#restrictions"title="Permalink to this headline">¶</a></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"><span>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>.