File: print.html

package info (click to toggle)
liggghts 3.0.3%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 106,076 kB
  • ctags: 34,406
  • sloc: cpp: 363,723; python: 21,138; ansic: 9,146; perl: 3,687; sh: 2,841; fortran: 2,802; xml: 788; makefile: 485; objc: 238; lisp: 169; f90: 145; csh: 16; awk: 14
file content (80 lines) | stat: -rw-r--r-- 2,863 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<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>
<P>print string keyword value:pre
</P>
<UL><LI>string = text string to print, which may contain variables 

<LI>zero or more keyword/value pairs may be appended 

<LI>keyword = <I>file</I> or <I>append</I> or <I>screen</I> 

<PRE>  <I>file</I> value = filename
  <I>append</I> value = filename
  <I>screen</I> value = <I>yes</I> or <I>no</I> 
</PRE>

</UL>
<P><B>Examples:</B>
</P>
<PRE>print "Done with equilibration" file info.dat
print Vol=$v append info.dat screen no
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.  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.
</P>
<P>If the <I>file</I> or <I>append</I> keyword is used, a filename is specified to
which the output 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 to the screen and logfile can
be turned on or off as desired.
</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>
</P>
<P>The option defaults are no file output and screen = yes.
</P>
</HTML>