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>print command
|
|
|
|
</H3>
|
|
|
|
<P><B>Syntax:</B>
|
|
|
|
</P>
|
2010-01-20 04:04:41 +08:00
|
|
|
<PRE>print str1 str2 ...
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
2010-01-20 04:04:41 +08:00
|
|
|
<UL><LI>str1,str2,...,strN = one or more text strings to print, which may contain variables
|
2006-09-22 00:22:34 +08:00
|
|
|
</UL>
|
|
|
|
<P><B>Examples:</B>
|
|
|
|
</P>
|
2010-01-20 04:04:41 +08:00
|
|
|
<PRE>print Done with equilibration
|
|
|
|
print The system volume is now $v
|
2007-12-13 22:33:12 +08:00
|
|
|
print "The system volume is now $v"
|
2006-09-22 00:22:34 +08:00
|
|
|
</PRE>
|
|
|
|
<P><B>Description:</B>
|
|
|
|
</P>
|
2010-01-20 04:04:41 +08:00
|
|
|
<P>Print one or more text strings to the screen and logfile. The
|
|
|
|
individual text strings are effectively concatenated into a single
|
|
|
|
string, and one line of output is generated. Thus the 2nd and 3rd
|
|
|
|
examples above are equivalent. If variables are included in any of
|
|
|
|
the strings, they will be evaluated and their current values printed.
|
2007-02-10 05:37:30 +08:00
|
|
|
</P>
|
|
|
|
<P>If you want the print command to be executed multiple times (with
|
|
|
|
changing variable values), there are 3 options. First, consider using
|
2008-01-03 03:25:15 +08:00
|
|
|
the <A HREF = "fix_print.html">fix print</A> command, which will print a string
|
2007-02-10 05:37:30 +08:00
|
|
|
periodically during a simulation. Second, the print command can be
|
|
|
|
used as an argument to the <I>every</I> option of the <A HREF = "run.html">run</A>
|
|
|
|
command. Third, the print command could appear in a section of the
|
2008-01-03 03:25:15 +08:00
|
|
|
input script that is looped over (see the <A HREF = "jump.html">jump</A> and
|
|
|
|
<A HREF = "next.html">next</A> commands).
|
2007-02-10 05:37:30 +08:00
|
|
|
</P>
|
|
|
|
<P>See the <A HREF = "variable.html">variable</A> command for a description of <I>equal</I>
|
|
|
|
style variables which are typically the most useful ones to use with
|
2007-12-13 22:33:12 +08:00
|
|
|
the print command. Equal-style variables can calculate formulas
|
|
|
|
involving mathematical operations, atom properties, group properties,
|
2008-03-01 09:13:20 +08:00
|
|
|
thermodynamic properties, global values calculated by a
|
2007-12-13 22:33:12 +08:00
|
|
|
<A HREF = "compute.html">compute</A> or <A HREF = "fix.html">fix</A>, or references to other
|
|
|
|
<A HREF = "variable.html">variables</A>.
|
2006-09-22 00:22:34 +08:00
|
|
|
</P>
|
|
|
|
<P><B>Restrictions:</B> none
|
|
|
|
</P>
|
|
|
|
<P><B>Related commands:</B>
|
|
|
|
</P>
|
|
|
|
<P><A HREF = "fix_print.html">fix print</A>, <A HREF = "variable.html">variable</A>
|
|
|
|
</P>
|
|
|
|
<P><B>Default:</B> none
|
|
|
|
</P>
|
|
|
|
</HTML>
|