1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
9 dump_modify command :h3
13 dump_modify dump-ID keyword values ... :pre
15 dump-ID = ID of dump to modify :ulb,l
16 one or more keyword/value pairs may be appended :l
17 these keywords apply to various dump styles :l
18 keyword = {append} or {buffer} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
19 {append} arg = {yes} or {no}
20 {buffer} arg = {yes} or {no}
21 {element} args = E1 E2 ... EN, where N = # of atom types
22 E1,...,EN = element name, e.g. C or Fe or Ga
24 N = dump every this many timesteps
25 N can be a variable (see below)
27 Np = write one file for every this many processors
28 {first} arg = {yes} or {no}
29 {format} args = {line} string, {int} string, {float} string, M string, or {none}
30 string = C-style format string
31 M = integer from 1 to N, where N = # of per-atom quantities being output
32 {flush} arg = {yes} or {no}
33 {image} arg = {yes} or {no}
35 string = character string (e.g. BONDS) to use in header of dump local file
37 Nf = write this many files, one from each of Nf processors
38 {pad} arg = Nchar = # of characters to convert timestep to
39 {pbc} arg = {yes} or {no} = remap atoms via periodic boundary conditions
40 {precision} arg = power-of-10 value from 10 to 1000000
41 {region} arg = region-ID or "none"
42 {scale} arg = {yes} or {no}
43 {sfactor} arg = coordinate scaling factor (> 0.0)
44 {tfactor} arg = time scaling factor (> 0.0)
45 {sort} arg = {off} or {id} or N or -N
46 off = no sorting of per-atom lines within a snapshot
47 id = sort per-atom lines by atom ID
48 N = sort per-atom lines in ascending order by the Nth column
49 -N = sort per-atom lines in descending order by the Nth column
50 {thresh} args = attribute operator value
51 attribute = same attributes (x,fy,etotal,sxx,etc) used by dump custom style
52 operator = "<" or "<=" or ">" or ">=" or "==" or "!=" or "|^"
53 value = numeric value to compare to, or LAST
54 these 3 args can be replaced by the word "none" to turn off thresholding
55 {unwrap} arg = {yes} or {no} :pre
56 these keywords apply only to the {image} and {movie} "styles"_dump_image.html :l
57 keyword = {acolor} or {adiam} or {amap} or {backcolor} or {bcolor} or {bdiam} or {boxcolor} or {color} or {bitrate} or {framerate} :l
58 {acolor} args = type color
59 type = atom type or range of types (see below)
60 color = name of color or color1/color2/...
61 {adiam} args = type diam
62 type = atom type or range of types (see below)
63 diam = diameter of atoms of that type (distance units)
64 {amap} args = lo hi style delta N entry1 entry2 ... entryN
65 lo = number or {min} = lower bound of range of color map
66 hi = number or {max} = upper bound of range of color map
67 style = 2 letters = "c" or "d" or "s" plus "a" or "f"
73 delta = binsize (only used for style "s", otherwise ignored)
74 binsize = range is divided into bins of this width
75 N = # of subsequent entries
76 entry = value color (for continuous style)
77 value = number or {min} or {max} = single value within range
78 color = name of color used for that value
79 entry = lo hi color (for discrete style)
80 lo/hi = number or {min} or {max} = lower/upper bound of subset of range
81 color = name of color used for that subset of values
82 entry = color (for sequential style)
83 color = name of color used for a bin of values
84 {backcolor} arg = color
85 color = name of color for background
86 {bcolor} args = type color
87 type = bond type or range of types (see below)
88 color = name of color or color1/color2/...
89 {bdiam} args = type diam
90 type = bond type or range of types (see below)
91 diam = diameter of bonds of that type (distance units)
92 {boxcolor} arg = color
93 color = name of color for simulation box lines and processor sub-domain lines
94 {color} args = name R G B
96 R,G,B = red/green/blue numeric values from 0.0 to 1.0
98 rate = target bitrate for movie in kbps
100 fps = frames per second for movie :pre
105 dump_modify 1 format line "%d %d %20.15g %g %g" scale yes
106 dump_modify 1 format float %20.15g scale yes
107 dump_modify myDump image yes scale no flush yes
108 dump_modify 1 region mySphere thresh x < 0.0 thresh epair >= 3.2
109 dump_modify xtcdump precision 10000 sfactor 0.1
110 dump_modify 1 every 1000 nfile 20
111 dump_modify 1 every v_myVar
112 dump_modify 1 amap min max cf 0.0 3 min green 0.5 yellow max blue boxcolor red :pre
116 Modify the parameters of a previously defined dump command. Not all
117 parameters are relevant to all dump styles.
119 As explained on the "dump"_dump.html doc page, the {atom/mpiio},
120 {custom/mpiio}, and {xyz/mpiio} dump styles are identical in command
121 syntax and in the format of the dump files they create, to the
122 corresponding styles without "mpiio", except the single dump file they
123 produce is written in parallel via the MPI-IO library. Thus if a
124 dump_modify option below is valid for the {atom} style, it is also
125 valid for the {atom/mpiio} style, and similarly for the other styles
126 which allow for use of MPI-IO.
131 These keywords apply to various dump styles, including the "dump
132 image"_dump_image.html and "dump movie"_dump_image.html styles. The
133 description gives details.
137 The {append} keyword applies to all dump styles except {cfg} and {xtc}
138 and {dcd}. It also applies only to text output files, not to binary
139 or gzipped or image/movie files. If specified as {yes}, then dump
140 snapshots are appended to the end of an existing dump file. If
141 specified as {no}, then a new dump file will be created which will
142 overwrite an existing file with the same name. This keyword can only
143 take effect if the dump_modify command is used after the
144 "dump"_dump.html command, but before the first command that causes
145 dump snapshots to be output, e.g. a "run"_run.html or
146 "minimize"_minimize.html command. Once the dump file has been opened,
147 this keyword has no further effect.
151 The {buffer} keyword applies only to dump styles {atom}, {cfg},
152 {custom}, {local}, and {xyz}. It also applies only to text output
153 files, not to binary or gzipped files. If specified as {yes}, which
154 is the default, then each processor writes its output into an internal
155 text buffer, which is then sent to the processor(s) which perform file
156 writes, and written by those processors(s) as one large chunk of text.
157 If specified as {no}, each processor sends its per-atom data in binary
158 format to the processor(s) which perform file wirtes, and those
159 processor(s) format and write it line by line into the output file.
161 The buffering mode is typically faster since each processor does the
162 relatively expensive task of formatting the output for its own atoms.
163 However it requires about twice the memory (per processor) for the
168 The {element} keyword applies only to the dump {cfg}, {xyz}, and
169 {image} styles. It associates element names (e.g. H, C, Fe) with
170 LAMMPS atom types. See the list of element names at the bottom of
173 In the case of dump {cfg}, this allows the "AtomEye"_atomeye
174 visualization package to read the dump file and render atoms with the
175 appropriate size and color.
177 In the case of dump {image}, the output images will follow the same
178 "AtomEye"_atomeye convention. An element name is specified for each
179 atom type (1 to Ntype) in the simulation. The same element name can
180 be given to multiple atom types.
182 In the case of {xyz} format dumps, there are no restrictions to what
183 label can be used as an element name. Any whitespace separated text
186 :link(atomeye,http://mt.seas.upenn.edu/Archive/Graphics/A)
190 The {every} keyword changes the dump frequency originally specified by
191 the "dump"_dump.html command to a new value. The every keyword can be
192 specified in one of two ways. It can be a numeric value in which case
193 it must be > 0. Or it can be an "equal-style variable"_variable.html,
194 which should be specified as v_name, where name is the variable name.
196 In this case, the variable is evaluated at the beginning of a run to
197 determine the next timestep at which a dump snapshot will be written
198 out. On that timestep the variable will be evaluated again to
199 determine the next timestep, etc. Thus the variable should return
200 timestep values. See the stagger() and logfreq() and stride() math
201 functions for "equal-style variables"_variable.html, as examples of
202 useful functions to use in this context. Other similar math functions
203 could easily be added as options for "equal-style
204 variables"_variable.html. Also see the next() function, which allows
205 use of a file-style variable which reads successive values from a
206 file, each time the variable is evaluated. Used with the {every}
207 keyword, if the file contains a list of ascending timesteps, you can
208 output snapshots whenever you wish.
210 Note that when using the variable option with the {every} keyword, you
211 need to use the {first} option if you want an initial snapshot written
212 to the dump file. The {every} keyword cannot be used with the dump
215 For example, the following commands will
216 write snapshots at timesteps 0,10,20,30,100,200,300,1000,2000,etc:
218 variable s equal logfreq(10,3,10)
219 dump 1 all atom 100 tmp.dump
220 dump_modify 1 every v_s first yes :pre
222 The following commands would write snapshots at the timesteps listed
225 variable f file tmp.times
226 variable s equal next(f)
227 dump 1 all atom 100 tmp.dump
228 dump_modify 1 every v_s :pre
230 NOTE: When using a file-style variable with the {every} keyword, the
231 file of timesteps must list a first timestep that is beyond the
232 current timestep (e.g. it cannot be 0). And it must list one or more
233 timesteps beyond the length of the run you perform. This is because
234 the dump command will generate an error if the next timestep it reads
235 from the file is not a value greater than the current timestep. Thus
236 if you wanted output on steps 0,15,100 of a 100-timestep run, the file
237 should contain the values 15,100,101 and you should also use the
238 dump_modify first command. Any final value > 100 could be used in
243 The {first} keyword determines whether a dump snapshot is written on
244 the very first timestep after the dump command is invoked. This will
245 always occur if the current timestep is a multiple of N, the frequency
246 specified in the "dump"_dump.html command, including timestep 0. But
247 if this is not the case, a dump snapshot will only be written if the
248 setting of this keyword is {yes}. If it is {no}, which is the
249 default, then it will not be written.
253 The {flush} keyword determines whether a flush operation is invoked
254 after a dump snapshot is written to the dump file. A flush insures
255 the output in that file is current (no buffering by the OS), even if
256 LAMMPS halts before the simulation completes. Flushes cannot be
257 performed with dump style {xtc}.
261 The {format} keyword can be used to change the default numeric format
262 output by the text-based dump styles: {atom}, {custom}, {cfg}, and
263 {xyz} styles, and their MPIIO variants. Only the {line} or {none}
264 options can be used with the {atom} and {xyz} styles.
266 All the specified format strings are C-style formats, e.g. as used by
267 the C/C++ printf() command. The {line} keyword takes a single
268 argument which is the format string for an entire line of output for
269 each atom (do not include a trailing "\n"), with N fields, which you
270 must enclose in quotes if it is more than one field. The {int} and
271 {float} keywords take a single format argument and are applied to all
272 integer or floating-point quantities output. The setting for {M
273 string} also takes a single format argument which is used for the Mth
274 value output in each line, e.g. the 5th column is output in high
275 precision for "format 5 %20.15g".
277 NOTE: When using the {line} keyword for the {cfg} style, the first two
278 fields (atom ID and type) are not actually written into the CFG file,
279 however you must include formats for them in the format string.
281 The {format} keyword can be used multiple times. The precedence is
282 that for each value in a line of output, the {M} format (if specified)
283 is used, else the {int} or {float} setting (if specified) is used,
284 else the {line} setting (if specified) for that value is used, else
285 the default setting is used. A setting of {none} clears all previous
286 settings, reverting all values to their default format.
288 NOTE: Atom and molecule IDs are stored internally as 4-byte or 8-byte
289 signed integers, depending on how LAMMPS was compiled. When
290 specifying the {format int} option you can use a "%d"-style format
291 identifier in the format string and LAMMPS will convert this to the
292 corresponding 8-byte form it it is needed when outputting those
293 values. However, when specifying the {line} option or {format M
294 string} option for those values, you should specify a format string
295 appropriate for an 8-byte signed integer, e.g. one with "%ld", if
296 LAMMPS was compiled with the -DLAMMPS_BIGBIG option for 8-byte IDs.
298 NOTE: Any value written to a text-based dump file that is a per-atom
299 quantity calculated by a "compute"_compute.html or "fix"_fix.html is
300 stored internally as a floating-point value. If the value is actually
301 an integer and you wish it to appear in the text dump file as a
302 (large) integer, then you need to use an appropriate format. For
303 example, these commands:
305 compute 1 all property/local batom1 batom2
306 dump 1 all local 100 tmp.bonds index c_1\[1\] c_1\[2\]
307 dump_modify 1 format "%d %0.0f %0.0f" :pre
309 will output the two atom IDs for atoms in each bond as integers. If
310 the dump_modify command were omitted, they would appear as
311 floating-point values, assuming they were large integers (more than 6
312 digits). The "index" keyword should use the "%d" format since it is
313 not generated by a compute or fix, and is stored internally as an
318 The {fileper} keyword is documented below with the {nfile} keyword.
322 The {image} keyword applies only to the dump {atom} style. If the
323 image value is {yes}, 3 flags are appended to each atom's coords which
324 are the absolute box image of the atom in each dimension. For
325 example, an x image flag of -2 with a normalized coord of 0.5 means
326 the atom is in the center of the box, but has passed thru the box
327 boundary 2 times and is really 2 box lengths to the left of its
328 current coordinate. Note that for dump style {custom} these various
329 values can be printed in the dump file by using the appropriate atom
330 attributes in the dump command itself.
334 The {label} keyword applies only to the dump {local} style. When
335 it writes local information, such as bond or angle topology
336 to a dump file, it will use the specified {label} to format
337 the header. By default this includes 2 lines:
339 ITEM: NUMBER OF ENTRIES
340 ITEM: ENTRIES ... :pre
342 The word "ENTRIES" will be replaced with the string specified,
343 e.g. BONDS or ANGLES.
347 The {nfile} or {fileper} keywords can be used in conjunction with the
348 "%" wildcard character in the specified dump file name, for all dump
349 styles except the {dcd}, {image}, {movie}, {xtc}, and {xyz} styles
350 (for which "%" is not allowed). As explained on the "dump"_dump.html
351 command doc page, the "%" character causes the dump file to be written
352 in pieces, one piece for each of P processors. By default P = the
353 number of processors the simulation is running on. The {nfile} or
354 {fileper} keyword can be used to set P to a smaller value, which can
355 be more efficient when running on a large number of processors.
357 The {nfile} keyword sets P to the specified Nf value. For example, if
358 Nf = 4, and the simulation is running on 100 processors, 4 files will
359 be written, by processors 0,25,50,75. Each will collect information
360 from itself and the next 24 processors and write it to a dump file.
362 For the {fileper} keyword, the specified value of Np means write one
363 file for every Np processors. For example, if Np = 4, every 4th
364 processor (0,4,8,12,etc) will collect information from itself and the
365 next 3 processors and write it to a dump file.
369 The {pad} keyword only applies when the dump filename is specified
370 with a wildcard "*" character which becomes the timestep. If {pad} is
371 0, which is the default, the timestep is converted into a string of
372 unpadded length, e.g. 100 or 12000 or 2000000. When {pad} is
373 specified with {Nchar} > 0, the string is padded with leading zeroes
374 so they are all the same length = {Nchar}. For example, pad 7 would
375 yield 0000100, 0012000, 2000000. This can be useful so that
376 post-processing programs can easily read the files in ascending
381 The {pbc} keyword applies to all the dump styles. As explained on the
382 "dump"_dump.html doc page, atom coordinates in a dump file may be
383 slightly outside the simulation box. This is because periodic
384 boundary conditions are enforced only on timesteps when neighbor lists
385 are rebuilt, which will not typically coincide with the timesteps dump
386 snapshots are written. If the setting of this keyword is set to
387 {yes}, then all atoms will be remapped to the periodic box before the
388 snapshot is written, then restored to their original position. If it
389 is set to {no} they will not be. The {no} setting is the default
390 because it requires no extra computation.
394 The {precision} keyword only applies to the dump {xtc} style. A
395 specified value of N means that coordinates are stored to 1/N
396 nanometer accuracy, e.g. for N = 1000, the coordinates are written to
397 1/1000 nanometer accuracy.
401 The {sfactor} and {tfactor} keywords only apply to the dump {xtc}
402 style. They allow customization of the unit conversion factors used
403 when writing to XTC files. By default they are initialized for
404 whatever "units"_units.html style is being used, to write out
405 coordinates in nanometers and time in picoseconds. I.e. for {real}
406 units, LAMMPS defines {sfactor} = 0.1 and {tfactor} = 0.001, since the
407 Angstroms and fmsec used by {real} units are 0.1 nm and 0.001 psec
408 respectively. If you are using a units system with distance and time
409 units far from nm and psec, you may wish to write XTC files with
410 different units, since the compression algorithm used in XTC files is
411 most effective when the typical magnitude of position data is between
416 The {region} keyword only applies to the dump {custom}, {cfg},
417 {image}, and {movie} styles. If specified, only atoms in the region
418 will be written to the dump file or included in the image/movie. Only
419 one region can be applied as a filter (the last one specified). See
420 the "region"_region.html command for more details. Note that a region
421 can be defined as the "inside" or "outside" of a geometric shape, and
422 it can be the "union" or "intersection" of a series of simpler
427 The {scale} keyword applies only to the dump {atom} style. A scale
428 value of {yes} means atom coords are written in normalized units from
429 0.0 to 1.0 in each box dimension. If the simluation box is triclinic
430 (tilted), then all atom coords will still be between 0.0 and 1.0. A
431 value of {no} means they are written in absolute distance units
432 (e.g. Angstroms or sigma).
436 The {sort} keyword determines whether lines of per-atom output in a
437 snapshot are sorted or not. A sort value of {off} means they will
438 typically be written in indeterminate order, either in serial or
439 parallel. This is the case even in serial if the "atom_modify
440 sort"_atom_modify.html option is turned on, which it is by default, to
441 improve performance. A sort value of {id} means sort the output by
442 atom ID. A sort value of N or -N means sort the output by the value
443 in the Nth column of per-atom info in either ascending or descending
446 The dump {local} style cannot be sorted by atom ID, since there are
447 typically multiple lines of output per atom. Some dump styles, such
448 as {dcd} and {xtc}, require sorting by atom ID to format the output
449 file correctly. If multiple processors are writing the dump file, via
450 the "%" wildcard in the dump filename, then sorting cannot be
453 NOTE: Unless it is required by the dump style, sorting dump file
454 output requires extra overhead in terms of CPU and communication cost,
455 as well as memory, versus unsorted output.
459 The {thresh} keyword only applies to the dump {custom}, {cfg},
460 {image}, and {movie} styles. Multiple thresholds can be specified.
461 Specifying {none} turns off all threshold criteria. If thresholds are
462 specified, only atoms whose attributes meet all the threshold criteria
463 are written to the dump file or included in the image. The possible
464 attributes that can be tested for are the same as those that can be
465 specified in the "dump custom"_dump.html command, with the exception
466 of the {element} attribute, since it is not a numeric value. Note
467 that a different attributes can be used than those output by the "dump
468 custom"_dump.html command. E.g. you can output the coordinates and
469 stress of atoms whose energy is above some threshold.
471 If an atom-style variable is used as the attribute, then it can
472 produce continuous numeric values or effective Boolean 0/1 values
473 which may be useful for the comparision operator. Boolean values can
474 be generated by variable formulas that use comparison or Boolean math
475 operators or special functions like gmask() and rmask() and grmask().
476 See the "variable"_variable.html command doc page for details.
478 The specified value must be a simple numeric value or the word LAST.
479 If LAST is used, it refers to the value of the attribute the last time
480 the dump command was invoked to produce a snapshot. This is a way to
481 only dump atoms whose attribute has changed (or not changed).
482 Three examples follow.
484 dump_modify ... thresh ix != LAST :pre
486 This will dump atoms which have crossed the periodic x boundary of the
487 simulation box since the last dump. (Note that atoms that crossed
488 once and then crossed back between the two dump timesteps would not be
491 region foo sphere 10 20 10 15
492 variable inregion atom rmask(foo)
493 dump_modify ... thresh v_inregion |^ LAST
495 This will dump atoms which crossed the boundary of the spherical
496 region since the last dump.
498 variable charge atom "(q > 0.5) || (q < -0.5)"
499 dump_modify ... thresh v_charge |^ LAST
501 This will dump atoms whose charge has changed from an absolute value
502 less than 1/2 to greater than 1/2 (or vice versa) since the last dump.
503 E.g. due to reactions and subsequent charge equilibration in a
504 reactive force field.
506 The choice of operators listed above are the usual comparison
507 operators. The XOR operation (exclusive or) is also included as "|^".
508 In this context, XOR means that if either the attribute or value is
509 0.0 and the other is non-zero, then the result is "true" and the
510 threshold criterion is met. Otherwise it is not met.
514 The {unwrap} keyword only applies to the dump {dcd} and {xtc} styles.
515 If set to {yes}, coordinates will be written "unwrapped" by the image
516 flags for each atom. Unwrapped means that if the atom has passed thru
517 a periodic boundary one or more times, the value is printed for what
518 the coordinate would be if it had not been wrapped back into the
519 periodic box. Note that these coordinates may thus be far outside the
520 box size stored with the snapshot.
525 These keywords apply only to the "dump image"_dump_image.html and
526 "dump movie"_dump_image.html styles. Any keyword that affects an
527 image, also affects a movie, since the movie is simply a collection of
528 images. Some of the keywords only affect the "dump
529 movie"_dump_image.html style. The descriptions give details.
533 The {acolor} keyword can be used with the "dump image"_dump_image.html
534 command, when its atom color setting is {type}, to set the color that
535 atoms of each type will be drawn in the image.
537 The specified {type} should be an integer from 1 to Ntypes = the
538 number of atom types. A wildcard asterisk can be used in place of or
539 in conjunction with the {type} argument to specify a range of atom
540 types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the
541 number of atom types, then an asterisk with no numeric values means
542 all types from 1 to N. A leading asterisk means all types from 1 to n
543 (inclusive). A trailing asterisk means all types from n to N
544 (inclusive). A middle asterisk means all types from m to n
547 The specified {color} can be a single color which is any of the 140
548 pre-defined colors (see below) or a color name defined by the
549 dump_modify color option. Or it can be two or more colors separated
550 by a "/" character, e.g. red/green/blue. In the former case, that
551 color is assigned to all the specified atom types. In the latter
552 case, the list of colors are assigned in a round-robin fashion to each
553 of the specified atom types.
557 The {adiam} keyword can be used with the "dump image"_dump_image.html
558 command, when its atom diameter setting is {type}, to set the size
559 that atoms of each type will be drawn in the image. The specified
560 {type} should be an integer from 1 to Ntypes. As with the {acolor}
561 keyword, a wildcard asterisk can be used as part of the {type}
562 argument to specify a range of atomt types. The specified {diam} is
563 the size in whatever distance "units"_units.html the input script is
564 using, e.g. Angstroms.
568 The {amap} keyword can be used with the "dump image"_dump_image.html
569 command, with its {atom} keyword, when its atom setting is an
570 atom-attribute, to setup a color map. The color map is used to assign
571 a specific RGB (red/green/blue) color value to an individual atom when
572 it is drawn, based on the atom's attribute, which is a numeric value,
573 e.g. its x-component of velocity if the atom-attribute "vx" was
576 The basic idea of a color map is that the atom-attribute will be
577 within a range of values, and that range is associated with a series
578 of colors (e.g. red, blue, green). An atom's specific value (vx =
579 -3.2) can then mapped to the series of colors (e.g. halfway between
580 red and blue), and a specific color is determined via an interpolation
583 There are many possible options for the color map, enabled by the
584 {amap} keyword. Here are the details.
586 The {lo} and {hi} settings determine the range of values allowed for
587 the atom attribute. If numeric values are used for {lo} and/or {hi},
588 then values that are lower/higher than that value are set to the
589 value. I.e. the range is static. If {lo} is specified as {min} or
590 {hi} as {max} then the range is dynamic, and the lower and/or
591 upper bound will be calculated each time an image is drawn, based
592 on the set of atoms being visualized.
594 The {style} setting is two letters, such as "ca". The first letter is
595 either "c" for continuous, "d" for discrete, or "s" for sequential.
596 The second letter is either "a" for absolute, or "f" for fractional.
598 A continuous color map is one in which the color changes continuously
599 from value to value within the range. A discrete color map is one in
600 which discrete colors are assigned to sub-ranges of values within the
601 range. A sequential color map is one in which discrete colors are
602 assigned to a sequence of sub-ranges of values covering the entire
605 An absolute color map is one in which the values to which colors are
606 assigned are specified explicitly as values within the range. A
607 fractional color map is one in which the values to which colors are
608 assigned are specified as a fractional portion of the range. For
609 example if the range is from -10.0 to 10.0, and the color red is to be
610 assigned to atoms with a value of 5.0, then for an absolute color map
611 the number 5.0 would be used. But for a fractional map, the number
612 0.75 would be used since 5.0 is 3/4 of the way from -10.0 to 10.0.
614 The {delta} setting must be specified for all styles, but is only used
615 for the sequential style; otherwise the value is ignored. It
616 specifies the bin size to use within the range for assigning
617 consecutive colors to. For example, if the range is from -10.0 to
618 10.0 and a {delta} of 1.0 is used, then 20 colors will be assigned to
619 the range. The first will be from -10.0 <= color1 < -9.0, then 2nd
620 from -9.0 <= color2 < -8.0, etc.
622 The {N} setting is how many entries follow. The format of the entries
623 depends on whether the color map style is continuous, discrete or
624 sequential. In all cases the {color} setting can be any of the 140
625 pre-defined colors (see below) or a color name defined by the
626 dump_modify color option.
628 For continuous color maps, each entry has a {value} and a {color}.
629 The {value} is either a number within the range of values or {min} or
630 {max}. The {value} of the first entry must be {min} and the {value}
631 of the last entry must be {max}. Any entries in between must have
632 increasing values. Note that numeric values can be specified either
633 as absolute numbers or as fractions (0.0 to 1.0) of the range,
634 depending on the "a" or "f" in the style setting for the color map.
636 Here is how the entries are used to determine the color of an
637 individual atom, given the value X of its atom attribute. X will fall
638 between 2 of the entry values. The color of the atom is linearly
639 interpolated (in each of the RGB values) between the 2 colors
640 associated with those entries. For example, if X = -5.0 and the 2
641 surrounding entries are "red" at -10.0 and "blue" at 0.0, then the
642 atom's color will be halfway between "red" and "blue", which happens
645 For discrete color maps, each entry has a {lo} and {hi} value and a
646 {color}. The {lo} and {hi} settings are either numbers within the
647 range of values or {lo} can be {min} or {hi} can be {max}. The {lo}
648 and {hi} settings of the last entry must be {min} and {max}. Other
649 entries can have any {lo} and {hi} values and the sub-ranges of
650 different values can overlap. Note that numeric {lo} and {hi} values
651 can be specified either as absolute numbers or as fractions (0.0 to
652 1.0) of the range, depending on the "a" or "f" in the style setting
655 Here is how the entries are used to determine the color of an
656 individual atom, given the value X of its atom attribute. The entries
657 are scanned from first to last. The first time that {lo} <= X <=
658 {hi}, X is assigned the color associated with that entry. You can
659 think of the last entry as assigning a default color (since it will
660 always be matched by X), and the earlier entries as colors that
661 override the default. Also note that no interpolation of a color RGB
662 is done. All atoms will be drawn with one of the colors in the list
665 For sequential color maps, each entry has only a {color}. Here is how
666 the entries are used to determine the color of an individual atom,
667 given the value X of its atom attribute. The range is partitioned
668 into N bins of width {binsize}. Thus X will fall in a specific bin
669 from 1 to N, say the Mth bin. If it falls on a boundary between 2
670 bins, it is considered to be in the higher of the 2 bins. Each bin is
671 assigned a color from the E entries. If E < N, then the colors are
672 repeated. For example if 2 entries with colors red and green are
673 specified, then the odd numbered bins will be red and the even bins
674 green. The color of the atom is the color of its bin. Note that the
675 sequential color map is really a shorthand way of defining a discrete
676 color map without having to specify where all the bin boundaries are.
678 Here is an example of using a sequential color map to color all the
679 atoms in individual molecules with a different color. See the
680 examples/pour/in.pour.2d.molecule input script for an example of how
683 variable colors string &
684 "red green blue yellow white &
685 purple pink orange lime gray"
686 variable mol atom mol%10
687 dump 1 all image 250 image.*.jpg v_mol type &
689 dump_modify 1 pad 5 amap 0 10 sa 1 10 $\{colors\} :pre
691 In this case, 10 colors are defined, and molecule IDs are
692 mapped to one of the colors, even if there are 1000s of molecules.
696 The {backcolor} sets the background color of the images. The color
697 name can be any of the 140 pre-defined colors (see below) or a color
698 name defined by the dump_modify color option.
702 The {bcolor} keyword can be used with the "dump image"_dump_image.html
703 command, with its {bond} keyword, when its color setting is {type}, to
704 set the color that bonds of each type will be drawn in the image.
706 The specified {type} should be an integer from 1 to Nbondtypes = the
707 number of bond types. A wildcard asterisk can be used in place of or
708 in conjunction with the {type} argument to specify a range of bond
709 types. This takes the form "*" or "*n" or "n*" or "m*n". If N = the
710 number of bond types, then an asterisk with no numeric values means
711 all types from 1 to N. A leading asterisk means all types from 1 to n
712 (inclusive). A trailing asterisk means all types from n to N
713 (inclusive). A middle asterisk means all types from m to n
716 The specified {color} can be a single color which is any of the 140
717 pre-defined colors (see below) or a color name defined by the
718 dump_modify color option. Or it can be two or more colors separated
719 by a "/" character, e.g. red/green/blue. In the former case, that
720 color is assigned to all the specified bond types. In the latter
721 case, the list of colors are assigned in a round-robin fashion to each
722 of the specified bond types.
726 The {bdiam} keyword can be used with the "dump image"_dump_image.html
727 command, with its {bond} keyword, when its diam setting is {type}, to
728 set the diameter that bonds of each type will be drawn in the image.
729 The specified {type} should be an integer from 1 to Nbondtypes. As
730 with the {bcolor} keyword, a wildcard asterisk can be used as part of
731 the {type} argument to specify a range of bond types. The specified
732 {diam} is the size in whatever distance "units"_units.html you are
733 using, e.g. Angstroms.
737 The {bitrate} keyword can be used with the "dump
738 movie"_dump_image.html command to define the size of the resulting
739 movie file and its quality via setting how many kbits per second are
740 to be used for the movie file. Higher bitrates require less
741 compression and will result in higher quality movies. The quality is
742 also determined by the compression format and encoder. The default
743 setting is 2000 kbit/s, which will result in average quality with
744 older compression formats.
746 NOTE: Not all movie file formats supported by dump movie allow the
747 bitrate to be set. If not, the setting is silently ignored.
751 The {boxcolor} keyword sets the color of the simulation box drawn
752 around the atoms in each image as well as the color of processor
753 sub-domain boundaries. See the "dump image box" command for how to
754 specify that a box be drawn via the {box} keyword, and the sub-domain
755 boundaries via the {subbox} keyword. The color name can be any of the
756 140 pre-defined colors (see below) or a color name defined by the
757 dump_modify color option.
761 The {color} keyword allows definition of a new color name, in addition
762 to the 140-predefined colors (see below), and associates 3
763 red/green/blue RGB values with that color name. The color name can
764 then be used with any other dump_modify keyword that takes a color
765 name as a value. The RGB values should each be floating point values
766 between 0.0 and 1.0 inclusive.
768 When a color name is converted to RGB values, the user-defined color
769 names are searched first, then the 140 pre-defined color names. This
770 means you can also use the {color} keyword to overwrite one of the
771 pre-defined color names with new RBG values.
775 The {framerate} keyword can be used with the "dump
776 movie"_dump_image.html command to define the duration of the resulting
777 movie file. Movie files written by the dump {movie} command have a
778 default frame rate of 24 frames per second and the images generated
779 will be converted at that rate. Thus a sequence of 1000 dump images
780 will result in a movie of about 42 seconds. To make a movie run
781 longer you can either generate images more frequently or lower the
782 frame rate. To speed a movie up, you can do the inverse. Using a
783 frame rate higher than 24 is not recommended, as it will result in
784 simply dropping the rendered images. It is more efficient to dump
785 images less frequently.
794 "dump"_dump.html, "dump image"_dump_image.html, "undump"_undump.html
798 The option defaults are
801 buffer = yes for dump styles {atom}, {custom}, {loca}, and {xyz}
802 element = "C" for every atom type
803 every = whatever it was set to via the "dump"_dump.html command
804 fileper = # of processors
807 format = %d and %g for each integer or floating point value
816 sort = off for dump styles {atom}, {custom}, {cfg}, and {local}
817 sort = id for dump styles {dcd}, {xtc}, and {xyz}
821 acolor = * red/green/blue/yellow/aqua/cyan
823 amap = min max cf 0.0 2 min blue max red
825 bcolor = * red/green/blue/yellow/aqua/cyan
829 color = 140 color names are pre-defined as listed below
834 These are the standard 109 element names that LAMMPS pre-defines for
835 use with the "dump image"_dump_image.html and dump_modify commands.
837 1-10 = "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne"
838 11-20 = "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca"
839 21-30 = "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn"
840 31-40 = "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr"
841 41-50 = "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn"
842 51-60 = "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd"
843 61-70 = "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb"
844 71-80 = "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg"
845 81-90 = "Tl", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th"
846 91-100 = "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm"
847 101-109 = "Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt" :ul
851 These are the 140 colors that LAMMPS pre-defines for use with the
852 "dump image"_dump_image.html and dump_modify commands. Additional
853 colors can be defined with the dump_modify color command. The 3
854 numbers listed for each name are the RGB (red/green/blue) values.
855 Divide each value by 255 to get the equivalent 0.0 to 1.0 value.
857 aliceblue = 240, 248, 255 |
858 antiquewhite = 250, 235, 215 |
860 aquamarine = 127, 255, 212 |
861 azure = 240, 255, 255 |
862 beige = 245, 245, 220 |
863 bisque = 255, 228, 196 |
865 blanchedalmond = 255, 255, 205 |
867 blueviolet = 138, 43, 226 |
868 brown = 165, 42, 42 |
869 burlywood = 222, 184, 135 |
870 cadetblue = 95, 158, 160 |
871 chartreuse = 127, 255, 0 |
872 chocolate = 210, 105, 30 |
873 coral = 255, 127, 80 |
874 cornflowerblue = 100, 149, 237 |
875 cornsilk = 255, 248, 220 |
876 crimson = 220, 20, 60 |
878 darkblue = 0, 0, 139 |
879 darkcyan = 0, 139, 139 |
880 darkgoldenrod = 184, 134, 11 |
881 darkgray = 169, 169, 169 |
882 darkgreen = 0, 100, 0 |
883 darkkhaki = 189, 183, 107 |
884 darkmagenta = 139, 0, 139 |
885 darkolivegreen = 85, 107, 47 |
886 darkorange = 255, 140, 0 |
887 darkorchid = 153, 50, 204 |
888 darkred = 139, 0, 0 |
889 darksalmon = 233, 150, 122 |
890 darkseagreen = 143, 188, 143 |
891 darkslateblue = 72, 61, 139 |
892 darkslategray = 47, 79, 79 |
893 darkturquoise = 0, 206, 209 |
894 darkviolet = 148, 0, 211 |
895 deeppink = 255, 20, 147 |
896 deepskyblue = 0, 191, 255 |
897 dimgray = 105, 105, 105 |
898 dodgerblue = 30, 144, 255 |
899 firebrick = 178, 34, 34 |
900 floralwhite = 255, 250, 240 |
901 forestgreen = 34, 139, 34 |
902 fuchsia = 255, 0, 255 |
903 gainsboro = 220, 220, 220 |
904 ghostwhite = 248, 248, 255 |
906 goldenrod = 218, 165, 32 |
907 gray = 128, 128, 128 |
909 greenyellow = 173, 255, 47 |
910 honeydew = 240, 255, 240 |
911 hotpink = 255, 105, 180 |
912 indianred = 205, 92, 92 |
913 indigo = 75, 0, 130 |
914 ivory = 255, 240, 240 |
915 khaki = 240, 230, 140 |
916 lavender = 230, 230, 250 |
917 lavenderblush = 255, 240, 245 |
918 lawngreen = 124, 252, 0 |
919 lemonchiffon = 255, 250, 205 |
920 lightblue = 173, 216, 230 |
921 lightcoral = 240, 128, 128 |
922 lightcyan = 224, 255, 255 |
923 lightgoldenrodyellow = 250, 250, 210 |
924 lightgreen = 144, 238, 144 |
925 lightgrey = 211, 211, 211 |
926 lightpink = 255, 182, 193 |
927 lightsalmon = 255, 160, 122 |
928 lightseagreen = 32, 178, 170 |
929 lightskyblue = 135, 206, 250 |
930 lightslategray = 119, 136, 153 |
931 lightsteelblue = 176, 196, 222 |
932 lightyellow = 255, 255, 224 |
934 limegreen = 50, 205, 50 |
935 linen = 250, 240, 230 |
936 magenta = 255, 0, 255 |
938 mediumaquamarine = 102, 205, 170 |
939 mediumblue = 0, 0, 205 |
940 mediumorchid = 186, 85, 211 |
941 mediumpurple = 147, 112, 219 |
942 mediumseagreen = 60, 179, 113 |
943 mediumslateblue = 123, 104, 238 |
944 mediumspringgreen = 0, 250, 154 |
945 mediumturquoise = 72, 209, 204 |
946 mediumvioletred = 199, 21, 133 |
947 midnightblue = 25, 25, 112 |
948 mintcream = 245, 255, 250 |
949 mistyrose = 255, 228, 225 |
950 moccasin = 255, 228, 181 |
951 navajowhite = 255, 222, 173 |
953 oldlace = 253, 245, 230 |
954 olive = 128, 128, 0 |
955 olivedrab = 107, 142, 35 |
956 orange = 255, 165, 0 |
957 orangered = 255, 69, 0 |
958 orchid = 218, 112, 214 |
959 palegoldenrod = 238, 232, 170 |
960 palegreen = 152, 251, 152 |
961 paleturquoise = 175, 238, 238 |
962 palevioletred = 219, 112, 147 |
963 papayawhip = 255, 239, 213 |
964 peachpuff = 255, 239, 213 |
965 peru = 205, 133, 63 |
966 pink = 255, 192, 203 |
967 plum = 221, 160, 221 |
968 powderblue = 176, 224, 230 |
969 purple = 128, 0, 128 |
971 rosybrown = 188, 143, 143 |
972 royalblue = 65, 105, 225 |
973 saddlebrown = 139, 69, 19 |
974 salmon = 250, 128, 114 |
975 sandybrown = 244, 164, 96 |
976 seagreen = 46, 139, 87 |
977 seashell = 255, 245, 238 |
978 sienna = 160, 82, 45 |
979 silver = 192, 192, 192 |
980 skyblue = 135, 206, 235 |
981 slateblue = 106, 90, 205 |
982 slategray = 112, 128, 144 |
983 snow = 255, 250, 250 |
984 springgreen = 0, 255, 127 |
985 steelblue = 70, 130, 180 |
986 tan = 210, 180, 140 |
988 thistle = 216, 191, 216 |
989 tomato = 253, 99, 71 |
990 turquoise = 64, 224, 208 |
991 violet = 238, 130, 238 |
992 wheat = 245, 222, 179 |
993 white = 255, 255, 255 |
994 whitesmoke = 245, 245, 245 |
995 yellow = 255, 255, 0 |
996 yellowgreen = 154, 205, 50 :tb(c=5,s=|)