# Particle properties

## Introduction

Particle properties are data values associated with every particle and play a central role in OVITO. For example, the particle position, type, or velocity vector are all properties managed by OVITO. Properties can be read from the imported simulation file, or their value can be computed within OVITO by a modifier. The modifiers in the modification pipeline can access to existing properties, change them, or assign new properties to particles. For instance, the Coordination Analysis modifier computes the number of neighbors of each particle and stores it in a new particle property named `Coordination number`. Subsequent modifiers in the pipeline, for instance a Color Coding modifier, can then access this property; or you can export the computed values to an output file.

Internally, each particle property is stored as a data array containing one record per particle. Properties can be scalar numbers or more complex quantities such as vectors or tensors. The `Position` particle property, for instance, stores a vector with three components for each particle. The individual vector components are referred to as `Position.X`, `Position.Y`, and `Position.Z` in OVITO's user interface.

## Standard properties

Furthermore, one can distinguish two types of particle properties: Standard properties and user-defined properties. Standard properties have a predefined name, data type, and a specific meaning within OVITO. The standard property `Position`, for instance, is used by the program to store the coordinates of particles, and the `Color` property stores the display color of particles. User-defined properties, in contrast, simply contain arbitrary per-particle quantities (as read from a simulation file or . This data is not interpreted by OVITO in a particular way. However, it can be used within the program, for instance, to select particles, color particles, or perform other computations.

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

Standard property | Data type / Components | Description
--- | --- | ---
`Position` | X, Y, Z | The particle coordinates.
`Color` | R, G, B | If present, this property controls the display color of particles.
`Radius` | Real | If present, this property controls the display size of particles.
`Particle Type` | Integer | Stores the type identifier of each particle. This determines the particle display size and color unless the Radius or Color property are present.
`Particle Identifier` | Integer | Stores the unique ID of each particle. This is used by some modifiers to track particles over time if the storage order of particles changes between simulation frames.
`Transparency` | Real | A value between 0 and 1 controlling the particle transparency.
`Selection` | Integer | Stores the selection state of particles (1 for selected particles; 0 otherwise).

The Compute Property modifier gives you full control over the values of these properties.

## 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. 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 you specify the mapping of file columns to particle properties. A similar step is necessary when exporting particle data to a file: You will be asked to specify which particle properties to export and in which order.