LIGGGHTS
v4.X
  • 1. Introduction
    • 1.1. What is LIGGGHTS(R)-INL
    • 1.2. LIGGGHTS-PUBLIC VS. LIGGGHTS-PREMIUM
    • 1.3. History
    • 1.4. LIGGGHTS(R)-INL features
    • 1.5. LIGGGHTS(R)-INL General features
    • 1.6. LIGGGHTS(R)-INL Model features: LIGGGHTS-PUBLIC features
    • 1.7. LIGGGHTS(R)-INL Model features: Additional features for LIGGGHTS(R)-INL
    • 1.8. Open source distribution
    • 1.9. Acknowledgments and citations
  • 2. Getting Started
    • 2.1. How to obtain LIGGGHTS(R)-INL
    • 2.2. Making LIGGGHTS(R)-INL
      • 2.2.1. Read this first:
      • 2.2.2. Steps to build a LIGGGHTS(R)-INL executable:
      • 2.2.3. Advanced building using custom makefiles
      • 2.2.4. Errors that can occur when making LIGGGHTS(R)-INL:
      • 2.2.5. Additional build tips:
      • 2.2.6. Building for a Mac:
      • 2.2.7. Building for Windows:
    • 2.3. Making LIGGGHTS(R)-INL with optional packages
    • 2.4. Building LIGGGHTS(R)-INL via the Make.py script
    • 2.5. Building LIGGGHTS(R)-INL as a library
      • 2.5.1. Static library:
      • 2.5.2. Shared library:
      • 2.5.3. Additional requirement for using a shared library:
      • 2.5.4. Calling the LIGGGHTS(R)-INL library:
    • 2.6. Running LIGGGHTS(R)-INL
    • 2.7. Command-line options
    • 2.8. LIGGGHTS(R)-INL screen output
  • 3. Input Script
    • 3.1. LIGGGHTS(R)-INL input script
    • 3.2. Parsing rules
    • 3.3. Input script structure
    • 3.4. An example input script
  • 4. Commands
    • 4.1. List of all commands
    • 4.2. bond_style potentials
    • 4.3. compute styles
    • 4.4. dump styles
    • 4.5. fix styles
    • 4.6. pair_style potentials
  • 5. Contact models
    • 5.1. cohesion commands
    • 5.2. model commands
    • 5.3. rolling_friction commands
    • 5.4. surface commands
    • 5.5. tangential commands
  • 6. Mesh modules
    • 6.1. module commands
  • 7. Packages
  • 8. How-to discussions
    • 8.1. Restarting a simulation
    • 8.2. 2d simulations
    • 8.3. Running multiple simulations from one input script
    • 8.4. Granular models
    • 8.5. Coupling LIGGGHTS(R)-INL to other codes
    • 8.6. Visualizing LIGGGHTS(R)-INL snapshots
    • 8.7. Triclinic (non-orthogonal) simulation boxes
    • 8.8. Output from LIGGGHTS(R)-INL (thermo, dumps, computes, fixes, variables)
      • 8.8.1. Global/per-atom/local data
      • 8.8.2. Scalar/vector/array data
      • 8.8.3. Thermodynamic output
      • 8.8.4. Dump file output
      • 8.8.5. Fixes that write output files
      • 8.8.6. Computes that process output quantities
      • 8.8.7. Fixes that process output quantities
      • 8.8.8. Computes that generate values to output
      • 8.8.9. Fixes that generate values to output
      • 8.8.10. Variables that generate values to output
      • 8.8.11. Summary table of output options and data flow between commands
    • 8.9. Walls
    • 8.10. Library interface to LIGGGHTS(R)-INL
  • 9. Modifying & extending LIGGGHTS(R)-INL
    • 9.1. Atom styles
    • 9.2. Compute styles
    • 9.3. Dump styles
    • 9.4. Dump custom output options
    • 9.5. Fix styles
    • 9.6. Input script commands
    • 9.7. Pairwise potentials
    • 9.8. Region styles
    • 9.9. Thermodynamic output options
    • 9.10. Variable options
    • 9.11. Submitting new features for inclusion in LIGGGHTS(R)-INL
  • 10. Python interface to LIGGGHTS(R)-INL
    • 10.1. Building LIGGGHTS(R)-INL as a shared library
    • 10.2. Installing the Python wrapper into Python
    • 10.3. Extending Python with MPI to run in parallel
    • 10.4. Testing the Python-LIGGGHTS(R)-INL interface
      • 10.4.1. Test LIGGGHTS(R)-INL and Python in serial:
      • 10.4.2. Test LIGGGHTS(R)-INL and Python in parallel:
      • 10.4.3. Running Python scripts:
    • 10.5. Using LIGGGHTS(R)-INL from Python
    • 10.6. Example Python scripts that use LIGGGHTS(R)-INL
  • 11. Errors
    • 11.1. Common problems
    • 11.2. Reporting bugs
    • 11.3. Error & warning messages
    • 11.4. Errors:
    • 11.5. Warnings:
LIGGGHTS
  • Docs »
  • print command
  • View page source Website Commands

print command¶

Syntax¶

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 or newline:l
  file value = filename
  append value = filename
  screen value = yes or no
  newline value = yes or no

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'

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 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 command. Third, the print command could appear in a section of the input script that is looped over (see the jump and next commands).

See the variable 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 or fix, or references to other variables.

Restrictions¶

none

Related commands¶

fix print, variable

Default¶

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


© Copyright 2016, DCS Computing GmbH, JKU Linz and Sandia Corporation.

Built with Sphinx using a theme provided by Read the Docs.