status_style command

Warning

GPU support for this command has not been tested and may not work as expected.

Syntax

status_style style args keywords values ...
  • style = file and/or terminal or all

  • args = list of arguments for a particular style

 file args = list of attributes
 terminal args = list of attributes
 all args = list of attributes
possible attributes = step, elapsed, elaplong, dt, time,
                      cpu, tpcpu, spcpu, cpuremain, part, cu, timestamp,
                      atoms, particles, ke, erotate,
                      vol, lx, ly, lz, xlo, xhi, ylo, yhi, zlo, zhi,
                      xy, xz, yz, xlat, ylat, zlat,
                      pxx, pyy, pzz, pxy, pxz, pyz,
                      fmax, fnorm,
                      cella, cellb, cellc, cellalpha, cellbeta, cellgamma,
                      id_ID, id_ID[I], id_ID[I][J],
                      id_ID.property_name,
                      v_name
  step = timestep
  elapsed = timesteps since start of this run
  elaplong = timesteps since start of initial run in a series of runs
  dt = timestep size
  time = simulation time
  cpu = elapsed CPU time in seconds
  tpcpu = time per CPU second
  spcpu = timesteps per CPU second
  cpuremain = estimated CPU time remaining in run
  part = which partition (0 to Npartition-1) this is
  cu = cundall number (atom timesteps per CPU second)
  timestamp = current time in hh:mm:ss
  atoms = # of atoms / particles
  particles = # of particles
  vol = volume
  lx,ly,lz = box lengths in x,y,z
  xlo,xhi,ylo,yhi,zlo,zhi = box boundaries
  xy,xz,yz = box tilt for triclinic (non-orthogonal) simulation boxes
  xlat,ylat,zlat = lattice spacings as calculated by lattice command
  pxx,pyy,pzz,pxy,pxz,pyz = 6 components of pressure tensor
  fmax = max component of force on any particle in any dimension
  fnorm = length of force vector for all particles
  cella,cellb,cellc = periodic cell lattice constants a,b,c
  cellalpha, cellbeta, cellgamma = periodic cell angles alpha,beta,gamma
  id_ID = global scalar value calculated by a command with ID
  id_ID[I] = Ith component of global vector calculated by a command with ID
  id_ID[I][J] = I,J component of global array calculated by a command with ID
  id_ID.property_name = property_name is a scalar or a component of a global vector/array calculated by a command with ID
  v_name = scalar value calculated by an equal-style variable with name
  • one or more optional keyword/value pairs can be appended

  • optional keyword = comment_style

comment_style value = comment_string
  comment_string = string used to prepend (comment) header lines [default: "" (none)]
mode value = add or remove or set [default]
  add = properties are appended to the previous command
  remove = properties will be removed from the previous command
  set = properties overwrite the previous command [default]

Examples

status_style terminal {time,step,atoms,ke,cu,vol} file {time,step,atoms,ke,cu,id_mesh[1],id_mesh[2],id_mesh[3],id_mesh[4],id_mesh[5],id_mesh[6]}
status_style all {time,step,particles,ke,cu,id_mesh[1],id_mesh[2],id_mesh[3],id_mesh[4],id_mesh[5],id_mesh[6]}
status_style all {time,step,atoms,ke,cu,id_mesh[1],id_mesh[2],id_mesh[3],id_mesh[4],id_mesh[5],id_mesh[6]} comment_style "%%"
status_style all {time,step,id_obj.fx,id_obj.fy,id_obj.fz,id_obj.tx,id_obj.ty,id_obj.tz,id_obj.ref_px,id_obj.ref_py,id_obj.ref_pz}
status_style mode add terminal {v_terminal} file {id_servo.center_of_mass_x}

Description

Set the style and content for printing status data to the screen, the log file and an output data file called simulation_data_aspherix.csv.

Style terminal prints the listed attributes to the screen and to the log file.

Style file prints the listed attributes to a file called simulation_data_aspherix.csv.

Style all prints the listed attributes to the screen, the log file and the data file simulation_data_aspherix.csv. This style is equivalent to defining the same listing for terminal and file.

The default output is time, step, atoms, ke and cu. All lines only contain numeric values apart from the header.

The styles allow you to specify which of the keywords listed above you want printed on each status timestep. Note that the keywords id_ID, v_name are references to computes, fixes, and equal-style variables that have been defined elsewhere in the input script. Thus the custom style provides a flexible means of outputting essentially any desired quantity as a simulation proceeds.

The values printed by the various keywords are instantaneous values, calculated on the current timestep. Time-averaged quantities, which include values from previous timesteps, can be output by using the id_ID keyword and accessing a command that does time-averaging such as the calculate temporal_average command.

