Introduction

The crystal structure of a material determines much of its functional behavior, including its electronic, ionic, and mechanical properties. The number of possible crystal structures is infinite, and a large number of crystal structures have already been characterized1. This number will undoubtedly continue to grow as researchers expand into the vast, high-dimensional composition spaces of multi-principle element alloys and functional compounds.

Although great effort has been expended to cataloging2,3,4 and categorizing unique crystal structures and their chemical manifestations, challenges remain to realizing a universal classification scheme. Such a scheme is becoming increasingly desirable with the growth of first-principles databases, such as the Materials Project5, AFLOW6, OQMD7, NOMAD8, and the Materials Cloud9. Essential to a successful classification scheme is a robust method with which to measure the structural similarity of two crystals. Unfortunately, the comparison of two crystal structures is made challenging due to their periodic nature, which allows for an infinite number of mathematical representations. Symmetry can be used to help classify crystal structures. However, while there are only 230 crystallographic space groups, two crystal structures belonging to the same space group can nevertheless be very different from the point of view of local connectivity, unit cell size and number of distinct sites within the unit cell.

Pathways that connect different crystal structures are also of great importance. Many crystalline materials undergo structural transformations as a function of temperature and pressure10,11,12,13,14,15,16,17,18. Only a limited number of continuous pathways connecting common crystal structures have been identified19,20,21,22,23,24,25,26,27. Knowledge of these pathways, however, is often invaluable to understand and manipulate phase transformations in shape-memory alloys and actuator applications. The identification of pathways requires an enumeration of possible mappings of one crystal onto another24 and a robust definition of a distance metric between crystal structures to enable a ranking of such mappings.

Several methods and accompanying software packages have been developed to compare and classify crystal structures. These approaches tend to rely on structure standardization, space group and Wyckoff position identification and comparisons of crystal invariants28,29,30,31. Other methods rely on comparisons of pair distribution functions32. Some of the well known or recently released software packages include STRUCTURE-TIDY28, CRYCOM30, CMPZ33, XTAL-COMP34, COMPSTRU31, SPAP35, the pymatgen Structure Matcher36, and AFLOW-XtalFinder37. While they all have their merits, none determine the similarity between crystal structures using combinatorial mapping approaches with a rigorous quantification of strain and displacement costs that account for symmetry. Furthermore, there are no software tools generally available with which to systematically enumerate and rank mappings between pairs of crystal structures.

In this paper, we describe an algorithm implemented in the CASM software package15,38,39 to enumerate mappings between pairs of crystal structures. As part of the mapping approach, we introduce a geometric and symmetry-breaking distance metric that measures the similarity between two crystal structures. The tools allow users to answer three questions. Given two input crystal structures:

  • Are they identical up to a symmetry-preserving scaling factor?

  • If the two crystal structures are not identical, how similar are they?

  • What are ranked pathways between the two crystal structures and what is the orientation relationship between these crystal structures for a particular path?

Answering these questions requires (i) a robust way to map one crystal onto another and (ii) metrics of similarity between any pair of crystal structures. In the next sections we describe the mathematical underpinning of the crystal mapping tool implemented in the CASM software package.

Results

The objective of this study is to obtain a relationship between the spatial coordinates of atoms in two crystals, \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\). The approach relies on finding a distortion of crystal \({{{{\mathcal{C}}}}}_{2}\) such that, after deformation, the atoms of \({{{{\mathcal{C}}}}}_{2}\) coincide exactly with sites of \({{{{\mathcal{C}}}}}_{1}\). In this context, we refer to \({{{{\mathcal{C}}}}}_{1}\) as the parent crystal and \({{{{\mathcal{C}}}}}_{2}\) as the child crystal. There are many possible ways to deform \({{{{\mathcal{C}}}}}_{2}\) such that it maps onto \({{{{\mathcal{C}}}}}_{1}\). We denote by \({{{\mathcal{M}}}}\) the set of all possible ways to relate \({{{{\mathcal{C}}}}}_{2}\) to \({{{{\mathcal{C}}}}}_{1}\) and refer to a particular element \({{{{\mathcal{M}}}}}_{m}\) as a mapping of \({{{{\mathcal{C}}}}}_{2}\) onto \({{{{\mathcal{C}}}}}_{1}\). Different mappings \({{{{\mathcal{M}}}}}_{m}\) will require different degrees of deformation.

Crystal structures are represented by lattice vectors and a list of coordinates that correspond to the sites in the unit cell. We may compactly specify the lattice vectors as columns of a 3 × 3 matrix \({{{\bf{L}}}}=[\overrightarrow{{l}_{1}},\overrightarrow{{l}_{2}},\overrightarrow{{l}_{3}}]\). The fractional (\(\overrightarrow{f}\)) and cartesian (\(\overrightarrow{r}\)) coordinates of an arbitrary point in space are related to each other as \(\overrightarrow{r}={{{\bf{L}}}}\overrightarrow{f}\).

A particular mapping of \({{{{\mathcal{C}}}}}_{2}\) onto \({{{{\mathcal{C}}}}}_{1}\) comprises two separate operations. First, in the lattice-mapping step, \({{{{\mathcal{C}}}}}_{2}\) is rigidly rotated and homogeneously deformed until a shared lattice is obtained that can be used to define both structures simultaneously. Second, in the atomic mapping step, each atom of \({{{{\mathcal{C}}}}}_{2}\) is assigned a companion in \({{{{\mathcal{C}}}}}_{1}\) and displaced so that it is coincident with its companion. In the next section we describe how the strain and displacement fields that relate these crystal structures may be obtained.

Lattice mapping

We will first consider the mapping of the lattice of \({{{{\mathcal{C}}}}}_{2}\), denoted L2, onto the lattice of \({{{{\mathcal{C}}}}}_{1}\), denoted L1. Our lattice-mapping approach is similar to that of Trinkle et al.24. In the simplest case, the two sets of lattice vectors are related via matrix multiplication according to

$${{{{\bf{L}}}}}_{1}={{{\bf{F}}}}\ {{{{\bf{L}}}}}_{2}$$
(1)
$$\quad ={{{\bf{V}}}}\ {{{\bf{Q}}}}\ {{{{\bf{L}}}}}_{2}.$$
(2)

The deformation gradient tensor, F, which relates the two lattices, can be uniquely decomposed as the product of a reorientation matrix, Q, and the left stretch tensor, V, which is symmetric and has positive determinant. We define a strain tensor in terms of the left stretch tensor as

$${{{\bf{B}}}}={{{\bf{V}}}}-{{{\bf{I}}}},$$
(3)

where I is the 3 × 3 identity matrix. The strain tensor B (sometimes called the Biot strain) is also symmetric. At small deformation, the left stretch tensor is close in value to the identity matrix, and B approaches zero. We note that the application of a rotation followed by a left stretch tensor to the child lattice until it maps onto the parent lattice is equivalent to an application of a right stretch tensor followed by a rotation to the parent lattice.

The matrix L1 is one of many matrices that generates the same lattice of crystal sites in the parent crystal. Any other matrix \({{{{\bf{L}}}}}_{1}^{({{{\bf{N}}}})}={{{{\bf{L}}}}}_{1}\ {{{\bf{N}}}}\) generates the same lattice as L1 if N is an integer matrix having determinant ± 1. Such matrices are referred to as unimodular matrices. A more general equation relating L2 to L1 is thus

$${{{{\bf{L}}}}}_{1}\ {{{\bf{N}}}}={{{{\bf{V}}}}}^{({{{\bf{N}}}})}\ {{{{\bf{Q}}}}}^{({{{\bf{N}}}})}\ {{{{\bf{L}}}}}_{2}.$$
(4)

