LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

### print command

Syntax:

    print args

- args = a line of text and variables names to print out

Examples:

    print The system volume is now $v

Description:

Print the list of arguments as a line of text to the screen and/or logfile. If variables are included in the arguments, they will be evaluated and their current values printed. Note that if variables are included, the print string should not be enclosed in double quotes, else it will prevent the variables from being evaluated.

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 invoke a print 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 command).

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 complex formulas involving atom and group properties, mathematical operations, other variables, etc.

Restrictions: none

Related commands:

fix print, variable

Default: none