From 9dc10e8118ce50e62ea16f2b431fd63beaf31b3a Mon Sep 17 00:00:00 2001 From: athomps Date: Thu, 15 Aug 2013 15:22:35 +0000 Subject: [PATCH] Added file support to print command git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10588 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/print.html | 41 +++++++++++++++++++++++++++++++---------- doc/print.txt | 38 ++++++++++++++++++++++++++++---------- 2 files changed, 59 insertions(+), 20 deletions(-) diff --git a/doc/print.html b/doc/print.html index c9b67597df..dba7a59e83 100644 --- a/doc/print.html +++ b/doc/print.html @@ -13,24 +13,43 @@

Syntax:

-
print str 
+

print string keyword value:pre +

+
  • string = text string to print, which may contain variables + +
  • zero or more keyword/value pairs may be appended + +
  • keyword = file or append or screen + +
      file value = filename
    +  append value = filename
    +  screen value = yes or no 
     
    -
    • str = text string to print, which may contain variables +

    Examples:

    -
    print "Done with equilibration"
    -print Vol=$v
    -print "The system volume is now $v"
    +
    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' 
     

    Description:

    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. +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 you want the print command to be executed multiple times (with changing variable values), there are 3 options. First, consider using @@ -55,6 +74,8 @@ thermodynamic properties, global values calculated by a

    fix print, variable

    -

    Default: none +

    Default: +

    +

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

    diff --git a/doc/print.txt b/doc/print.txt index 1b4bb4d08c..c9d47dd6cf 100644 --- a/doc/print.txt +++ b/doc/print.txt @@ -10,24 +10,39 @@ print command :h3 [Syntax:] -print str :pre +print string keyword value:pre -str = text string to print, which may contain variables :ul +string = text string to print, which may contain variables :l +zero or more keyword/value pairs may be appended :l +keyword = {file} or {append} or {screen} :l + {file} value = filename + {append} value = filename + {screen} value = {yes} or {no} :pre +:ule [Examples:] -print "Done with equilibration" -print Vol=$v -print "The system volume is now $v" +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 [Description:] 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. +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 you want the print command to be executed multiple times (with changing variable values), there are 3 options. First, consider using @@ -52,4 +67,7 @@ thermodynamic properties, global values calculated by a "fix print"_fix_print.html, "variable"_variable.html -[Default:] none +[Default:] + +The option defaults are no file output, and screen = yes. +