Particle properties

Introduction

Particle properties, which are data values associated with every particle, play a central role in OVITO. For example, a particle's position, its type, or its velocity vector are all properties managed by OVITO. Such properties can be read from the imported simulation file, or they can be computed within OVITO. Modifiers, which are applied to the simulation data by the user, have read or write access to existing particle properties and can compute and assign new properties to particles. For instance, the Coordination Analysis modifier computes the number of neighbors of each particle and stores this number in the Coordination number particle property.

Internally, a particle property is stored as a data array with one entry per particle. A single entry can hold a number or a more complex data type such as a vector or a tensor. The Position property, for instance, stores vectors with three components. The individual components are referred to as Position.X, Position.Y, and Position.Z in OVITO's user interface.

Standard properties

One can further distinguish two types of particle properties: Standard properties and user-defined properties. Standard properties have a predefined name, data type, and a specific meaning. The standard property Position, for instance, is used by OVITO to store the coordinates of particles while the Color property stores the colors used to render particles. User-defined properties, in contrast, simply store arbitrary per-particle data generated externally (e.g. by the simulation code) or within OVITO. This data is not interpreted by OVITO in a specific way, but it can be used within the program to select particles, to color particles, or to perform other computations.

As explained above, some properties have a special meaning and control how OVITO displays particles. The following table lists some important standard properties and their function:

Standard propertyData type / ComponentsDescription
PositionX, Y, Z

Controls the locations of particles in space.

ColorR, G, B

Controls the display color of individual particles.

RadiusReal

Controls the size of individual particles.

Particle TypeInteger

Stores the type identifier of each particle. This will also determine the display size and color of particles unless the Radius or Color properties are present.

Particle IdentifierInteger

Stores the unique ID of each particle. This is used by some modifiers to track particles over time when the storage order of particles changes between simulation frames.

SelectionInteger

Stores the selection state of particles (1 for selected particles; 0 otherwise).

Input and output

Most file formats used by simulation codes support an arbitrary number of per-particle properties, which are stored in individual file columns in a user-defined order. When loading such a file into OVITO, the columns of the file must be mapped to OVITO's internal particle properties. It most cases this happens automatically based on the metadata found in the file's header.

Files in the XYZ format are an exception since they contain no metadata that could help OVITO to interpret the file's columns. When opening such a file, the program displays a dialog box to let the user specify the mapping of columns to internal particle properties. A similar step is necessary when exporting particle data to a file: The user has to specify which particle properties to export and in which order.