Given L1 and L2, there are many possible lattice mappings, corresponding to different choices of N, and each results in a distinct left stretch tensor and reorientation matrix. Thus, B(N) and Q(N) can both be considered as functions of the integer matrix N. This is illustrated in Fig. 1 in two dimensions where the parent \({{{{\mathcal{C}}}}}_{1}\) has a rectangular unit cell and where the child crystal \({{{{\mathcal{C}}}}}_{2}\) is simply a rotated version of \({{{{\mathcal{C}}}}}_{1}\). Two possible mappings are shown. In the first mapping, the short axis of \({{{{\mathcal{C}}}}}_{2}\) is mapped onto the short axis of \({{{{\mathcal{C}}}}}_{1}\). In this case, the mapping involves only a rigid rotation with a zero strain cost. A unit sphere in \({{{{\mathcal{C}}}}}_{1}\) remains a unit sphere in \({{{{\mathcal{C}}}}}_{2}\). In the second mapping, the long axis of \({{{{\mathcal{C}}}}}_{2}\) is mapped onto the short axis of \({{{{\mathcal{C}}}}}_{1}\). This mapping requires not only a rotation, but also a deformation, as illustrated by the transformation of the circle in \({{{{\mathcal{C}}}}}_{1}\) into an ellipsoid in \({{{{\mathcal{C}}}}}_{2}\).

Fig. 1: Multiplicity of lattice mappings.
figure 1

Depiction of two possible orientation relationships between \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\). In one case, \({{{{\mathcal{C}}}}}_{2}\) is rotated by −68 without an accompanying strain, in the other case, \({{{{\mathcal{C}}}}}_{2}\) is rotated by 22 and also strained. Bottom illustration depicts the definition of the strain cost both before and after removal of rigid rotation. The strain cost is minimized at a unique value when the rigid rotation is removed.

Right-multiplying L1 by a different integer matrix, T1, whose determinant has a magnitude greater than one would specify a supercell of \({{{{\mathcal{C}}}}}_{1}\). For example, a determinant-three matrix would specify a supercell having a volume three times that of the primitive cell, L1, and contain three times as many basis atoms. By considering supercells of \({{{{\mathcal{C}}}}}_{1}\) with lattice vectors S1 = L1T1, it becomes possible to identify mappings in cases when the number of basis atoms in the primitive cell of \({{{{\mathcal{C}}}}}_{2}\) is an integer multiple of the number of basis atoms in the primitive cell of \({{{{\mathcal{C}}}}}_{1}\). The integer matrix T1 with determinant greater than one is referred to as the supercell transformation matrix. The lattice-mapping relationship of Eq. (4) can be generalized by allowing for mappings onto supercells of \({{{{\mathcal{C}}}}}_{1}\) according to

$${{{{\bf{S}}}}}_{1}\ {{{\bf{N}}}}={{{{\bf{L}}}}}_{1}\ {{{{\bf{T}}}}}_{1}\ {{{\bf{N}}}}={{{{\bf{V}}}}}^{({{{\bf{N}}}})}\ {{{{\bf{Q}}}}}^{({{{\bf{N}}}})}\ {{{{\bf{L}}}}}_{2}.$$
(5)

The integer volume of the supercell, defined as the ratio of the volume of the supercell S1 to the volume of L1 is equal to \(\det ({{{{\bf{T}}}}}_{1})\).

The problem of finding lattice deformations that link two periodic crystals can thus be reduced by Eq. (5) to counting over all possible integer and unimodular transformation matrices and recording the deformation and rotation tensors that link the two structures. This process, while computationally challenging, will provide an exhaustive list of deformations connecting the two periodic unit cells. However, as detailed in the next section, the symmetry of the underlying structures can be exploited to greatly simplify this process.

Accounting for symmetry during lattice mappings

The point group symmetry operations that leave the parent or child structures unchanged result in mappings between their lattices that are equivalent. In this section we describe how symmetrically equivalent maps can be avoided while enumerating all possible lattice deformations that relate two structures.

First, we only count over symmetrically distinct supercell lattices of the parent crystal at each integer supercell volume. For a particular supercell, S1, there are many possible representations of its lattice vectors, each of which is generated by a particular unimodular matrix N, as is the case for the primitive cell lattice vectors. To enumerate distinct supercells, we employ a widely used approach based on Hermite Normal Forms of integer matrices40.

Once the symmetrically unique supercells of the parent lattice have been identified, we can proceed with Eq. (5) by counting over all unimodular matrices and recording the deformation tensor that links the parent and child lattices:

$${{{{\bf{S}}}}}_{1}{{{\bf{N}}}}={{{{\bf{F}}}}}^{(N)}{{{{\bf{L}}}}}_{2}$$
(6)

We can reduce the number of unimodular matrices N that need to be considered by only using those that generate symmetrically distinct transformations. To determine the symmetrically unique unimodular matrices, we use a convenient identity relationship between different representations of the same symmetry operation. Let us denote the crystal point group symmetry operations that leave the supercell and child lattices unchanged as \({{{{\mathcal{G}}}}}^{(1)}\) and \({{{{\mathcal{G}}}}}^{(2)}\), respectively. These symmetry operations may be represented in their cartesian form, which we denote as \({{{\mathcal{G}}}}\), or in their fractional form, which we denote as \({{{\mathcal{J}}}}\). The cartesian and fractional representations are related according to:

$${{{\mathcal{J}}}}={{{{\bf{L}}}}}^{-1}{{{\mathcal{G}}}}{{{\bf{L}}}}$$
(7)

Cartesian symmetry operations are applied to the lattice by left multiplication while the fractional symmetry operations are multiplied to the right of lattice vectors. The cartesian symmetry representation is unitary such that its inverse is equal to its transpose (i.e., \({{{{\mathcal{G}}}}}^{-1}={{{{\mathcal{G}}}}}^{T}\)). The fractional symmetry representation and its inverse are both unimodular integer matrices. Simultaneously applying the cartesian symmetry operation and the corresponding inverse fractional operation leaves the underlying lattice unchanged. For example,

$${{{{\bf{S}}}}}_{1}={{{{\mathcal{G}}}}}^{(1)}{{{{\bf{S}}}}}_{1}{({{{{\mathcal{J}}}}}^{(1)})}^{-1}.$$
(8)

Invariance relationships of this type for S1 and L2 can be inserted into Eq. (6) to yield

$${{{{\mathcal{G}}}}}^{(1)}{{{{\bf{S}}}}}_{1}{({{{{\mathcal{J}}}}}^{(1)})}^{-1}{{{\bf{N}}}}={{{{\bf{F}}}}}^{(N)}{{{{\mathcal{G}}}}}^{(2)}{{{{\bf{L}}}}}_{2}{({{{{\mathcal{J}}}}}^{(2)})}^{-1}.$$
(9)

Upon rearranging, this simplifies to

$${{{{\bf{S}}}}}_{1}{({{{{\mathcal{J}}}}}^{(1)})}^{-1}{{{\bf{N}}}}{{{{\mathcal{J}}}}}^{(2)}={({{{{\mathcal{G}}}}}^{(1)})}^{-1}{{{{\bf{F}}}}}^{(N)}{{{{\mathcal{G}}}}}^{(2)}{{{{\bf{L}}}}}_{2}$$
(10)
$${{{{\bf{S}}}}}_{1}{{{\bf{M}}}}={{{{\bf{F}}}}}^{(M)}{{{{\boldsymbol{L}}}}}_{2}$$
(11)

