2006-09-22 00:22:34 +08:00
|
|
|
<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 print command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix ID group-ID print N string
|
|
|
|
</PRE>
|
|
|
|
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
|
|
|
|
<LI>print = style name of this fix command
|
|
|
|
<LI>N = print every N steps
|
|
|
|
<LI>string = text string to print with optional variable names
|
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
|
|
|
<PRE>fix extra all print 100 "Coords of marker atom = $x $y $z"
|
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
|
|
|
<P>Print a text string to the screen and logfile every N steps during a
|
|
|
|
simulation run. This can be used for diagnostic purposes or even as a
|
|
|
|
debugging tool to monitor some quantity during a run. The text string
|
|
|
|
must be a single argument, so it should be enclosed in double quotes
|
2007-02-10 05:37:30 +08:00
|
|
|
if it is more than one word. If it contains variables it must be
|
|
|
|
enclosed in double quotes to insure they are not evaluated when the
|
|
|
|
input script is read, but will instead be evaluated when the string is
|
|
|
|
printed.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P>See the <A HREF = "variable.html">variable</A> command for a description of <I>equal</I>
|
|
|
|
style variables which are the most useful ones to use with the fix
|
|
|
|
print command, since they are evaluated afresh each timestep that the
|
2007-02-10 05:37:30 +08:00
|
|
|
fix print line is output. Equal-style variables can calculate complex
|
|
|
|
formulas involving atom and group properties, mathematical operations,
|
|
|
|
other variables, etc.
|
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B>
|
|
|
|
</P>
|
|
|
|
<P>If <I>equal</I>-style variables are used which contain
|
|
|
|
<A HREF = "thermo_style.html">thermo_style custom</A> keywords for energy such as
|
|
|
|
pe, eng, evdwl, ebond, etc, then they will only be up-to-date on
|
|
|
|
timesteps where thermodynamics are computed. For example, if you
|
|
|
|
output thermodynamics every 100 steps, but issue a fix print command
|
|
|
|
with N = 2 that contains such a variable, the printed value will only
|
|
|
|
be current on timesteps that are a multiple of 100. This is because
|
|
|
|
the potential functions in LAMMPS (pairwise, bond, etc) only compute
|
|
|
|
energies on timesteps when thermodynamic output is being performed.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "variable.html">variable</A>, <A HREF = "print.html">print</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|