"LIGGGHTS(R)-PUBLIC WWW Site"_liws - "LIGGGHTS(R)-PUBLIC Documentation"_ld - "LIGGGHTS(R)-PUBLIC Commands"_lc :c

:link(liws,http://www.cfdem.com)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

print command :h3

[Syntax:]

print string keyword value:pre

string = text string to print, which may contain variables :ulb,l
zero or more keyword/value pairs may be appended :l
keyword = {file} or {append} or {screen} or {newline}:l
  {file} value = filename
  {append} value = filename
  {screen} value = {yes} or {no}
  {newline} value = {yes} or {no} :pre
:ule

[Examples:]

print "Done with equilibration" file info.dat
print Vol=${volume} append info.dat screen no newline no
print "The system volume is now $v"
print 'The system volume is now $v' :pre

[Description:]

Print a text string to the screen and logfile.  One line of output is
generated.  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, they will be evaluated and their current values printed.

If the {file} or {append} keyword is used, a filename is specified to
which the output will be written.  If {file} is used, then the
filename is overwritten if it already exists.  If {append} is used,
then the filename is appended to if it already exists, or created if
it does not exist.

If the {screen} keyword is used, output to the screen and logfile can
be turned on or off as desired.

If the {newline} keyword is used and its value set to {no} then no newline
character will be printed at the end of the string. This can be useful if a
string should be concatenated.

If you want the print command to be executed multiple times (with
changing variable values), there are 3 options.  First, consider using
the "fix print"_fix_print.html command, which will print a string
periodically during a simulation.  Second, the print command can be
used as an argument to the {every} option of the "run"_run.html
command.  Third, the print command could appear in a section of the
input script that is looped over (see the "jump"_jump.html and
"next"_next.html commands).

See the "variable"_variable.html command for a description of {equal}
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
"compute"_compute.html or "fix"_fix.html, or references to other
"variables"_variable.html.

[Restrictions:] none

[Related commands:]

"fix print"_fix_print.html, "variable"_variable.html

[Default:]

The option defaults are no file output, screen = yes and newline = yes.