where \({{{\bf{M}}}}={({{{{\mathcal{J}}}}}^{(1)})}^{-1}{{{\bf{N}}}}{{{{\mathcal{J}}}}}^{(2)}\) and \({{{{\bf{F}}}}}^{(M)}={({{{{\mathcal{G}}}}}^{(1)})}^{-1}{{{{\bf{F}}}}}^{(N)}{{{{\mathcal{G}}}}}^{(2)}\) are symmetrically equivalent unimodular and deformation matrices. Counting over such deformation tensors that are related under the symmetries of the parent or child structures may be avoided by only using one of the symmetrically related unimodular matrices. Thus for each distinct supercell of \({{{{\mathcal{C}}}}}_{1}\) we only count over symmetrically unique unimodular matrices when recording the set of deformation tensors that relate \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\).

Atomic maps

If the primitive cell of \({{{{\mathcal{C}}}}}_{1}\) or \({{{{\mathcal{C}}}}}_{2}\) contains more than one basis atom, the atoms in \({{{{\mathcal{C}}}}}_{2}\) may need to be repositioned inhomogeneously to coincide with sites of \({{{{\mathcal{C}}}}}_{1}\). This deformation of the atomic positions can be represented by a displacement vector for each atom in the unit cell of \({{{{\mathcal{C}}}}}_{2}\). We denote the site positions in the unit cell of \({{{{\mathcal{C}}}}}_{1}\) as \(\{{\overrightarrow{r}}_{1}^{\ (1)},\ldots ,{\overrightarrow{r}}_{{n}_{A}}^{\ (1)}\}\) and the atom positions in the unit cell of \({{{{\mathcal{C}}}}}_{2}\) as \(\{{\overrightarrow{r}}_{1}^{\ (2)},\ldots ,{\overrightarrow{r}}_{{n}_{A}}^{\ (2)}\}\). All positions are in Cartesian coordinates. By convention, we measure displacements by first deforming \({{{{\mathcal{C}}}}}_{2}\) via a particular lattice mapping, making its lattice sites coincident with lattice sites of \({{{{\mathcal{C}}}}}_{1}\). Then, we rigidly translate the basis of \({{{{\mathcal{C}}}}}_{2}\) by a vector \(\overrightarrow{t}\) to bring the basis atoms of \({{{{\mathcal{C}}}}}_{2}\) into closer registration with the sites of \({{{{\mathcal{C}}}}}_{1}\). An atomic displacement is then the vector that translates a particular basis atom j of \({{{{\mathcal{C}}}}}_{2}\) to the position of atom i of \({{{{\mathcal{C}}}}}_{1}\). Given a particular rigid translation \(\overrightarrow{t}\), the displacement vector that translates atom j of \({{{{\mathcal{C}}}}}_{2}\) onto site i of \({{{{\mathcal{C}}}}}_{1}\) is

$${\overrightarrow{d}}_{i,j}^{\ (1)}\left(\overrightarrow{t}\ \right)={\lfloor {\overrightarrow{r}}_{i}^{(1)}-{{{{\bf{V}}}}}^{({{{\bf{N}}}},{{{{\bf{T}}}}}_{1})}{{{{\bf{Q}}}}}^{({{{\bf{N}}}},{{{{\bf{T}}}}}_{1})}{\overrightarrow{r}}_{j}^{(2)}-\overrightarrow{t}\rfloor }_{{{{{\bf{S}}}}}_{1}},$$
(12)

where the operation \({\lfloor \cdot \rfloor }_{{{{{\bf{S}}}}}_{1}}\) selects the shortest possible displacement vector with respect to periodic boundary conditions by considering all possible lattice translations of the lattice S1. Equation (12) demonstrates how the position of an atom in \({{{{\mathcal{C}}}}}_{2}\) must first be reoriented and deformed, according to the lattice mapping, before relating it to an atom in \({{{{\mathcal{C}}}}}_{1}\) via translation. The superscript of \({\overrightarrow{d}}_{i,j}^{\ (1)}\) indicates that it is the displacement measured in the strain state of \({{{{\mathcal{C}}}}}_{1}\).

There are nA! ways to form (i, j) pairs between sites of \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\). We express a particular one-to-one assignment of atoms in \({{{{\mathcal{C}}}}}_{2}\) to sites in \({{{{\mathcal{C}}}}}_{1}\) as the permutation \(\hat{p}\), such that \((i,\hat{p}[i])\) is an assignment of atom \(\hat{p}[i]\) in \({{{{\mathcal{C}}}}}_{2}\) to site i in \({{{{\mathcal{C}}}}}_{1}\).

Geometric mapping cost

As shown in the previous sections, two arbitrary crystal structures can be related to each other geometrically in a multitude of ways. The set of strains relating the lattices of the two structures are infinite, and for each possible strain map there are several ways to displace the atoms to bring the two structures into perfect coincidence. In this section and the next section we describe how geometry and symmetry may be used to define useful “cost metrics” that can capture the complexity of every enumerated transformation pathway.

Equations (3) and (5) describe the relationship between two lattices through a symmetric left stretch tensor (V) and the Biot strain tensor (B). These tensors describe changes in both the volume and shape of crystal \({{{{\mathcal{C}}}}}_{2}\). Volume change alone is a poor measure of crystal structure similarity since volume depends strongly on chemistry, temperature, and other considerations. The volumetric dependence of the left stretch tensor is given simply by \(\det {{{\bf{V}}}}={{{{\mathcal{V}}}}}_{{L}_{2}}/{{{{\mathcal{V}}}}}_{{L}_{1}}\). Consequently, we can renormalize the left stretch tensor to make it independent of volume changes, yielding the volume-normalized stretch tensor

$$\tilde{{{{\bf{V}}}}}=\frac{1}{\det {\left({{{\bf{V}}}}\right)}^{1/3}}{{{\bf{V}}}}$$
(13)

and the corresponding volume-normalized strain tensor

$$\tilde{{{{\bf{B}}}}}=\tilde{{{{\bf{V}}}}}-{{{\bf{I}}}}.$$
(14)

We use the volume-normalized strain to define cost functions of lattice deformation in order to isolate shape-change effects from volume-change effects.

We now introduce a lattice-deformation cost function that measures the magnitude of lattice strain. In general, the Biot strain tensor in Eq. (14) depends on the orientation of the coordinate system used to define the lattice vectors of \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\). However, the lattice-deformation cost function should be invariant to changes in coordinate system. A common metric of tensor magnitude that is invariant to coordinate system is the Frobenius norm:

$$\begin{array}{lll}{{{\bf{B}}}}:{{{\bf{B}}}}&=&\mathop{\sum}\limits_{i,j}{B}_{ij}^{2},\\ &=&{{{\rm{tr}}}}\left({{{{\bf{B}}}}}^{2}\right).\end{array}$$
(15)

To demonstrate that the Frobenius norm of B is a physically meaningful metric of deformation, we consider a uniform sphere of radius ρ as it is deformed by the volume-normalized stretch tensor \(\tilde{{{{\bf{V}}}}}\). The displacement of a point on the sphere is

$$\delta \overrightarrow{\rho }=\tilde{{{{\bf{V}}}}}\ \overrightarrow{\rho }-\overrightarrow{\rho }=\tilde{{{{\bf{B}}}}}\ \overrightarrow{\rho },$$
(16)

and the mean-squared displacement over the surface of the sphere is the integral

