<HTML>
<CENTER><A HREF = "https://sparta.github.io">SPARTA WWW Site</A> - <A HREF = "Manual.html">SPARTA Documentation</A> - <A HREF = "Section_commands.html#comm">SPARTA Commands</A> 
</CENTER>






<HR>

<H3>fix print command 
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID print N string keyword value ... 
</PRE>
<UL><LI>ID is 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 print 100 "Coords of marker particle = $x $y $z"
fix extra print 100 "Coords of marker particle = $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 quotes if it is more than one word.  If it
contains variables it must be enclosed in 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>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, statistical 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>
<HR>

<P><B>Restart, output info:</B>
</P>
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
files</A>.  No global or per-particle or per-grid quantities
are stored by this fix for access by various output commands.
</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>
