Back to main menu

Format: LMC

Name: LAMMPS custom dump file

Extension: unspecified (Atomsk uses .lmc)

Specification: LAMMPS online manual

Visualization programs: OVITO


LAMMPS can write various informations in a custom format with a "dump ID group-ID custom N file args" command, as indicated on this page of the LAMMPS manual. These files do not have a specific extension, but Atomsk calls them 'lmc' files.

In such files, a line starting with "ITEM: ATOMS" indicates the format of data for the following lines. There must be at least three entries: the three coordinates x, y and z, which may be unscaled (x,y,z), scaled (xs,ys,zs), unwrapped (xu,yu,zu) or scaled unwrapped (xsu,ysu,zsu) as defined by the LAMMPS dump command. For instance, using "dump myfile all custom 100 MD*.lmc type xu yu zu" in the LAMMPS input script will produce one LMC file every 100 steps named MD0.lmc, MD100.lmc, MD200.lmc, etc. and containing atom types and unwrapped coordinates.

If the line "ITEM: ATOMS" contains the keyword element, then the element names are read and stored. If the elements are not specified, Atomsk will use the atom "types" (1, 2, 3...) and interpret them as atomic numbers (respectively H, He, Li and so on). These atom types can be replaced with the option -substitute. In addition, atom types are saved as auxiliary properties (with the name "type") to ensure they are conserved when converting to formats that support it. This behavior can be cancelled by removing this auxiliary property with the option -rmprop type. Finally, if neither the element or the type appear in the file, then Atomsk will simply consider that all atoms are hydrogen atoms.

If the line "ITEM: ATOMS" contains the keyword id, then the atoms coordinates will be sorted according to their ID. Otherwise the atoms will not be sorted (they will appear in the output file in the same order as in the input file).

If additional properties (e.g. potential energy, stress/atom...) are defined in the line "ITEM: ATOMS", then Atomsk will store all of them as auxiliary properties. These properties must then exist for each atom in the file.

If coordinates (or auxiliary properties) are specified several times, then only the coordinates that appear first will be used by Atomsk. For instance if unwrapped and "normal" coordinates are present with the format "xu x yu y z zu", then Atomsk will use xu, yu and z. When reduced (or "scaled") coordinates are output then all 3 space coordinates should be reduced (e.g. xs, ys and zs) for Atomsk to correctly read them. Also, if one or two coordinates are missing then they are assumed to be naught (for instance if the coordinates are only "xu yu", then the Z coordinates of all atoms will be zero); if all three coordinates are missing then Atomsk will produce an error message.

Note that the order in which atom coordinates and auxiliary properties are written does not matter, as long as this order is specified correctly in the line "ITEM: ATOMS" (which should be the case, unless LAMMPS has a bug or the LMC file was produced by hand with a wrong format).

If the dump file contains several snapshots (for example, steps of a minimization or molecular dynamics simulations), then only the first snapshot will be read and converted. To convert all the snapshots, one can use the mode one-in-all.

Atomsk cannot write LMC files.


Back to main menu