LIGGGHTS(R)-PUBLIC WWW Site - LIGGGHTS(R)-PUBLIC Documentation - LIGGGHTS(R)-PUBLIC Commands

compute property/atom command

Syntax:

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

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, with some additional quantities that are only defined for certain atom styles. Basically, this list gives your input script access to any per-atom quantity stored by LIGGGHTS(R)-PUBLIC.

The values are stored in a per-atom vector or array as discussed below. Zeroes are stored for atoms not in the specified group or for quantities that are not defined for a particular particle in the group (e.g. shapex if the particle is not an ellipsoid).

The additional quantities only accessible via this command, and not directly via the dump custom command, are as follows.

Shapex, shapey, and shapez are defined for ellipsoidal particles and define the 3d shape of each particle.

Quatw, quati, quatj, and quatk are defined for ellipsoidal particles and body particles and store the 4-vector quaternion representing the orientation of each particle. See the set command for an explanation of the quaternion vector.

End1x, end1y, end1z, end2x, end2y, end2z, are defined for line segment particles and define the end points of each line segment.

Corner1x, corner1y, corner1z, corner2x, corner2y, corner2z, corner3x, corner3y, corner3z, are defined for triangular particles and define the corner points of each triangle.

The i_name and d_name attributes refer to custom integer and floating-point properties that have been added to each atom via the fix property/atom command. When that command is used specific names are given to each attribute which are what is specified as the "name" portion of i_name or d_name.

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 LIGGGHTS(R)-PUBLIC 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, fix property/atom

Default: none