forked from lijiext/lammps
144 lines
5.6 KiB
HTML
144 lines
5.6 KiB
HTML
![]() |
<HTML>
|
||
|
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
|
||
|
</CENTER>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<HR>
|
||
|
|
||
|
<H3>fix imd command
|
||
|
</H3>
|
||
|
<P><B>Syntax:</B>
|
||
|
</P>
|
||
|
<PRE>fix ID group-ID imd trate port keyword values ...
|
||
|
</PRE>
|
||
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
||
|
|
||
|
<LI>imd = style name of this fix command
|
||
|
|
||
|
<LI>port = port number on which the fix listens for an IMD client
|
||
|
|
||
|
<LI>keyword = <I>unwrap</I> or <I>fscale</I> or <I>trate</I>
|
||
|
|
||
|
<PRE> <I>unwrap</I> arg = <I>on</I> or <I>off</I>
|
||
|
off = coordinates are wrapped back into the principal unit cell (default)
|
||
|
on = "unwrapped" coordinates using the image flags used
|
||
|
<I>fscale</I> arg = factor
|
||
|
factor = floating point number to scale IMD forces (default: 1.0)
|
||
|
<I>trate</I> arg = transmission rate of coordinate data sets (default: 1)
|
||
|
</PRE>
|
||
|
|
||
|
</UL>
|
||
|
<P><B>Examples:</B>
|
||
|
</P>
|
||
|
<PRE>fix vmd all imd 5678
|
||
|
fix comm all imd 8888 trate 5 unwrap on fscale 10.0
|
||
|
</PRE>
|
||
|
<P><B>Description:</B>
|
||
|
</P>
|
||
|
<P>This fix implements the "Interactive MD" (IMD) protocol which allows
|
||
|
to connect an IMD client, for example the VMD visualization program,
|
||
|
to a running LAMMPS simulation and monitor the progress of the simulation
|
||
|
and interactively apply forces to selected atoms.
|
||
|
</P>
|
||
|
<P>Upon initialization of the fix, it will open a communication port
|
||
|
on the node with MPI task 0 and wait for an incoming connection.
|
||
|
As soon as an IMD client is connected, the simulation will continue
|
||
|
and the fix will send the current coordinates of the fix's group
|
||
|
to the IMD client at every trate MD step. When using r-RESPA, trate
|
||
|
applies to the steps of the outmost RESPA level.
|
||
|
During a run with an active IMD connection also the IMD client can
|
||
|
request to apply forces to selected atoms of the fix group.
|
||
|
</P>
|
||
|
<P>The port number selected must be an available network port number.
|
||
|
On many machines, port numbers < 1024 are reserved for accounts with
|
||
|
system manager privilege and specific applications. If multiple imd
|
||
|
fixes would be active at the same time, each needs to use a different
|
||
|
port number.
|
||
|
</P>
|
||
|
<P>The <I>trate</I> keyword allows to select how often the coordinate data
|
||
|
is sent to the IMD client. It can also be changed on request of
|
||
|
the IMD client through an IMD protocol message.
|
||
|
The <I>unwrap</I> keyword allows to send "unwrapped" coordinates to
|
||
|
the IMD client that undo the wrapping back of coordinates into
|
||
|
the principle unit cell, as done by default in LAMMPS.
|
||
|
The <I>fscale</I> keyword allows to apply a scaling factor to forces
|
||
|
transmitted by the IMD client. The IMD protocols stipulates that
|
||
|
forces are transferred in kcal/mol/angstrom under the assumption
|
||
|
that coordinates are given in angstrom. For LAMMPS runs with
|
||
|
different units or as a measure to tweak the forces generated
|
||
|
by the manipulation of the IMD client, this option allows to
|
||
|
make adjustments.
|
||
|
</P>
|
||
|
<P>To connect VMD to a waiting LAMMPS simulation on the same
|
||
|
machine with fix imd enabled, one needs to start VMD and load
|
||
|
a coordinate or topology file that matches the fix group.
|
||
|
When the VMD command prompts appears, one types the command line:
|
||
|
</P>
|
||
|
<PRE>imd connect localhost 5678
|
||
|
</PRE>
|
||
|
<P>This assumes that <I>fix imd</I> 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. Trackers with force-feedback such as the Sensable
|
||
|
PHANTOM allow you to feel the forces you are applying to your molecules,
|
||
|
as if they were real objects. See the <A HREF = "http://www.ks.uiuc.edu/Research/vmd/imd/">VMD IMD Homepage</A> for
|
||
|
more details.
|
||
|
</P>
|
||
|
|
||
|
|
||
|
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
||
|
</P>
|
||
|
<P>The fix does not write any information to restart files.
|
||
|
</P>
|
||
|
<P>None of the <A HREF = "fix_modify.html">fix_modify</A> options are relevant
|
||
|
to this fix.
|
||
|
</P>
|
||
|
<P>If IMD control messages are received, a line of text describing
|
||
|
the message and its effect will be printed to the screen, if
|
||
|
screen output is active.
|
||
|
</P>
|
||
|
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
|
||
|
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
|
||
|
minimization</A>.
|
||
|
</P>
|
||
|
<P><B>Restrictions:</B>
|
||
|
</P>
|
||
|
<P>This source code for this fix includes code developed by the
|
||
|
Theoretical and Computational Biophysics Group in the Beckman
|
||
|
Institute for Advanced Science and Technology at the University of
|
||
|
Illinois at Urbana-Champaign.
|
||
|
</P>
|
||
|
<P>This fix is part of the "user-imd" package. It is only enabled if
|
||
|
LAMMPS was built with that package. See the <A HREF = "Section_start.html#2_3">Making
|
||
|
LAMMPS</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 needs to use a different port number.
|
||
|
</P>
|
||
|
<P><B>Related commands:</B> none
|
||
|
</P>
|
||
|
<P><B>Default:</B> none
|
||
|
</P>
|
||
|
<HR>
|
||
|
|
||
|
</HTML>
|