git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4809 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
76
doc/fix_external.html
Normal file
76
doc/fix_external.html
Normal file
@ -0,0 +1,76 @@
|
||||
<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 external command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<PRE>fix ID group-ID external
|
||||
</PRE>
|
||||
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
||||
<LI>external = style name of this fix command
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>fix 1 all external
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>This fix makes a callback each timestep to an external driver program
|
||||
that is using LAMMPS as a library. This is a way to let another
|
||||
program compute forces on atoms which LAMMPS will include in its
|
||||
dynamics performed by the <A HREF = "run.html">run</A> command.
|
||||
</P>
|
||||
<P>The callback function "foo" will be invoked every timestep as:
|
||||
</P>
|
||||
<PRE>foo(ptr,timestep,nlocal,ids,x,fexternal);
|
||||
</PRE>
|
||||
<P>which has this prototype:
|
||||
</P>
|
||||
<P>void foo(void *, int, int, int *, double **, double **);
|
||||
</P>
|
||||
<P>The arguments are as follows:
|
||||
</P>
|
||||
<UL><LI>ptr = pointer provided by and simply passed back to external driver
|
||||
<LI>timestep = current LAMMPS timestep
|
||||
<LI>nlocal = # of atoms on this processor
|
||||
<LI>ids = list of atom IDs on this processor
|
||||
<LI>x = coordinates of atoms on this processor
|
||||
<LI>fexternal = forces on atoms on this processor
|
||||
</UL>
|
||||
<P>Fexternal are the forces returned by the driver program,
|
||||
which LAMMPS adds to the current force on each atom.
|
||||
</P>
|
||||
<P>See the couple/lammps_quest/lmpqst.cpp file in the LAMMPS distribution
|
||||
for an example of a coupling application that uses this fix, and how
|
||||
it makes a call to the fix to specify what function the fix should
|
||||
callback to. The sample application performs classical MD using
|
||||
quantum forces computed by a density functional code <A HREF = "http://dft.sandia.gov/Quest">Quest</A>.
|
||||
</P>
|
||||
|
||||
|
||||
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
|
||||
</P>
|
||||
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
|
||||
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
|
||||
are relevant to this fix. No global or per-atom quantities are stored
|
||||
by this fix for access by various <A HREF = "Section_howto.html#4_15">output
|
||||
commands</A>. 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> none
|
||||
</P>
|
||||
<P><B>Related commands:</B> none
|
||||
</P>
|
||||
<P><B>Default:</B> none
|
||||
</P>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user