Ackland–Jones classification#
The method of Ackland and Jones [1] labels each atom as fcc, hcp, bcc, icosahedral or unknown, from the angles between the bonds to its nearest neighbors. It counts the bond angles in eight ranges and compares the counts with those of the perfect structures. It gives the same kind of labels as common neighbor analysis (CNA), and it chooses its neighbors from the distances to the six nearest atoms, so it needs no cutoff. This page describes the method and compares its labels with CNA on crystals at finite temperature and on a liquid.
Definition#
For each atom \(i\), let \(r_0^2\) be the mean of the squared distances to its six nearest atoms. The method uses two groups of neighbors: the \(N_0\) atoms with \(r_{ij}^2 < 1.45\, r_0^2\), and the \(N_1\) atoms with \(r_{ij}^2 < 1.55\, r_0^2\). For every pair \(j, k\) of the \(N_0\) neighbors, the cosine of the bond angle \(\theta_{jik}\) is counted in one of eight ranges:
Count |
\(\chi_0\) |
\(\chi_1\) |
\(\chi_2\) |
\(\chi_3\) |
\(\chi_4\) |
\(\chi_5\) |
\(\chi_6\) |
\(\chi_7\) |
|---|---|---|---|---|---|---|---|---|
\(\cos\theta\) from |
−1 |
−0.945 |
−0.915 |
−0.755 |
−0.195 |
0.195 |
0.245 |
0.795 |
to |
−0.945 |
−0.915 |
−0.755 |
−0.195 |
0.195 |
0.245 |
0.795 |
1 |
In the perfect structures the counts are:
Structure |
\(N_0\) |
\(\chi_0\) |
\(\chi_1\) |
\(\chi_2\) |
\(\chi_3\) |
\(\chi_4\) |
\(\chi_5\) |
\(\chi_6\) |
\(\chi_7\) |
|---|---|---|---|---|---|---|---|---|---|
fcc |
12 |
6 |
0 |
0 |
24 |
12 |
0 |
24 |
0 |
hcp |
12 |
3 |
0 |
6 |
21 |
12 |
0 |
24 |
0 |
bcc |
14 |
7 |
0 |
0 |
36 |
12 |
0 |
36 |
0 |
icosahedral |
12 |
6 |
0 |
0 |
30 |
0 |
0 |
30 |
0 |
From the counts, the method computes the deviations from a bcc, a close packed, an fcc and an hcp environment:
\(\delta_\mathrm{bcc}\) is set to 0 if \(\chi_0 = 7\), \(\delta_\mathrm{fcc}\) if \(\chi_0 = 6\), and \(\delta_\mathrm{hcp}\) if \(\chi_0 \le 3\). The atom is then labelled by the first rule that applies:
unknown if \(\chi_7 > 0\), that is, if two neighbors are closer than about 37° as seen from the atom.
icosahedral if \(\chi_4 < 3\) and \(11 \le N_1 \le 13\), and unknown if \(\chi_4 < 3\) otherwise.
bcc if \(\delta_\mathrm{bcc} \le \delta_\mathrm{cp}\) and \(N_1 \ge 11\), and unknown if \(\delta_\mathrm{bcc} \le \delta_\mathrm{cp}\) otherwise.
unknown if \(N_1\) is not 11 or 12.
fcc if \(\delta_\mathrm{fcc} < \delta_\mathrm{hcp}\), and hcp otherwise.
pyscal follows the original implementation of compute ackland/atom in LAMMPS.
Usage#
import numpy as np
import pyscal
from ase.io import read
atoms = read("conf.bcc.dump", format="lammps-dump-text")
labels, names = pyscal.identify_ackland_jones(atoms)
labels[:6], names[:6]
(array([3, 2, 3, 4, 2, 0]), ['bcc', 'hcp', 'bcc', 'ico', 'hcp', 'other'])
identify_ackland_jones finds its own neighbors, so find_neighbors is not needed, and a neighbor list stored on atoms is not used and not changed.
It returns an integer label and a name for each atom.
The labels are those of common_neighbor_analysis:
Label |
0 |
1 |
2 |
3 |
4 |
|---|---|---|---|---|---|
Name |
other |
fcc |
hcp |
bcc |
ico |
The results are stored on atoms:
Key |
Shape |
Content |
|---|---|---|
|
\((N,)\) |
integer label |
|
\((N,)\) |
integer label, the key that |
|
\((N, 8)\) |
\(\chi_0, \dots, \chi_7\) |
Crystals at finite temperature and a liquid#
How well does the method label atoms in real simulations?
We classify three MD snapshots from the examples folder, an fcc crystal and a bcc crystal at finite temperature, and a liquid, with the Ackland–Jones method and with adaptive CNA.
from collections import Counter
snapshots = {
"fcc": read("conf.fcc.dump", format="lammps-dump-text"),
"bcc": read("conf.bcc.dump", format="lammps-dump-text"),
"liquid": read("conf.lqd.Al.dump", format="lammps-dump-text"),
}
fractions = {}
for name, snapshot in snapshots.items():
n = len(snapshot)
_, names = pyscal.identify_ackland_jones(snapshot)
fractions[name, "Ackland–Jones"] = {k: v / n for k, v in Counter(names).items()}
counts = pyscal.common_neighbor_analysis(snapshot)
fractions[name, "CNA"] = {("other" if k == "others" else k): v / n
for k, v in counts.items()}
common_neighbor_analysis calls the label 0 others, which is renamed here to other.
In the fcc snapshot, the Ackland–Jones method labels 74 % of the atoms as fcc, more than CNA with 56 %. The method assigns the structure with the smallest deviation, so an atom whose angles are moved slightly by thermal motion can still be labelled fcc, where CNA requires the exact signatures. In the bcc snapshot, the method labels 46 % of the atoms as bcc, fewer than CNA with 85 %, and 15 % as fcc. In bcc, the second shell is only 15 % farther away than the first, and thermal motion moves second shell atoms across the limit of \(1.45\, r_0^2\), which changes \(\chi_0\) and \(N_1\). In the liquid, 83 % of the atoms are unknown, and CNA labels 100 % as other.
Random displacements#
To see how the labels change with the size of the thermal displacements, we add random displacements to perfect fcc, hcp and bcc crystals, with a standard deviation \(\sigma\) up to 10 % of the nearest neighbor distance in each direction, a rough model of thermal vibrations. We compare with adaptive CNA.
from ase.build import bulk
def perfect(name):
"""Crystal and nearest neighbor distance."""
if name == "hcp":
return bulk("Cu", "hcp", a=2.55).repeat((8, 8, 5)), 2.55
if name == "fcc":
return bulk("Cu", "fcc", a=3.61, cubic=True).repeat(6), 3.61 / np.sqrt(2)
return bulk("Fe", "bcc", a=2.87, cubic=True).repeat(6), 2.87 * np.sqrt(3) / 2
sigmas = np.linspace(0, 0.10, 11)
scan = {}
for name in ("fcc", "hcp", "bcc"):
crystal, nearest = perfect(name)
for sigma in sigmas:
noisy = crystal.copy()
noisy.rattle(sigma * nearest, seed=1)
_, names = pyscal.identify_ackland_jones(noisy)
scan[name, sigma, "Ackland–Jones"] = Counter(names)
scan[name, sigma, "CNA"] = pyscal.common_neighbor_analysis(noisy)
scan[name, sigma, "n"] = len(noisy)
The solid lines show the fraction of atoms that the Ackland–Jones method assigns to each label, and the dotted lines the fraction that CNA labels correctly. For fcc and hcp, the two methods label about the same fraction of atoms correctly up to \(\sigma = 6\) %. At larger displacements the Ackland–Jones method keeps more atoms: at \(\sigma = 8\) % it labels 33 % of the fcc atoms and 41 % of the hcp atoms correctly, against 24 % and 26 % with CNA. For bcc it loses atoms much earlier: at \(\sigma = 4\) % it labels 70 % of the atoms as bcc, where CNA still labels 100 %.
Things to watch#
bcc at high temperature. Thermal motion moves atoms of the second bcc shell across the limits of \(N_0\) and \(N_1\), and bcc atoms are labelled fcc or unknown. Check bcc fractions with CNA.
Diamond structures are not covered. The atoms of a perfect diamond crystal are labelled unknown. Use
diamond_structure(see Common neighbor analysis).Surfaces. Atoms at a free surface have too few neighbors in the angle counts and are labelled unknown.
pyscal_structureis shared with CNA.common_neighbor_analysisstores its labels under the same key, with the same codes. The function called last overwrites the result of the other. The Ackland–Jones labels are also inpyscal_ackland_label.
References#
G. J. Ackland and A. P. Jones, Applications of local crystal structure measures in experiment and simulation, Phys. Rev. B 73, 054104 (2006). doi:10.1103/PhysRevB.73.054104