under the hood¶
Pair Short-Range-Order¶
What does sqsgen actually compute?¶
sqsgenerator computes so-called Warren-Cowley short-range-order (WC-SRO) parameters, to quantify the “randomness” of an atomistic model. Thus consider a binary alloy with just \(A\) and \(B\) atoms, then the SRO parameter is defined as
Where \(N_{AB}\) the number of \(A-B\) bonds, \(N\) the number of atoms in the cell, \(x_A\) (\(x_B\)) the mole fraction of \(A\) (\(B\)) and \(M\) the number of neighbors on the lattice (e. g \(M^{fcc}=12\)). Thus it compares the number of \(A-B\) bonds in a given (numerator) configuration with that of statistical ideal solid solution (denominator). Thus the following cases can occur
Therefore, (with default settings) sqsgenerator tries to optimize a given system such that \(\alpha_{AB} \approx 0\).
Can sqsgenerator handle also second-nearest neighbors?¶
Yes it actually can! Indeed, on a fcc lattice each atom exhibits \(M^{fcc}_1=12\) nearest neighbors, but there are also \(M^{fcc}_2=6\) second nearest neighbors and even \(M^{fcc}_3=24\) third nearest neighbors. However, it is very easy to generalize the Warren-Cowley SRO to more “coordination shells” which, therefore becomes a vector
But what about optimizing multi-component alloys?¶
Similarly, the generalization to multi-component systems is a straight as for the coordination shells. Consider a system of \(\{A,B,C\}\) atoms. Now we have to also consider \(A-C\) and \(B-C\) bonds, thus resulting in 6 SRO parameters for each coordination shells (also \(A-A\), \(B-B\) and \(C-C\) bonds are considered), thus the initial parameter becomes a three dimensional object
where again \(M^{i}\) is the number of sites in the \(i\)-th coordination shell, \(x_\xi\) and \(x_\eta\) are the mole-fraction of the corresponding species and \(N^i_{\xi\eta}\) the number of \(\xi-\eta\) “bonds”/pairs in the coordination shell.
Putting it all together!¶
This is a quite large number of parameters to optimize. In order to squeeze those together we produce a single scalar value by simply summing over those parameters. Therefore, we define our “objective-function” as for a certain atomic configuration \(\sigma\) as,
where \(w^i\) are the coordination shell_weights, to take into account the decreasing influence of shells which are farther away. \(\alpha_{\xi\eta}\) are the target_objective parameters. Those can be used to optimize pairs between different species differently. \(p_{\xi\eta}\) are pair_weights and allows the user to weight pair types differently.
However, for the sake of computational efficiency we merge \(p_{\xi\eta}\) and \(w^i\) into \(\tilde{p}_{\xi\eta}^i\) where
Moreover, the \(\dfrac{1}{NM^i x_\xi x_\eta}\) term does not depend on a specific configuration \(\sigma\) therefore it can be computed before the actual optimization process. Hence, we gather those and name them “prefactors” \(f_{\xi\eta}^i\) where
such that Eq. (3) can be factored to
Employing the above definition the objective function \(\mathcal{O}(\sigma)\) can be written as
sqsgenerator tries different atomic configurations \(\sigma\) by “randomly shuffling” or “systematically” (in lexicographical order) to filter out those configuration which minimize \(\mathcal{O}(\sigma)\).
Note
In the technical part of the documentation we refer to \(w^i\) as the shell_weights, \(\tilde{\alpha}_{\xi\eta}\) as the target_objective, \(\tilde{p}^i_{\xi\eta}\) as the pair_weights and \(f_{\xi\eta}^i\) as the prefactors
Note
The mapping of an atomic configuration \(\sigma\) on a scalar values via \(\mathcal{O}(\sigma)\) is non-injective, thus you might end up with quite a lot of configurations, which are “equal” in the here presented formalism.