forked from lijiext/lammps
61 lines
2.1 KiB
HTML
61 lines
2.1 KiB
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>print command
|
|
</H3>
|
|
<P><B>Syntax:</B>
|
|
</P>
|
|
<PRE>print str
|
|
</PRE>
|
|
<UL><LI>str = text string to print, which may contain variables
|
|
</UL>
|
|
<P><B>Examples:</B>
|
|
</P>
|
|
<PRE>print "Done with equilibration"
|
|
print Vol=$v
|
|
print "The system volume is now $v"
|
|
print 'The system volume is now $v'
|
|
</PRE>
|
|
<P><B>Description:</B>
|
|
</P>
|
|
<P>Print a text string to the screen and logfile. One line of output is
|
|
generated. If the string has white space in it (spaces, tabs, etc),
|
|
then you must enclose it in quotes so that it is treated as a single
|
|
argument. If variables are included in the string, they will be
|
|
evaluated and their current values printed.
|
|
</P>
|
|
<P>If you want the print command to be executed multiple times (with
|
|
changing variable values), there are 3 options. First, consider using
|
|
the <A HREF = "fix_print.html">fix print</A> command, which will print a string
|
|
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
|
|
input script that is looped over (see the <A HREF = "jump.html">jump</A> and
|
|
<A HREF = "next.html">next</A> commands).
|
|
</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
|
|
the print command. Equal-style variables can 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><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>
|