LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

dump command

Syntax:

dump ID group-ID style N file args 

Examples:

dump myDump all atom 100 dump.atom
dump 2 subgroup atom 50 dump.run
dump 3 all velocity 1000 dump.vels
dump 4ab all custom 100 dump.myforce tag type x y vx fx
dump 4ab all custom 100 dump.myforce tag type eng sxx syy szz 

Description:

Dump a snapshot of atom quantities to a file every so many timesteps. When a dump is defined, the file is opened. The file is closed when an undump command is used or when LAMMPS exits. Only information for atoms in the specified group is dumped. Because snapshot data is collected from multiple processors, the order of lines (typically one per atom) written into the dump file for a single snapshot is indeterminate.

Dumps are performed on timesteps that are a multiple of N, including timestep 0. If one run ends and another begins on a timestep that is a multiple of N, only one snapshot is written.

The style determines what quantities are written to the file. Settings made via the dump_modify command can alter the output format.

For style atom, atom coordinates are written to the file. For header settings item and self of the dump_modify command, the atom ID and type are also written. For header setting xyz, only the atom type is included. By default, coordinates are in normalized units from 0.0 to 1.0. The scale setting of the dump_modify command enables unnormalized coordinates to be written out. Because periodic boundary conditions are enforced only on timesteps when neighbor lists are rebuilt, the coordinates of some atoms may be slightly outside the simulation box.

For style velocity, atom velocities are written to the file along with the atom ID and type.

For style bond, the bond topology between atoms is written, in the same format they are specified in the data file read by the read_data command. Both atoms in the bond must be in the dump group for the bond to be written. Any bonds that have been broken (see the bond_style command) are not written. Bonds that have been turned off (see the fix shake or delete_bonds commands) are written into the file.

Style custom allows you to specify a list of atom attributes to be written to the dump file for each atom. Possible attributes are described above and will appear in the order specified. Be careful not to specify a quantity that is not defined for a particular simulation - e.g. q for atom style bond, since that atom style doesn't assign charges. Dumps occur at the very end of a timestep, so atom attributes will include any effects due to fixes that are applied during the timestep.

The mux, muy, muz, tqy, tqx, tqy attributes are specific to dipolar systems defined with an atom style of dipole.

The centro attribute causes the centro-symmetry parameter to be computed for each atom in the dump group using the following formula from (Kelchner)

where the 12 nearest neighbors are found and Ri and Ri+6 are the vectors from the central atom to the opposite pair of nearest neighbors. In solid state systems this is a useful measure of the local lattice disorder around an atom and can be used to characterize whether the atom is part of a perfect lattice, a local defect (e.g. a dislocation or stacking fault), or at a surface. The neighbor list needed to compute this quantity is constructed each time the dump is performed. Thus it can be inefficient to dump this quantity too frequently or to have multiple dump commands, each with a centro attribute.

The eng attribute computes the pairwise energy for each atom. This is its pairwise interaction with all of its neighbors (divided by 2). Summed over all atoms, this should equal the pairwise energy of the entire system (Van der Waals + Coulombic). However, for force fields that include a contribution to the pairwise energy that is computed as part of dihedral terms (i.e. 1-4 interactions), this contribution is not included in the per-atom pairwise energy. Computation of the per-atom energy requires a loop thru the neighbor list and inter-processor communication, so it can be inefficient to dump this quantity too frequently or to have multiple dump commands, each with a eng attribute.

The sxx, syy, szz, sxy, sxz, syz attributes compute the stress tensor for each atom where the ab component of the stress on atom i is given by

where the first term is a kinetic energy component for atom i, j loops over the N neighbors of atom i, and Fb is one of 3 components of force on atom i due to atom j. Both a and b can take on values x,y,z to generate the 6 components of the symmetric tensor. Note that this quantity is the negative of the per-atom pressure tensor. It is also really a stress-volume formulation. It would need to be divided by a per-atom volume to have units of stress, but an individual atom's volume is not easy to compute in a deformed solid. Computation of stress tensor components requires a loop thru the neighbor list and inter-processor communication, so it can be inefficient to dump this quantity too frequently or to have multiple dump commands, each with stress tensor attributes.

See this section for information on how to modify LAMMPS to dump other kinds of per-atom quantities.

Restrictions:

The bond style is part of the "molecular" package. It is only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.

Granular systems and pair potentials cannot be used to compute per-atom energy and stress. The fix gran/diag command should be used instead.

Related commands:

dump_modify, undump

Default: none


(Kelchner) Kelchner, Plimpton, Hamilton, Phys Rev B, 58, 11085 (1998).