Options invoked by the status_modify command can be used to set the one- or multi-line format of the print-out, the normalization of status output (total values versus per-atom values for extensive quantities (ones which scale with the number of atoms in the system), and the numeric precision of each printed value.

Warning

When you use a “status_style” command, all status settings are restored to their default values, including those previously set by a status_modify command. Thus if your input script specifies a status_style command, you should use the status_modify command after it.


The step, elapsed, and elaplong keywords refer to timestep count. Step is the current timestep. Elapsed is the number of timesteps elapsed since the beginning of this run. Elaplong is the number of timesteps elapsed since the beginning of an initial run in a series of runs. See the start and stop keywords for the run for info on how to invoke a series of runs that keep track of an initial starting time. If these keywords are not used, then elapsed and elaplong are the same value.

The dt keyword is the current timestep size in time units. The time keyword is the current elapsed simulation time, also in time units, which is simply (step*dt) if the timestep size has not changed and the timestep has not been reset. If the timestep has changed (e.g. via fix dt/reset) or the timestep has been reset (e.g. via the “reset_timestep” command), then the simulation time is effectively a cumulative value up to the current point.

The cpu keyword is elapsed CPU seconds since the beginning of this run. The tpcpu and spcpu keywords are measures of how fast your simulation is currently running. The tpcpu keyword is simulation time per CPU second, where simulation time is in time units. E.g. for metal units, the tpcpu value would be picoseconds per CPU second. The spcpu keyword is the number of timesteps per CPU second. Both quantities are on-the-fly metrics, measured relative to the last time they were invoked. Thus if you are printing out status output every 100 timesteps, the two keywords will continually output the time and timestep rate for the last 100 steps. The tpcpu keyword does not attempt to track any changes in timestep size, e.g. due to using the fix dt/reset command.

The cpuremain keyword estimates the CPU time remaining in the current run, based on the time elapsed thus far. It will only be a good estimate if the CPU time/timestep for the rest of the run is similar to the preceding timesteps. On the initial timestep the value will be 0.0 since there is no history to estimate from.

The part keyword is useful for multi-replica or multi-partition simulations to indicate which partition this output and this file corresponds to, or for use in a variable to append to a filename for output specific to this partition. Confer to the -partition command line option for details on running in multi-partition mode.

The fmax keyword calculates the maximum force in any dimension on any atom in the system, or the infinity-norm of the force vector for the system. The fnorm keyword calculates the 2-norm or length of the force vector.

The keywords cella, cellb, cellc, cellalpha, cellbeta, cellgamma, correspond to the usual crystallographic quantities that define the periodic unit cell of a crystal. See this section of the doc pages for a geometric description of triclinic periodic cells, including a precise definition of these quantities in terms of the internal Aspherix® cell dimensions lx, ly, lz, yz, xz, xy.


The id_ID and id_ID[I] and id_ID[I][J] keywords allow global values calculated by a command (compute or fix) to be output. A command can calculate global, per-atom, or local values. Only global values can be referenced by this command. However, per-atom values can be referenced in a variable, which can be used again for output.

The ID in the keyword should be replaced by the actual ID of a command that has been defined elsewhere in the input script. If the command calculates a global scalar, vector, or array, then the keyword formats with 0, 1, or 2 brackets will reference a scalar value from the command.

For easier use, some commands allow calculated property values to be accessed via the property name. For example, id_myMesh.fx will return the x-direction of the force on a mesh with object id myMesh. See the documentation of the commands themselves for more detailed information on this feature (if it is supported, and which property names to use).

Note that some commands calculate “intensive” global quantities like temperature; others calculate “extensive” global quantities like kinetic energy that are summed over all particles in the command group. Intensive quantities are printed directly without normalization by status_style custom. Extensive quantities may be normalized by the total number of atoms in the simulation (NOT the number of atoms in the command group) when output, depending on the status_modify norm option being used.

The v_name keyword allow the current value of a variable to be output. The name in the keyword should be replaced by the variable name that has been defined elsewhere in the input script. Only equal-style variables can be referenced. See the variable command for details. Variables of style equal can reference per-atom properties or status keywords, or they can invoke other commands or variables when evaluated, so this is a very general means of creating status output.

Note that equal-style variables are assumed to be “intensive” global quantities, which are thus printed as-is, without normalization by status_style custom. You can include a division by “natoms” in the variable formula if this is not the case.

Remark: when using the output_settings command, status_style is used with default settings in the back ground. The defaults are time, step, atoms, ke and cu + the output of check_timestep if available for the screen and the log file, and time, step, atoms, ke and cu + the output of check_timestep if available + everything else (forces on meshes, …) for the data file. For overwriting the default settings, please use another status_style

By default a header is written with the titles (variable names) of each column. If a column title is longer than the width required for the contents of the column, the column title will be wrapped over multiple lines (terminal only, in the csv file the header will always be on a single line). Only if a header has changed (if a new status_style command is used) it will be output again to the csv file. Therefore, if the status_style remains the same, multiple runs (simulate commands) within a single input file will produce a continuous csv file without intermediate headers and/or duplicate data lines. By default no comment symbol is used to prepend the header lines, but this can be changed by the comment_style keyword. Note that its value should contain the desired character/string between double quote characters.

The mode keyword by default has value set which means it replaces any previous status_style command. If the value add is used the arguments are appended to the list of previous arguments. This is great if you want to have additional output in a simulation and not having to worry about what was written out before. If the value remove is used the arguments are removed from the list of previous arguments. This is useful if a command was disabled, and you need to remove one or more connected quantities from the output.


Restrictions

This command must come after the simulation box is defined by a read_data, read_restart, or create_box command.

Default

The default output when using the output_settings command depends on the previously used commands. Note, most of the data will only be written to the output file (simulation_data_aspherix.csv) and not the terminal.

mode = set, comment_style = “”

status_style all {time,step,atoms,ke,cu}