LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

atom_style command

Syntax:

atom_style style args 
  args = none for any style except hybrid
  hybrid args = list of one or more sub-styles 

Examples:

atom_style atomic
atom_style bond
atom_style full
atom_style hybrid charge bond 

Description:

Define what style of atoms to use in a simulation. This determines what attributes are associated with the atoms. This command must be used before a simulation is setup via a read_data, read_restart, or create_box command.

Once a style is assigned, it cannot be changed, so use a style general enough to encompass all attributes. E.g. with style bond, angular terms cannot be used or added later to the model. It is OK to use a style more general than needed, though it may be slightly inefficient.

The choice of style affects what quantities are stored by each atom, what quantities are communicated between processors to enable forces to be computed, and what quantities are listed in the data file read by the read_data command.

These are the attributes of each style. All styles store coordinates, velocities, atom IDs and types.

Typically, simulations require only a single (non-hybrid) atom style. If some atoms in the simulation do not have all the properties defined by a particular style, use the simplest style that defines all the needed properties by any atom. For example, if some atoms in a simulation are charged, but others are not, use the charge style. If some atoms have bonds, but others do not, use the bond style. The only scenario where the hybrid style is needed is if there is no single style which defines all needed properties of all atoms. E.g. if you want charged DPD particles, you would need to use "atom_style hybrid dpd charge". When a hybrid style is used, atoms store and communicate the union of all quantities implied by the individual styles.

LAMMPS can be extended with new atom styles; see this section.

Restrictions:

This command cannot be used after the simulation box is defined by a read_data or create_box command.

The angle, bond, full, and molecular styles are part of the "molecular" package. The granular style is part of the "granular" package. The dpd style is part of the "dpd" package. The dipole style is part of the "dipole" package. The ellipsoid style is part of the "ellipsoid" package. They are only enabled if LAMMPS was built with that package. See the Making LAMMPS section for more info.

Related commands:

read_data, pair_style

Default:

atom_style atomic