$${{{\rm{avg}}}}\left({\left|\delta \overrightarrow{\rho }\right|}^{2}\right)=\frac{1}{4\pi {\rho }^{2}}{\int}_{S}{\rho }^{2}d\omega \left({\overrightarrow{\rho }}^{\top }{\tilde{{{{\bf{B}}}}}}^{2}\overrightarrow{\rho }\right),$$
(17)

taken over the domain of solid angle in three dimensions. Expanding the integrand term by term and integrating yields

$${{{\rm{avg}}}}\left({\left|\delta \overrightarrow{\rho }\right|}^{2}\right)=\frac{1}{3}{\rho }^{2}{{{\rm{tr}}}}({\tilde{{{{\bf{B}}}}}}^{2}).$$
(18)

The spherical radius ρ can be set to a physically meaningful parameter, such as the Wigner-Seitz radius of the child crystal,

$${\rho }_{2}^{(WS)}={\left(\frac{3}{4}{{{\Omega }}}_{2}\right)}^{1/3},$$
(19)

to obtain a per-atom metric of lattice deformation. However, Eq. (18) can also be normalized by ρ2 to obtain a scale-invariant metric of deformation, which is how we shall specify the lattice-deformation cost function:

$${c}_{L}({{{{\mathcal{M}}}}}_{m})=\frac{1}{3}{{{\rm{tr}}}}\left({\tilde{{{{\bf{B}}}}}}^{2}\right).$$
(20)

Measuring the degree of atomic distortion is simpler than measuring the lattice strain. We measure the quality of a particular atomic assignment \(\hat{p}\) with the mean-squared atomic displacement:

$${c}_{A}\left({{{{\mathcal{M}}}}}_{m}\right)=\frac{1}{{\rho }_{1}^{2}}\left(\frac{1}{{n}_{A}}\mathop{\sum}\limits_{i}{\left|{\overrightarrow{d}}_{i,\hat{p}[i]}^{(1)}\left(\overrightarrow{t}\right)\right|}^{2}\right)$$
(21)

As in the case of the lattice-deformation cost function, we normalize the atomic-deformation cost by the squared Wigner-Seitz radius \({\rho }_{1}={\left(3{{{\Omega }}}_{1}/4\right)}^{1/3}\) to obtain a scale-invariant cost. The cost function Eq. (21) is a function of both the rigid translation \(\overrightarrow{t}\) and atomic assignment \(\hat{p}\), and we will show that it can be minimized with respect to these two parameters. It is also implicitly, via Eq. (12), a function of the integer matrices N and T1, which determine the lattice mapping.

The lattice-deformation cost function \({c}_{L}\left({{{{\mathcal{M}}}}}_{m}\right)\) and the atomic-deformation cost function \({c}_{A}\left({{{{\mathcal{M}}}}}_{m}\right)\) measure qualitatively distinct aspects of crystal deformation. We define mappings to be “optimal” if they simultaneously minimize both the lattice and atomic-deformation costs. Specifically, we define the following scalar total cost function:

$$c\left({{{{\mathcal{M}}}}}_{m},{w}_{L}\right)={w}_{L}{c}_{L}\left({{{{\mathcal{M}}}}}_{m}\right)+(1-{w}_{L}){c}_{A}\left({{{{\mathcal{M}}}}}_{m}\right),$$
(22)

which is a weighted average of the atomic and lattice-deformation cost functions specified by a lattice weight parameter wL. The presence of two cost functions (lattice and atomic costs) leads to the well-known problem in multi-objective optimization where there is usually no unambiguous ‘optimal’ mapping (The exception to this is when \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\) are structurally identical, in which case some mappings have both zero lattice deformation and zero atomic deformation). By introducing the total cost function that is related to both these costs, the minima is well-defined. Because the atom- and lattice-deformation cost functions defined in Eqs. (20),(21) are both scaled to remove volumetric dependence and are normalized per atom, we anticipate that a 50/50 weighted average, corresponding to wL = 0.5 should be appropriate for many applications. Values of wL > 0.5 increase the relative penalty of lattice deformation (thus allowing atomic displacements to be relatively larger) while values of wL < 0.5 decrease the relative penalty of lattice deformation (thus biasing atomic displacements to remain small).

Symmetry-adapted mapping cost

Crystal structures that differ by more than just their volumes can still be very similar. For instance, the hexagonal close-packed (hcp) structure may be deformed to have any \(\frac{c}{a}\) ratio without qualitatively changing the crystal. Hcp structures that differ with respect to their \(\frac{c}{a}\) ratio will have a nonzero geometric cost despite being crystallographically identical. To enable the easy comparison of such structures we define a “symmetry-adapted” mapping cost that is invariant under deformations that preserve the symmetry of the parent crystal.

The symmetry-adapted cost is obtained by removing any symmetry-preserving deformations or displacements from the mapping field. The symmetry-preserving Biot strain tensor, Bsym, can be obtained by averaging the effect of each point group operation on the calculated stretch tensor obtained from Eq. (5):

$${{{{\bf{B}}}}}_{{{{\rm{sym}}}}}=\frac{1}{{N}_{{{{{\mathcal{G}}}}}_{2}}}\mathop{\sum}\limits_{{{{{\mathcal{G}}}}}_{2}}{{{{\mathcal{G}}}}}_{2}{{{\bf{B}}}}{{{{\mathcal{G}}}}}_{2}^{T}$$
(23)

where \({{{{\mathcal{G}}}}}_{2}\) is the point group of the child structure (\({{{{\mathcal{C}}}}}_{2}\)) and \({N}_{{{{{\mathcal{G}}}}}_{2}}\) is the number of operations in the point group. Formally this corresponds to applying the Reynolds operator of the point group to the Biot strain tensor. Obtaining the average over all possible symmetrically equivalent Biot strain tensors leaves us with only that part of the deformation that is invariant under symmetry. Examples of symmetry-preserving deformations include simple hydrostatic deformations of the unit cells and changes to the \(\frac{c}{a}\) ratio in hcp.

The symmetry-adapted mapping score is computed using the symmetry-breaking strain tensor defined as

$${{{{\bf{B}}}}}_{{{{\rm{sym}}}}-{{{\rm{break}}}}}={{{\bf{B}}}}-{{{{\bf{B}}}}}_{{{{\rm{sym}}}}}$$
(24)

The symmetry-adapted lattice cost is then calculated as:

$${c}_{L}({{{{\mathcal{M}}}}}_{m})=\frac{1}{3}{{{\rm{tr}}}}\left({{{{\bf{B}}}}}_{{{{\rm{sym}}}}-{{{\rm{break}}}}}^{2}\right)$$
(25)

The symmetry preserving score relative to the parent may be calculated by utilizing the stretch tensor relative to the parent and the point group operations of the parent.

The symmetry-adapted atomic cost can be obtained in a manner similar to that described for the lattice-deformation cost. First, we obtain the collective atomic displacements that are invariant under the factor group of the parent structure by again applying the Reynolds operator. Subsequently, the displacements Eq. (12) that map the atoms of the child onto the atoms of the parent can be projected on to the symmetry-invariant collective displacements of the parent and removed to estimate the symmetry-breaking displacements. To perform these steps it is convenient to collect atomic displacements relative to the parent crystal atomic positions as a vector containing 3n entries

$$\overrightarrow{D}=\left[\begin{array}{l}{d}_{1}^{x}\\ {d}_{1}^{y}\\ {d}_{1}^{z}\\ \cdots \\ {d}_{n}^{x}\\ {d}_{n}^{y}\\ {d}_{n}^{z}\end{array}\right]$$
(26)

