3D Materials Lab: Tutorials
  • 3D Materials Lab: Tutorials
  • ➡️Defects
    • Intro to Defect Calculations
    • Interpreting Defect and Energy Level Diagrams
  • ➡️Transport
    • Boltzmann Transport Theory and Thermoelectric Performance
  • ➡️Polarization
    • Introduction to Polarization Calculations
  • ➡️Dynamics in crystalline solids
    • First-principles Calculations of Atomic Diffusion in Crystalline Solids
    • Tutorial on Using Nudged Elastic Band (NEB) method
    • Calculating Polarization Switching Barrier using SS-NEB
    • Pylada High-throughput Workflow for SS-NEB Calculations
  • ➡️Installing Pylada on HPC
    • Instructions
  • ➡️ALLOY MODELING
    • Create alloy models
Powered by GitBook
On this page
  • Installing Alloy Theoretic Automated Toolkit
  • Preparing input for mcsqs
  • Running Monte Carlo simulation to find SQS
  • Generate SQS with a specific supercell
  • Analyze the MC simulation results
Export as PDF
  1. ALLOY MODELING

Create alloy models

This tutorial showcases how to use Alloy Theoretic Automated Toolkit (ATAT) to create random alloys based on the theory of special quasi-random structure (SQS)

PreviousInstructions

Last updated 11 months ago

Written by Cheng-Wei Lee (clee2 [at] mines [dot] edu)


Installing Alloy Theoretic Automated Toolkit

  1. Download the source file from the (e.g. atat3_36.tar.gz)

  2. upload the file to HPC

  3. decompress the .tar.gz file

tar -zxvf atat3_36.tar.gz

"3_36" is the version number

  1. change the directory into the folder

cd atat
  1. check the makefile within the folder and change the path to binary file (BINDIR) if need

  1. The default path way is ~/bin/ which should be added to $PATH (the default for Kestrel)

  2. Make sure you have g++ , which is provided on Kestrel by default

Then it's time to compile the source code. With the provided makefile, we only need to

make 

and if there are no error messages

make install

Sanity check of compiling

echo $?

If it returns 0, it indicates no error message. The binary like mcsqs can be found in ~/bin/

Preparing input for mcsqs

Here, we are using the Monte Carlo (mcsqs) approach to find the special quasi-random structures (SQS) that match the correlation of random distribution

To start with, we need a "lat.in" file which defines the parent structure. The one for wurtzite AlN is provided below as example

3.1284 0.0000 0.0000
-1.5642 2.7093 0.0000
0.0000 0.0000 5.0153
1 0 0
0 1 0
0 0 1
0.667 0.333 0.500 Al=0.08333333,Gd=0.91666667
0.333 0.667 0.000 Al=0.08333333,Gd=0.91666667
0.667 0.333 0.881 N
0.333 0.667 0.381 N

The first six lines define the lattice vectors. The first three lines form a 3x3 matrix M1, which consists of the lattice parameters of the unit cell you want to run SQS with. The following 3 lines form another 3x3 matrix M2. M2 is usually the identity matrix. The final lattice vectors in matrix form will be M1xM2. Here's another example of rocksalt AlN with different M2.

4.983 0.000000 0.000000
0.000000 4.983 0.000000
0.000000 0.000000 4.983
0.000000 0.500000 0.500000
0.500000 0.000000 0.500000
0.500000 0.500000 0.000000
0.500000 0.500000 0.500000 N
0.000000 0.000000 0.000000 Al=0.08333333,Gd=0.91666667

In most cases, we can use M2 as the identity matrix. In cases like the unit cell we want to run SQS with have not correct periodic boundary (?), we will need to apply different M2 values to translate/ rotate it.

The remaining lines define the basis and the elements. "Al=0.08333333,Gd=0.91666667" is where we can define the Gd content for AlGdN alloys

  1. we need sufficient decimal digits for the fractional numbers (e.g. 8 digits)

  2. The chosen fraction should give integers when multiplied by the number of atoms in SQS

Another required input is the files that describe the correlation between atoms. It can be generated using corrdump, which requires lat.in

