LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

### compute property/atom command

Syntax:

    compute ID group-ID property/atom input1 input2 ...

- ID, group-ID are documented in compute command
- property/atom = style name of this compute command
- input = one or more atom attributes

        possible attributes = id, mol, type, mass,
       	                x, y, z, xs, ys, zs, xu, yu, zu, ix, iy, iz,
      		        vx, vy, vz, fx, fy, fz,
                              q, mux, muy, muz,
                              radius, omegax, omegay, omegaz,
                              angmomx, angmomy, angmomz,
      		        quatw, quati, quatj, quatk, tqx, tqy, tqz

            id = atom ID
            mol = molecule ID
            type = atom type
            mass = atom mass
            x,y,z = unscaled atom coordinates
            xs,ys,zs = scaled atom coordinates
            xu,yu,zu = unwrapped atom coordinates
            ix,iy,iz = box image that the atom is in
            vx,vy,vz = atom velocities
            fx,fy,fz = forces on atoms
            q = atom charge
            mux,muy,muz = orientation of dipolar atom
            radius = radius of extended spherical particle
            omegax,omegay,omegaz = angular velocity of extended particle
            angmomx,angmomy,angmomz = angular momentum of extended particle
            quatw,quati,quatj,quatk = quaternion components for aspherical particles
            tqx,tqy,tqz = torque on extended particles

Examples:

    compute 1 all property/atom xs vx fx mux
    compute 2 all property/atom type
    compute 1 all property/atom ix iy iz

Description:

Define a computation that simply stores atom attributes for each atom in the group. This is useful so that the values can be used by other output commands that take computes as inputs. See for example, the compute reduce, fix ave/atom, fix ave/histo, fix ave/spatial, and atom-style variable commands.

The list of possible attributes is the same as that used by the dump custom command, which describes their meaning. Basically, this list gives your input script access to any per-atom quantity stored by LAMMPS.

The values are stored in a per-atom vector or array as discussed below. Zeroes are stored for atoms not in the specified group.

Output info:

This compute calculates a per-atom vector or per-atom array depending on the number of input values. If a single input is specified, a per-atom vector is produced. If two or more inputs are specified, a per-atom array is produced where the number of columns = the number of inputs. The vector or array can be accessed by any command that uses per-atom values from a compute as input. See this section for an overview of LAMMPS output options.

The vector or array values will be in whatever units the corresponding attribute is in, e.g. velocity units for vx, charge units for q, etc.

Restrictions: none

Related commands:

dump custom, compute reduce, fix ave/atom, fix ave/spatial

Default: none