LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

dump_modify command

Syntax:

dump_modify dump-ID keyword args ... 

Examples:

dump_modify 1 format "%d %d %20.15g %g %g" scale yes
dump_modify myDump image yes scale no flush yes
dump_modify 1 header xyz region mySphere thresh x < 0.0 thresh energy >= 3.2 

Description:

Modify the parameters of a previously defined dump command. Not all parameters are relevant to all dump styles.

Each dump style has a default C-style format string which simply specifies %d for integers and %g for real values. The format keyword can be used to override the default with a new C-style format string. Do not include a trailing "\n" newline character in the format string.

The scale and image keywords apply only to the dump atom style. A scale value of yes means atom coords are written in normalized units from 0.0 to 1.0 in each box dimension. A value of no means they are written in absolute distance units (e.g. Angstroms or sigma). If the image value is yes, 3 flags are appended to each atom's coords which are the absolute box image of the atom in each dimension. For example, an x image flag of -3 with a normalized coord of 0.5 means the atom is in the center of the box, but has passed thru the box boundary 3 times and is really 3 box lengths to the left of its current coordinate.

The header keyword determines the file format for the snapshots. A value of item means each keyword is prefaced by "ITEM:" which is the default LAMMPS format that works with its associated post-processing tools like the Pizza.py toolkit. A value of xyz writes the dump file in the XYZ format used by other molecular modeling codes and visualization tools. For dump atom commands, each line will have 4 quantities: the atom type and unscaled coordinates. For dump custom commands, each line will list all the quantities it specifies.

The flush option invokes a flush operation after a dump snapshot is written to the dump file. This insures the output in that file is current (no buffering by the OS), even if LAMMPS halts before the simulation completes.

The every option changes the dump frequency originally specified by the dump command to a new value which must be > 0.

The region keyword only applies to the dump custom style. If specified, only atoms in the region will be written to the dump file. Only one region can be applied as a filter (the last one specified). See the region command for more details. Note that a region can be defined as the "inside" or "outside" of a geometric shape, and it can be the "union" or "intersection" of a series of simpler regions.

The thresh keyword only applies to the dump custom style. Multiple threshholds can be specified. Specifying "none" turns off all threshhold criteria. If theshholds are specified, only atoms whose attributes meet all the threshhold criteria are written to the dump file. The possible attributes that can be tested for are the same as those that can be specified in the dump custom command. Note that different attributes can be output by the dump custom command than are used as threshhold criteria by the dump_modify command.

Restrictions: none

Related commands:

dump, undump

Default:

The option defaults are format = %d and %g for each integer or floating point value, scale = yes, image = no, header = item, flush = yes, region = none, and thresh = none.