Cowley short range order parameter#

The Cowley short range order parameter can be used to find if an alloy is ordered or not. The order parameter is given by,

\[ \alpha_i = 1 - \frac{n_i}{m_A c_i} \]

where \(n_i\) is the number of atoms of the non reference type among the \(c_i\) atoms in the \(i\)th shell. \(m_A\) is the concentration of the non reference atom.

We can start by importing the necessary modules

from pyscal3 import System
import matplotlib.pyplot as plt

We need a binary alloy structure to calculate the order parameter. We will use the crystal structures modules to do this. Here, we will create a L12 structure.

sys = System.create.lattice.l12(lattice_constant=4.00, repetitions=[2,2,2])

To identify neighbor shell, we calculate the radial distribution function.

val, dist = sys.calculate.radial_distribution_function()

We can plot the rdf,

plt.plot(dist, val)
plt.xlabel(r"distance $\AA$")
plt.ylabel(r"$g(r)$")
plt.xlim(0, 5)
(0.0, 5.0)
../_images/783e76a4d3e95c08d4a4b05c71eac58feaf64dcfbed5943f02ee16c5c4a922b2.png

In this case, we will take a cutoff of 3

sys.find.neighbors(method='cutoff', cutoff=3)

Finally we can calculate the short range order. We will use the reference type as 1 and also specify the average keyword as True. This will allow us to get an average value for the whole simulation box.

sys.chemical.short_range_order()

Value for individual atoms can be accessed by,

sys.atoms.chemical.short_range_order
array([ 1.        , -0.33333333, -0.33333333, -0.33333333,  1.        ,
       -0.33333333, -0.33333333, -0.33333333,  1.        , -0.33333333,
       -0.33333333, -0.33333333,  1.        , -0.33333333, -0.33333333,
       -0.33333333,  1.        , -0.33333333, -0.33333333, -0.33333333,
        1.        , -0.33333333, -0.33333333, -0.33333333,  1.        ,
       -0.33333333, -0.33333333, -0.33333333,  1.        , -0.33333333,
       -0.33333333, -0.33333333])

We can also visualise this

sys.show.continuous_property(sys.atoms.chemical.short_range_order)