corrdump -l=lat.in -ro -noe -nop -clus -2=4.5 -3=3.2; getclus
  1. -2 and -3 define the cutoff radius for what are included as two- and three-body clusters based on the given lat.in structure. Two-body cluster usually consider cations-cations distance, and three-body interaction consider cations-anion-cations.

  2. The two-body cluster we chose is -2=4.5, which is the cut off radius that include the first nearest neighbors (NN) - distance Al-Al = 3.09Å and 3.13Å, and the 2nd NN - distance Al-Al = 4.40Å

  3. The three-body cluster we chose is -3=3.2, which is the cut off radius that include the 1st NN - distance Al-N-Al = 3.09Å and 3.13Å

  4. We should always check the distance in the chosen crystal structure to decide on these cut off radii

corrdump will create two files, sym.out and clusters.out, which will be needed for the monte carlo simulation.

With lat.in, sym.out, and clusters.out, we can run the mcsqs next

Running Monte Carlo simulation to find SQS

The typical prompt for mcsqs is shown below

mcsqs -l=lat.in -n=48
  1. Make sure mcsqs is located in the directory whose path is added to $PATH

  2. -n=48 defines the size of SQS. 48 is chosen since we use the increment of 1/12 and we want larger enough of SQS

  3. We need to perform a convergence test with respect to SQS cell size to minimize the mismatch in correlation functions for those 2-body and 3-body clusters

To fully utilize all the cpus of a given node. Here's an example SLURM script for Kestrel, which has 104 cores/node

#!/bin/bash

#SBATCH --job-name="wz SQS Al=0.25,Sc=0.08333333,Gd=0.66666667"
#SBATCH --account=multiferro 
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=104
#SBATCH --time=04:00:00
#SBATCH -o stdout
#SBATCH -e stderr
#SBATCH -p short

# Go to the directoy from which the job was launched
cd $SLURM_SUBMIT_DIR

for i in {1..104}
do
    seed=$RANDOM
    mcsqs -l=lat.in -n=48 -ip=$i -sd=$seed & 
    echo $i, $seed >> seed_record
done

wait

The idea is to initial parallel MC simulations with different initial seeds.

Generate SQS with a specific supercell

mcsqs can generate supercell with very slanted shapes and one way to address this is to specify the supercell via a sqscell.out file but with the caveat that it could require larger supercell to reach desirable mismatches.

Here's the modified flag to run mcsqs:

mcsqs -l=lat.in -rc

and here's an exemplar sqscell.out file for the 3x3x2 supercell

1

3 0 0
0 3 0
0 0 2

Analyze the MC simulation results

The goal of the MC simulation is to find a structure that has a distribution of atoms that perfectly match the correlation function of selected 2- and 3-body clusters. During the mcsqs simulation, there are three outputs: mcsqs.log, bestsqs.out, and bestcorr.out

  1. mcsqs.log records the evolution of the MC simulation but only the ones with lower objective functions will be added to it. The mismatches are shown in this file

  2. bestsqs.out is the SQS that best match the correlation function of the clusters

  3. bestcorr.out save the correlation function values for the best SQS

The goal is to find a SQS with not only low objective function but also small mismatches. It is more important to have lower mismatches if two SQS have similar objective function

Examples of mismatches in clusters for 48-atom, 72-atom, and 96-atom SQS created for wz-Al1Gd11N12 alloys

# 48-atom
Correlations_mismatch=  0.055556        -0.027778       -0.027778       -0.027778       -0.027778       -0.027778       0.004630        0.004630        -0.078704       -0.078704       0.087963        0.087963
# 72-atom
Correlations_mismatch=  0.027778        -0.027778       0.027778        -0.027778       -0.027778       0.027778        0.032407        0.032407        0.032407        0.032407        0.032407        0.032407
# 96-atom
Correlations_mismatch=  0.013889        -0.027778       0.013889        -0.027778       -0.027778       0.013889        0.004630        0.004630        0.004630        0.004630        0.004630        0.004630
  • 48-atom has some clusters with large mismatch, i.e. number > 0.04

  • 72-atom one is acceptable

  • 96-atom SQS is the best among the three

The bestsqs.out can be converted to VASP POSCAR using the

➡️
official website
sqs2poscar code