These atomic shuffles can be transformed by symmetry operations in the factor group of the parent crystal according to

$$\overrightarrow{D^{\prime} }={{{{\mathcal{G}}}}}_{1}\overrightarrow{D}$$
(27)

where \({{{{\mathcal{G}}}}}_{1}\) is now a 3n × 3n matrix representation of a symmetry operation in the factor group of the parent structure that acts on the unrolled displacement vector \(\overrightarrow{D}\). The 3n × 3n matrix representations can be constructed from the 3 × 3 Cartesian representation and the permutation representation of the factor group operations.

Symmetry-invariant modes can be constructed by applying the Reynolds operator to the set of basis vectors (denoted I, the 3n × 3n identity matrix) that span the full 3n × 3n space15,41:

$$\langle {{{\bf{D}}}}\rangle =\frac{1}{{N}_{{{{\mathcal{S}}}}}}\mathop{\sum}\limits_{{{{\mathcal{S}}}}}{{{{\mathcal{S}}}}}_{i}{{{\bf{I}}}}$$
(28)

where 〈D〉 is the symmetry-averaged basis vectors. Each column of the 〈D〉 matrix corresponds to a collective displacement field that is invariant to the symmetry of the parent crystal. Not all columns are independent from each other and a set of spanning vectors may be identified by performing singular value decomposition (SVD) of the matrix

$$\langle {{{\bf{D}}}}\rangle ={{{\bf{W}}}}{{{\boldsymbol{\Sigma }}}}{{{{\bf{X}}}}}^{T}$$
(29)

The dimensionality (r) of the symmetry-invariant space is equal to the number of nonzero singular values (or diagonal elements) in Σ, while a set of orthogonal vectors that span this space can be derived from the r column vectors of W corresponding to the nonzero singular values. This space of symmetry-preserving distortions can be expanded into larger supercells, and their symmetry-breaking deformation fields can then be obtained as:

$${\overrightarrow{D}}_{\hat{p},{{{\rm{sym}}}}-{{{\rm{break}}}}}\left(\overrightarrow{t}\ \right)={\overrightarrow{D}}_{\hat{p}}\left(\overrightarrow{t}\ \right)-\mathop{\sum}\limits_{i}({\overrightarrow{D}}_{\hat{p}}{\left(\overrightarrow{t}\right)}^{T}{\overrightarrow{D}}_{{{{\rm{sym}}}}}^{i}){\overrightarrow{D}}_{{{{\rm{sym}}}}}^{i}$$
(30)

where \({\overrightarrow{D}}_{{{{\rm{sym}}}}}\) is a matrix of symmetry-invariant collective atomic modes calculated from Eq. (29) and expanded so that it accounts for the total number of atoms in the supercell of \({{{{\mathcal{C}}}}}_{1}\) that is being considered. \({\overrightarrow{D}}_{{{{\rm{sym}}}}}^{i}\) refers to the ith collective displacement mode in this matrix.

The symmetry-breaking cost is then obtained as:

$${c}_{A}\left({{{{\mathcal{M}}}}}_{m}\right)=\frac{1}{{\rho }_{1}^{2}}\left(\frac{1}{{n}_{A}}{\left|{\overrightarrow{D}}_{\hat{p},{{{\rm{sym}}}}-{{{\rm{break}}}}}\left(\overrightarrow{t}\right)\right|}^{2}\right)$$
(31)

A summary of the mapping algorithm

The mapping algorithm described above is schematically illustrated in Fig. 2. The figure shows the steps involved in mapping a two dimensional honeycomb arrangement of atoms (labeled \({{{{\mathcal{C}}}}}_{2}\)) on to a parent square lattice (labeled \({{{{\mathcal{C}}}}}_{1}\)). First the algorithm counts over all symmetrically distinct supercells of the parent square lattice that contains two atoms. The first lattice map, labeled F1, involves a large shear and tetragonal deformation of the child lattice. The second lattice map (F2) relates the child structure to an equivalent but geometrically different supercell. The lattice undergoes a tetragonal deformation and a smaller shear distortion. Finally, F3 relates the child structure to a supercell of the square lattice that is different from those depicted in the first two deformations. Having enumerated some of the strain deformations, the algorithm then deforms the child structure and rigidly translates the atoms such that at least one of the atoms is in perfect coincidence with the lattice points of the parent structure. Figure 2 illustrates the effect of applying the homogeneous strain distortion and rigid translation to the child structure across all three lattice maps. The other atom then needs to be displaced along the highlighted vector for each of the three maps to bring it into perfect coincidence with the parent structure. Having recovered the parent crystal structure from the honeycomb child structure, the algorithm estimates the scalar costs associated with each deformation and displacement through Eqs. (20),(21),(31),(25).

Fig. 2: Schematic of the mapping algorithm.
figure 2

A summary of the steps involved in generating a map between a parent structure with a square lattice and a child structure with the atoms arranged in a honeycomb pattern. Three lattice and atomic maps that relate these structures are illustrated, with the final step being the evaluation of the lattice and atomic cost functions.

Finding optimal maps

In the previous sections we outlined how a set of mappings \({{{\mathcal{M}}}}\) linking any two arbitrary crystals can be generated. First a set of strains linking the crystals is generated by counting over all symmetrically distinct lattices. For each strain map, a set of n! atomic maps can be generated by assigning and displacing every atom in the child so that it comes into perfect coincidence with its counterpart in the parent. We also defined two ways of quantifying the extent of distortion in each of these maps through cost functions. The first, which we refer to as the geometric cost calculates a scalar quantity for the strain and atomic deformations in each map \({{{{\mathcal{M}}}}}_{m}\). The second, called symmetry-adapted cost, uses the symmetry of the underlying parent crystal structure to calculate these costs over only the symmetry-breaking parts of the strain and displacement fields. In both cases we define a total cost function that combines the individual contributions from the strain and atomic distortions to calculate a single scalar mapping cost for every mapping in \({{{\mathcal{M}}}}\). In this section we discuss optimization algorithms that can be leveraged to quickly and efficiently obtain the map with the lowest total mapping cost and an algorithm to systematically traverse the multitude of mappings in increasing order of their mapping costs

The lattice-deformation cost function for a particular supercell transformation T1 can be optimized simply by counting over unimodular matrices N in Eq. (5). Some of the simplest examples of N matrices describe operations such as a swap or permutation of lattice vectors, or the replacement of a lattice vector by its negative direction. Although N must always have a determinant of ±1, there is no limit on the magnitude of its coefficients. However, if N includes coefficients of very large magnitude, the lattice vectors \({{{{\bf{S}}}}}_{1}^{\prime}={{{{\bf{S}}}}}_{1}\ {{{\bf{N}}}}\) that define the lattice become increasingly elongated, and favorable mappings become unlikely. To minimize the range of values of N that must be considered, we first obtain the reduced cells of S1 and L2 using, for example, the Lenstra–Lenstra–Lovász algorithm42. The reduced cells are maximally compact, such that their lattice vectors have the minimal possible lengths and the angles between lattice vectors are as close to 90 as possible. The reduced cell is not unique, although conventions do exist, such as the Niggli reduced cell, that provide a unique definition, to within a rigid rotation. If both L(2) and S(1) are in reduced form, we need only consider lattice-equivalent transforms that have small entries, e.g., {−1, 0, 1}, or {−2, …, 2}. Once a range for the elements of N has been decided upon, it is straightforward to count first over distinct supercells {T1} and then over unimodular matrices {N} within the specified range and record the lattice-deformation cost for each (T1, N). We find it useful for many cases to simply retain all such mapping relationships, sorted by their weighted lattice-deformation cost or to find the best or K-best lattice-mapping relationships. The algorithm remains unchanged when using the symmetry-adapted lattice costs as defined by eq. (25).

