Page MenuHomec4science

fix_print.html
No OneTemporary

File Metadata

Created
Sat, Nov 30, 22:00

fix_print.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 print command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID print N string keyword value ...
</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
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>file</I> or <I>append</I> or <I>screen</I> or <I>title</I>
<PRE> <I>file</I> value = filename
<I>append</I> value = filename
<I>screen</I> value = <I>yes</I> or <I>no</I>
<I>title</I> value = string
string = text to print as 1st line of output file
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix extra all print 100 "Coords of marker atom = $x $y $z"
fix extra all print 100 "Coords of marker atom = $x $y $z" file coord.txt
</PRE>
<P><B>Description:</B>
</P>
<P>Print a text string every N steps during a simulation run. This can
be used for diagnostic purposes or 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 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 line is read, but
will instead be evaluated each time the string is printed.
</P>
<P>The specified group-ID is ignored by this fix.
</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
fix print line is output. Equal-style variables calculate formulas
involving mathematical operations, atom properties, group properties,
thermodynamic properties, global values calculated by a
<A HREF = "compute.html">compute</A> or <A HREF = "fix.html">fix</A>, or references to other
<A HREF = "variable.html">variables</A>.
</P>
<P>If the <I>file</I> or <I>append</I> keyword is used, a filename is specified to
which the output generated by this fix will be written. If <I>file</I> is
used, then the filename is overwritten if it already exists. If
<I>append</I> is used, then the filename is appended to if it already
exists, or created if it does not exist.
</P>
<P>If the <I>screen</I> keyword is used, output by this fix to the screen and
logfile can be turned on or off as desired.
</P>
<P>The <I>title</I> keyword allow specification of the string that will be
printed as the first line of the output file, assuming the <I>file</I>
keyword was used. By default, the title line is as follows:
</P>
<PRE># Fix print output for fix ID
</PRE>
<P>where ID is replaced with the fix-ID.
</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#howto_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>
</P>
<P><A HREF = "variable.html">variable</A>, <A HREF = "print.html">print</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are no file output, screen = yes, and title string
as described above.
</P>
</HTML>

Event Timeline