Polyhedral template matching

This modifier classifies the local structural environment of particles using the Polyhedral Template Matching (PTM) method, which allows identification of the local crystalline structure of simple condensed phases. This structure identification method has been described in

Please cite this paper when you use this structure identification algorithm in your work. A preprint is available here.

The PTM approach promises greater reliability than e.g. Common Neighbor Analysis (CNA) in the presence of strong thermal fluctuations and strains. Furthermore, it provides a direct calculation of the local (per-atom) crystal orientation, elastic deformation, strain and chemical ordering type.

The modifier identifies local crystalline order by matching the local atomic neighborhood to the templates of the structural types determined by the PTM algorithm. The templates use a mixture of nearest neighbors, and neighbors of neighbors:

Central atom (white), nearest neighbors (blue), and neighbors of neighbors (green).
FCCHCPBCCIcosahedralSimple CubicCubic diamondHexagonal diamond

Determination of diamond structures is an extension of the published PTM method, though it follows similar principles.

The modifier sets the Structure Type property for each particle, which is encoded as an integer value:

By default, the modifier will try to identify only the following structure types: FCC, HCP, BCC. Using the tick boxes in the list, you can specify the set of structural types the modifier should look for.

Root-Mean-Square Deviation (RMSD)

For each input particle, the PTM tries to determine a mapping of the local neighborhood to each active candidate structure. If such a mapping exists, a RMSD value is calculated, which is a measure of the spatial deviation from the ideal structure template (the quality of the match). The structural type with the lowest RMSD value is finally assigned to the particle. A histogram of the RMSD values for all structures and all particles is shown in the side panel.

The modifier allows to set a global RMSD cutoff, which limits the assignment of structural types to a range of RMSD values. Particles whose RMSD exceeds the threshold are assigned the Other structure type. By adjusting the RMSD cutoff, the level of robustness can be adjusted. A higher RMSD cutoff will lead to more identifications (and fewer 'defect' atoms), though possibly at the expense of false positives. A lower RMSD cutoff will result in fewer structural identifications (and more 'defect' atoms and greater sensitivity to perturbations of the lattice), though possibly at the expense of false negatives. The role of the RMSD cutoff is discussed in section 5.1 of the PTM paper.

A reasonable value for the RMSD cutoff parameter is 0.1, which works well for identifying defects in crystalline solids. Note that, for the sake of reproducibility, the chosen RMSD cutoff value should typically be reported in a publication if you use the PTM method to gain quantitative results (e.g. measure crystal defect densities).

Interatomic distances

The internal scale factor computed by the PTM method (see the paper) is the amount by which the atom coordinates are scaled in order to minimize the RMSD between the atom and template coordinates, after translation and rotation. It is proportional to the reciprocal local interatomic distance (including hydrostatic strain components).

The PTM modifier provides an option to output the local interatomic distance (or nearest neighbor distance) as a new particle property, which is computed from the internal scale factor for those atoms that match one of the known structure types. Note that you can compute a local lattice constant (including hydrostatic strain) from the interatomic distance by dividing it by the factor sqrt(1/2) (for FCC, HCP), sqrt(3/4) (for BCC), or sqrt(3/16) (for cubic diamond and hexagonal diamond) using, e.g., the Compute property modifier

Local lattice orientations

The PTM modifier can calculate the local lattice orientation for atoms that match one of the structural types. The computed orientation is stored as a quaternion in the Orientation particle property. You can switch the particle display shape to Cube/Box to visualize the computed per-particle orientations or apply this custom Python modifier to color particles according to their local lattice orientation. Lattice orientations are calculated such that they lie in the fundamental zone of the symmetry group for each structural type. This means that two atoms with very similar orientations can have large misorientations if they lie close to the boundaries of the fundamental zone. For atoms that do not match any of the known structure types, no local lattice orientation can be computed. They are assigned the invalid quaternion (0,0,0,0).

The orientations are calculated relative to the following reference templates. In the table, the neighbor positions of each reference configuration are given in Cartesian coordinates with the central particle located at the origin.

Neighbor FCC HCP BCC ICO Simple cubicCubic diamondHexagonal diamond
7k10-k1-k1k10-k2-k2k2k3-k40   02k62k62k6/32k6/38k6/3
8-k10k10k1-k1k2k2-k2-k3k40   -2k6-2k60-2k6-0-2k6
9k1k10k10-k100-2k2-k40-k3   -2k60-2k6-2k62k6-0
10-k1-k10k1-k10002k2k40k3   0-2k6-2k6-02k6-2k6
11k1-k10-k10k10-2k20k40-k3   0-2k62k6-0-2k6-2k6
12-k1k100-k1k102k20-k40k3   2k6-2k602k6-2k6-0
13      -2k200      2k602k62k6-0-2k6
14      2k200      02k6-2k6-2k6-2k6-0
15               2k60-2k6-0-2k62k6
16               2k62k60-2k6-02k6
k1 = sqrt(2) / 2, k2 = 14 / (8 sqrt(3) + 12), k3 = sqrt(2/(5 + sqrt(5))), k4 = sqrt(1/10 (5 + sqrt(5))), k5 = 1, k6 = 4/(6 sqrt(2) + sqrt(3))

The reference templates are scaled such that the mean distance of the neighbors is 1. This is a slight departure from the templates in the published PTM paper, in that the central atom is no longer included in this calculation.

Elastic deformation gradients

The local elastic deformation gradient is calculated as the affine transformation of the ideal template which minimizes the sum of squared distances from the actual atomic coordinates.

Ordering types

The chemical types of atoms are generally ignored by the PTM when identifying the structural phases (e.g. FCC, BCC, etc.). However, the algorithm can additionally identify the local chemical ordering type by taking into account the species of atoms (given by the values of the Particle Type property, which must be defined). The binary ordering types identified by the current version of the PTM algorithm are A2 and B2 for BCC; A1, L10 and L12 for FCC; zinblende for cubic diamond; and wurtzite for hexagonal diamond structures.

The local ordering type is output as an additional particle property named Ordering Type with the following values:

  • 0 = Other, unknown or no ordering

  • 1 = Pure (all neighbors like central atom)

  • 2 = L10

  • 3 = L12 (A-site)

  • 4 = L12 (B-site)

  • 5 = B2

  • 6 = zincblende / wurtzite

The algorithm determines the ordering type at a lattice atom by comparing the types of its neighbors to the type of the central atom. See the paper for details. You can subsequently use the Expression selection modifier to select atoms of a certain structural type and a certain ordering type to give them a distinct color, for example.


In addition to the PTM, OVITO provides alternative structure identification tools like the Common Neighbor Analysis modifier, the Identify Diamond Structure modifier, or the Ackland-Jones Analysis modifier.

Note that this modifier requires access to the complete set of input particles to perform the analysis. It should therefore be placed at the beginning of the processing pipeline, preceding any modifiers that delete particles.

The Use only selected particles option restricts the analysis to the currently selected particles. If this option is checked, unselected particles will be ignored (as if they did not exist) and will be assigned the structure type "Other". This option can be useful if you want to identify defects in a crystal structure that is not directly supported by the PTM algorithm, but which possesses a known sublattice.

See also

PolyhedralTemplateMatchingModifier (Python API)