A total mapping of \({{{{\mathcal{C}}}}}_{2}\) onto \({{{{\mathcal{C}}}}}_{1}\) comprises the ordered tuple \({{{{\mathcal{M}}}}}_{m}=({{{{\bf{T}}}}}_{1},{{{\bf{N}}}},\overrightarrow{t},\hat{p})\), where T1 and N are integer matrices specifying the lattice mapping, \(\overrightarrow{t}\) is a rigid translation of crystal \({{{{\mathcal{C}}}}}_{2}\) relative to \({{{{\mathcal{C}}}}}_{1}\), and \(\hat{p}\) is a permutation specifying the atomic mapping. The optimal atomic mapping for a given lattice mapping (i.e., N and T1) is one that minimizes Eq. (21) with respect to both \(\overrightarrow{t}\) and \(\hat{p}\). The rigid translation that minimizes Eq. (21) for a given permutation operation, \(\hat{p}\), is simply the translation that yields zero average displacement of the atoms in \({{{{\mathcal{C}}}}}_{2}\) (if nonzero, the average displacement amounts to an overall ‘drift’ of \({{{{\mathcal{C}}}}}_{2}\) relative to \({{{{\mathcal{C}}}}}_{1}\)). The permutation operation \(\hat{p}\), in contrast, is a discrete variable– the minimization of Eq. (21) with respect to \(\hat{p}\) for a particular choice of \(\overrightarrow{t}\) is a discrete combinatorial optimization problem. Fortunately, since Eq. (21) is a simple linear combination of contributions from \((i,\hat{p}[i])\) pairs, this optimization is classified as a linear assignment problem, for which well-known solution methods exist43.

Because the atomic-deformation cost function in Eq. (21) depends on both the discrete assignment \(\hat{p}\) and the continuous translation vector \(\overrightarrow{t}\), we propose an iterative procedure to optimize the atomic-deformation cost. In the first step, we identify potential rigid translations of \({{{{\mathcal{C}}}}}_{2}\) that are likely to be near the optimal translation. These are translations that bring an atom in \({{{{\mathcal{C}}}}}_{2}\) into coincidence with a chemically compatible site of \({{{{\mathcal{C}}}}}_{1}\). It is preferable at this step to pick an atom from among the minority species. For example, if \({{{{\mathcal{C}}}}}_{1}\) and \({{{{\mathcal{C}}}}}_{2}\) each have two Cu atoms and four Au atoms per unit cell, we would pick as candidate translation vectors \({\overrightarrow{t}}_{\kappa }^{\prime}\) those that map one Cu atom of \({{{{\mathcal{C}}}}}_{2}\) onto each of the two Cu atoms in \({{{{\mathcal{C}}}}}_{1}\). In general, we denote the number of minority species in \({{{{\mathcal{C}}}}}_{2}\) as ms

Next, we find the optimal atomic assignment for each attempted translation \({\overrightarrow{t}}_{\kappa }^{\prime}\), κ = 1, …, nms where nms is the number of minority species. To do so, we construct the atomic assignment cost matrix, \({{{\bf{C}}}}({\overrightarrow{t}}_{\kappa }^{{\prime} })\), for each rigid translation. The (i, j) element of the cost matrix is the pairwise cost contribution of assigning site j in \({{{{\mathcal{C}}}}}_{2}\) to site i in \({{{{\mathcal{C}}}}}_{1}\) for the rigid translation \({\overrightarrow{t}}_{\kappa }^{\prime}\). The elements of the cost matrix are

$${C}_{i,j}({\overrightarrow{t}}_{\kappa }^{{\prime} })=\left\{\begin{array}{ll}\frac{1}{{n}_{A}}{\left|{\overrightarrow{d}}_{i,j}^{(1)}\left({\overrightarrow{t}}_{\kappa }^{\prime}\right)\right|}^{2}&{{{\rm{if}}}}\ \ {s}_{i}={s}_{j}\\ \infty &{{{\rm{if}}}}\ \ {s}_{i}\ne {s}_{j}\end{array}\right.$$
(32)

where an element of the cost matrix is infinite (or at least very large) when the species at sites i and j, labeled si and sj, respectively, are chemically incompatible. This ensures that chemically incompatible assignments are excluded from the optimal assignment. Once the cost matrix is constructed according to eq. (32), the optimal assignment \({\hat{p}}_{\kappa }^{\star }\) is the solution to

$${\hat{p}}_{\kappa}^{\star}= \mathop{{\mathrm{arg}}\,{\mathrm{min}}}\limits_{\hat{p}}\mathop{\sum}\limits_{i}{C}_{i,{\hat{p}}[j]}\left({\overrightarrow{t}}_{\kappa}^{\prime }\right).$$
(33)

The minimization of Eq. (33) can be solved by the Hungarian algorithm44 (used in this work) or via linear programming methods43.

Once the optimal assignment is found for an attempted translation, \({\overrightarrow{t}}_{\kappa }^{\prime}\), we update the translation by subtracting the average displacement (i.e., drift) due to that assignment \({\hat{p}}_{\kappa }^{\star }\) according to

$${\overrightarrow{t}}_{\kappa }={\overrightarrow{t}}_{\kappa }^{{\prime} }-\frac{1}{{n}_{A}}\mathop{\sum}\limits_{i}{\overrightarrow{d}}_{i,{\hat{p}}_{\kappa }^{\star }[i]}^{\ (1)}\left({\overrightarrow{t}}_{\kappa }^{{\prime} }\right).$$
(34)

Next, we calculate the atomic-deformation cost, eq. (21), for the assignment/translation pair \(({\hat{p}}_{\kappa }^{\star },{\overrightarrow{t}}_{\kappa }\ )\) and record the result. This must be performed for each attempted translation κ = 1, …, nms. The optimal atomic assignment \({\hat{p}}_{\kappa }^{\star }\) for the imposed lattice map is the one with the lowest atomic-deformation cost.

In certain extreme cases, it may be necessary to perform additional optimization steps. When calculating the revised atomic displacements due to the augmented translation \({\overrightarrow{t}}_{\kappa }\), it should be verified that the average total displacement (i.e., drift) is indeed equal to zero, i.e.,

$$\frac{1}{{n}_{A}}\mathop{\sum}\limits_{i}{\overrightarrow{d}}_{i,{\hat{p}}_{\kappa }^{\star }[i]}^{(1)}\left({\overrightarrow{t}}_{\kappa }^{{\prime} }\right)=0$$
(35)

Violations of Eq. (35) may occur due to the periodic boundary considerations imposed in Eq. (12). If an outlier atom has a very large atomic displacement under translation \({\overrightarrow{t}}_{\kappa }^{{\prime}}\), it may indicate that atom \(\hat{p}[i]\) in \({{{{\mathcal{C}}}}}_{2}\) is nearly midway between two periodic images of site i in \({{{{\mathcal{C}}}}}_{1}\). In such a case, a small change in rigid translation may affect a large change in the displacement of the atom (e.g., the revised translation swaps the first- and second-nearest periodic image of atom i). If a violation of Eq. (35) is encountered, it indicates that the optimal atomic assignment may be unstable relative to small rigid translations in the vicinity of \({\overrightarrow{t}}_{\kappa }^{{\prime} }\). As such, the augmented translation \({\overrightarrow{t}}_{\kappa }\) may be recalculated iteratively until Eq. (35) is satisfied, with the augmented translation at each iteration added to the list of plausible translations to be considered for solution of the linear assignment problem.

Minimizing the symmetry-adapted atomic cost requires additional steps. Unlike the geometric-cost function of eq. (21), the symmetry-adapted atomic cost can only be calculated once a particular assignment of atoms has been chosen. As a result the Hungarian algorithm cannot be directly applied to obtain the minimum cost assignment. The algorithm can, however, be adapted to systematically search over suboptimal maps to arrive at the assignment of atoms that minimizes the symmetry-adapted cost. To do this, we adopt Murty’s algorithm45 to generate a queue of suboptimal maps that are arranged in increasing magnitude of their geometric cost (Eq. (21)). We then search this queue up to some maximum depth that is user specified and recalculate the symmetry-adapted cost for each of these elements. The element with the minimal symmetry-adapted cost is then recorded as the optimal map. This algorithm is guaranteed to provide the optimal map if all n! assignments are enumerated. However in practice we have found that the assignment that minimizes the symmetry-adapted cost is often found by searching over the first 5–10 suboptimal assignments. A detailed algorithm outlining a methodology to systematically enumerate all possible suboptimal maps is outlined in the supplementary information.

Case studies

We illustrate the mapping algorithm by first comparing the geometric-cost functions against the symmetry-adapted cost function for two parent structure prototypes. Next we demonstrate how well-known structural transformation pathways can be identified by systematically analyzing all possible mappings and their associated cost function values.

The hexagonal close-packed (hcp) crystal structure is usually characterized by two lattice parameters that are conventionally denoted a and c. The distance between the atoms in a particular triangular layer of hcp is equal to a while the spacing between the layers is half the c lattice parameter. The underlying crystal structure remains qualitatively unchanged across all values of a and c. It is desirable to use a mapping function that is insensitive to such changes in the crystal structure. Figure 3 compares the difference between the geometric and symmetry-adapted lattice costs for a child structure with a wide-range of \(\frac{c}{a}\) ratios that is mapped on to a parent crystal with a \(\frac{c}{a}\approx 1.6\). The geometric cost rises rapidly at values that deviate from the parents’ lattice parameters. On the other hand the symmetry-adapted cost remains exactly zero across the full range of values.

Fig. 3: Geometric cost versus symmetry-adapted cost.
figure 3

A comparison of the symmetry-adapted cost with the geometric cost when mapping an hcp crystal structure with varying c/a ratio onto a reference hcp crystal with a c/a ratio of ≈1.6.

Figure 4a shows the crystal structure of an orthorhombic phase, denoted O\({}^{\prime}\), that is frequently formed in titanium-rich alloys46. Similar to hcp, the O\({}^{\prime}\) crystal structure consists of triangular layers; however, they do not adopt the ideal stacking as in hcp as is illustrated in Fig. 4a. Furthermore, the unit cell of O\({}^{\prime}\) is slightly strained relative to that of hcp. As a result, the O\({}^{\prime}\) structure has a lower symmetry than hcp. We ignore the lattice strain for the purpose of demonstrating our algorithm. Figure 4b compares the geometric cost against the symmetry-adapted cost when mapping O\({}^{\prime}\) onto a reference O\({}^{\prime}\) structure as a function of the shuffle amplitude of alternating close-packed layers of O\({}^{\prime}\) (i.e., along the arrows in Fig. 4a). The geometric cost rapidly increases with the shuffle amplitude until it reaches a maximum before it starts decreasing. The decrease in geometric cost is due to the periodicity of the parent crystal structure. In contrast to the periodically varying geometric cost, the symmetry-adapted cost remains identically zero. The shuffle of alternating close-packed planes as shown in Fig. 4 do not result in further symmetry breaking of O\({}^{\prime}\) and thus do not incur a cost penalty. We note that as the layers are translated relative to each other in O\({}^{\prime}\), a particular shuffle amplitude will result in the formation of perfect hcp. It is not possible to easily identify shuffles that increase the symmetry of the underlying crystal with just the symmetry operations of the low-symmetry structure.

Fig. 4: Geometric cost versus symmetry-adapted cost.
figure 4

A comparison of the symmetry-adapted costs against the geometric costs when mapping the O\({}^{\prime}\) structure with varying shuffle amplitude onto a reference O\({}^{\prime}\) structure. a A schematic of the O\({}^{\prime}\) crystal structure. The arrows signify a shuffle mode of the triangular layer of blue atoms between rigid triangular layers of green atoms. b Comparison between the symmetry-adapted and geometric costs.

There is a large number of structural relationships between any pair of crystals. As an illustration, we explore mapping relationships between well-known crystal structures such as bcc, fcc, hcp, and ω. The ω phase can be described as alternating triangular and honeycomb layers, with the atoms of the triangular layers residing above and below the centers of the hexagons of the honeycomb layers. Figure 5 plots the lattice and atomic displacement costs for different mappings of fcc, hcp, and ω onto bcc. Three pathways connecting bcc with hcp, fcc, and ω are highlighted in Fig. 5b. Also included are different mappings of bcc onto bcc, which are denoted with a circle.

Fig. 5: Mapping costs of common structures onto bcc.
figure 5

The lattice and atomic costs when mapping bcc, fcc, hcp, and ω onto a reference bcc crystal structure. a Most mappings have large mapping costs. b Several well-known transformations, such as the Bain, Burgers, and de Fontaine-Silcock path, have smaller mapping costs.

Several of the mappings with small mapping scores in Fig. 5 correspond to the end points of well-known pathways that convert one crystal structure into another. Among them are the Bain path that connects bcc to fcc19,26,27, the Burgers path that connects bcc to hcp20,26,27 and a path that converts bcc into ω21,22,27. Each pathway is linked to a particular mapping relationship. The Bain path, illustrated in Fig. 6, converts bcc into fcc through a tetragonal tensile strain of the bcc unit cell vectors along one of its cubic axes. The mapping corresponding to this path only has a lattice cost, but no atomic displacement cost. The resulting fcc crystal can be converted to another bcc crystal through a Bain path along a different fcc cubic axis. This leads to the mapping relationship between two bcc crystals denoted by the circle with a lattice cost of ≈0.1 in Fig. 5.

Fig. 6: The Bain and Burgers paths.
figure 6

The bcc crystal can be converted to fcc through a tetragonal strain known as the Bain path19 or it can be converted to hcp along the Burgers path, which combines a compressive tetragonal strain with an atomic shuffle20.

The Burgers path, which connects bcc to hcp, connects end states with a mapping that has both a lattice cost and an atomic displacement cost. As illustrated in Fig. 6, the Burgers path couples a compressive tetragonal distortion of bcc along one of its cubic axes, followed by a shuffle of (110) planes as referenced to the original bcc lattice. While the lattice cost of the Burgers path is smaller than that of the Bain path, it does have a sizable atomic displacement cost.

A third well-known path, due to Silcock21 and de Fontaine22,47, connects bcc to ω. Early descriptions of the bcc to ω path invoked a transverse shuffle of \((11\bar{2})\) planes along the (111) direction21,48. Later, de Fontaine pointed out a more intuitive description in terms of longitudinal shuffles of (111) planes22. This is illustrated in Fig. 7, where every two out of three (111) planes of bcc collapse to form a honeycomb layer, thereby forming the ω crystal structure consisting of alternating honeycomb layers and triangular layers. The supercell of bcc must have an integer volume of three and has a hexagonal unit cell, with its \(\overrightarrow{A}\) and \(\overrightarrow{B}\) vectors spanning one family of (111) planes and its \(\overrightarrow{C}\) axis perpendicular to the same family of (111) planes of bcc (i.e., \(\overrightarrow{A}\) is parallel to \([\bar{1}01]\), \(\overrightarrow{B}\) is parallel to \([0\bar{1}1]\) and \(\overrightarrow{C}\) is parallel to [111]). As is evident in Fig. 5, the mapping between bcc and ω corresponding to the Silcock-de Fontaine path has a very small lattice cost but a large atomic displacement cost due to the collapse of adjacent (111) planes.

Fig. 7: The de Fontaine path between bcc and omega.
figure 7

The ω crystal structure can be formed from bcc by collapsing two out of every three bcc (111) planes22.

Figure 8 explores the structural relationship between hcp and common crystal structure prototypes such as bcc, fcc, ω, and a family of topologically close-packed phases. The Burgers transformation relating bcc and hcp requires a large atomic shuffle and a small lattice strain. The transformation pathway to the fcc structure with an atomic cost of ≈0.07 can be viewed as successively applying the Burgers and Bain transformation to hcp.

Fig. 8: Mapping costs of common structures onto hcp.
figure 8

Mapping costs of bcc, fcc, hcp, and ω onto a reference hcp crystal. a A large number of mappings have large atomic costs. b Several previously identified mappings20,23,25 have much smaller mapping costs.

Structural relationships between hcp and the ω crystal structure have been extensively explored by Trinkle et al.23,24. Our mapping algorithm shows that two of these transformation pathways, labeled TAO-1 and Silcock, have the smallest cost. The Silcock pathway primarily involves atomic shuffles within the basal plane such that the (0001) planes of hcp are transformed into the \((11\overline{2}0)\) planes of ω. The TAO-1 transformation pathway, which is predicted to have the lowest barrier in pure titanium23, transforms the basal plane of hcp to \((0\overline{1}11)\) planes of ω. Both transformation pathways require significant shuffles but are accompanied by small strain distortions.

Figure 8 also shows mapping costs for transformation pathways that link hcp to a family of topologically close-packed structures. These pathways, as described by Natarajan and Van der Ven25, involve a transformation of a subset of the hcp close-packed triangular layers into kagome nets and a dissociation of other close-packed triangular layers into three new, less dense triangular layers. The formation of a kagome net from a triangular lattice can be realized with in-plane shuffles while the dissociation of triangular lattices into three new triangular lattices occurs with out-of-plane shuffles. A large number of topologically close-packed phases that include C14, C15, and C36 Laves phases, CaCu5, Be3Nb, and Co7Gd2 can be generated from hcp through a combination of in-plane and out-of-plane shuffles25.

Discussion

We have described an approach to enumerate mappings between any pair of crystal structures. The approach first identifies symmetrically distinct lattice maps and accompanying strains that deform the lattice of the child structure onto that of the parent. For each lattice map, the basis atoms within the child structure are displaced until they coincide perfectly with the parent structure. As there are an infinite number of ways to mathematically link two crystal structures, we introduced two cost metrics that serve as a measure of the distance along a map. The geometric-cost metric measures the size of the strain and displacement fields required to bring the two structures into coincidence. The symmetry-adapted cost metric measures only that part of the distortion field that breaks the symmetry of the parent crystal structure. Finally we outlined optimization and search algorithms that can be employed to obtain the structure mapping with lowest cost metric and a family of suboptimal structural transformations. The mapping algorithm can be used to connect ordered crystals to unordered host structures or other ordered phases at the same composition. The algorithm has been implemented within the CASM software package15,38,39. The implementation can be used to generate maps between any pair of crystal structures and to assign a cost to each map.

The pathway generation scheme outlined here has several similarities to that introduced by Trinkle et al.24. For example, the enumeration over possible lattice mappings using unimodular matrices has much in common with the approach of Trinkle et al.24. There are, however, several crucial differences. First, the approach of this work explicitly leverages the symmetry of the underlying parent and child crystal structures to prune the set of possible maps and to discern a symmetry-adapted mapping score. As outlined in section Accounting for symmetry during lattice mappings, strain deformations that are identical under the point group operations of the two crystal structures are screened using eq. (10). Trinkle’s algorithm relies on comparisons of the eigenstrains of the deformation tensors to prune elements of the map set \({{{\mathcal{M}}}}\) that represent the same deformation field but are numerically different. Second, our approach employs the Hungarian algorithm (and Murty’s algorithm) to systematically enumerate all feasible assignments of atoms between the child and parent structures when generating displacement fields. In contrast, a brute force approach that only counts over “small” displacements of each atom is used in24. Finally, we propose a way of characterizing the complexity of the transformation pathway using a symmetry-adapted cost metric. This cost metric accounts for only symmetry-breaking deformation fields and enables the comparison of qualitatively similar crystal structures that might have very different lattice parameters and atomic coordinates. This is an especially powerful feature that, to our knowledge, has not yet been exploited in any previously developed crystal mapping algorithms.

Our systematic enumeration of pathways between common crystal structures as summarized in Figs. 5 and 8 has revealed that all known structural transformations can be associated with pathways that have the smallest or close to the smallest mapping costs. The mapping costs enable the systematic exploration of physically meaningful structural transformation pathways. An analysis of transformation pathways relating several commonly occurring crystal structure prototypes49 using the algorithm outlined in this study has revealed seven new structural transformation pathways. Using this algorithm to link all known crystal structure prototypes will undoubtedly generate a rich database of phase transformation pathways that will provide insights about a wide variety of structural phase transformations.

The algorithms described here and its implementation within CASM should prove invaluable in organizing high-throughput first-principles databases by enabling a precise cataloguing of crystal structures and the identification of relaxations to new structures due to dynamical instabilities. Similarly, the algorithms will benefit the field of alloy theory39,50,51, where cluster expansion Hamiltonians are trained to first-principles energies of a large number of chemical decorations over the sites of a particular parent crystal structure52,53,54,55,56,57,58,59,60,61,62,63,64. In many instances, a subset of orderings on a parent crystal exhibit dynamical instabilities and relax to a decoration on a different parent crystal structure59,65. These relaxations contaminate the training dataset of a cluster expansion and must be detected and eliminated from the training pool. A robust mapping and distance metric is necessary to establish whether a particular ordering can still be considered a decoration on the original parent crystal structure. The mapping tool can also be used to identify symmetric equivalence of deformed crystals, as for example, the crystallographic models of sheared bicrystals used to calculate generalized stacking fault energies66.

Methods

Mapping crystal structures

Transformation pathways connecting various crystal structures were generated with the Clusters Approach to Statistical Mechanics (CASM) code. Figures 4 and 3 were generated by employing the symmetry-adapted and geometric-cost metrics to quantify the complexity of the transformation pathways. The mapping costs shown in Figs. 5 and 8 were generated by searching for symmetrically distinct transformation pathways connecting hcp and bcc to several commonly occurring crystal structures. For each set of parent and child structures, we considered all symmetrically distinct supercells of the child containing at most 12 atoms. Lattice mappings relating the child superstructure to a corresponding superstructure of the parent were generated by counting over all unimodular matrices containing entries with a maximum magnitude of 2. We then recorded the five best atomic maps for each lattice map with the optimality measure being given by the geometric cost. The symmetry-adapted cost metrics were calculated for each of these sets of lattice and atomic maps using Eqs. (24), (31). The symmetry-adapted lattice costs were calculated relative to the parent structures.