Questaal Home

lmgf-cpa tutorial

This tutorial explains how to use the Coherent Potential Approximation (CPA) in the ASA Green’s function code lmgf. The CPA models disorder by treating a single site as a collection of atoms.

This code implements two forms of CPA: atomic disorder and spin disorder.

Table of Contents

Building the ctrl file

CPA documentation should explain all the steps we’re going to take; we advice you to read it before starting the tutorial.

First of all we need a control file adapted for CPA case. Create ctrl.perma that looks like:

# Lattice constant 3.57A (taken from RT data in Stremme's PhysLettA46) reduced by 0.2%
# Choose sc=1 for self-consistency, sc=0 for omega=sc on real axis, sc=-1 for spectral function
% const sc=1
% const a=6.73 nk=16 nl=3 cfe=.20 cni=1-cfe xcu=0 # xcu=0 => 2 components only
HEADER  Alloys of Fe and Ni with other elements
% const gamma=2
%ifdef sc==1
        EMESH=51 10 -.85 0 .4 0   # For self-consistency
        EMESH=501 2 -.5 .2  .001 0   #for dos
        ALAT={a} PLAT=  0 .5 .5  .5 0 .5  .5 .5 0
%ifdef xcu==0
        ATOM=Fe R/W=1 Z=26 CPA=1 2 C={cfe} {cni} MMOM=0,0,2
        ATOM=Fe R/W=1 Z=26 CPA=1 2 3 C={cfe}*{1-xcu} {cni}*{1-xcu} {xcu} MMOM=0,0,2
        ATOM=Ni R/W=1 Z=28 MMOM=0,0,1
        ATOM=Cu R/W=1 Z=29
SITE    ATOM=Fe POS=0 0 0
%const  nit=1
ITER    NIT={nit}  MIX=B5,b=0.05 CONV=1e-6 CONVC=1e-6
%const  gfmod=1
GF      MODE={gfmod} DLM={sc==1?12:32}
%ifdef sc==1
% elseifd sc==0
% else
% endif

Check the CPA documentation here. It explains carefully the additions to a control file required to turn on chemical and/or magnetic CPA. Additional species must be defined for chemical CPA, and their concentrations. It’s done in the SPEC category in the following way:

SPEC ATOM CPA= and C= together turn on chemical CPA for a particular species.

Look into control file. There we have

        ATOM=Fe R/W=1 Z=26 CPA=1 2 3 C={cfe}*{1-xcu} {cni}*{1-xcu} {xcu} MMOM=0,0,2
        ATOM=Ni R/W=1 Z=28 MMOM=0,0,1
        ATOM=Cu R/W=1 Z=29

It tells the code that our alloy consists of Fe, Ni and Cu, provides their atomic numbers. The first of the three lines also gives the concentrations for each of the elements: 1, which is Fe, for instance has concentration {cfe}*{1-xcu}. It is determined from the chemical formula and means we can vary the Cu and Fe concentrations from the control line. By default we have no Cu and 20% of Fe (see ctrl.perma):

% const a=6.73 nk=16 nl=3 cfe=.20 cni=1-cfe xcu=0

You can also see that we force some initial moment on Fe and Ni (see more info regarding it in ASA-tutorial). The following token turns on the CPA and/or DLM:

GF DLM= controls what is being calculated.
DLM=12: normal CPA calculation; both charges and Ω's are iterated
DLM=32: no charge self-consistency; only CPA it iterated until Ω reaches prescribed tolerance for each z-point.

If you look into the ctrl file you’ll see that we have both there: 12 and 32 depending on the value of sc since we’ll need to run it with each DLM = 12 and 32 one after another.

Same way as in for example ASA-tutorial (please try that tutorial first if you haven’t yet done so) you’ll need to create the structure file by doing (we’re going to run a set up for )

lmstr perma vnit=1 -vxcu=0.2 -vcfe=0.2 --pr35,25 --rs=1,0  | tee out.lmstr

Same as in ASA-tutorial we’re going to make the initial potential:

lmgf perma -vnit=0 -vxcu=0.2 -vcfe=0.2 --pr35,25 --rs=0,1

Spectral function calculations with lmgf

Please real carefully the CPA-documentation; it expains why you’ll need to run the following commands. The calculation is performed in 3 steps:

  • Charge self consistency. (The spectral function can be calculated for any potential, but it is usual to work with the self-consistent one).
  • CPA self-consistency in the coherent interactor (CPA only). Since is energy dependent, it has to be calculated for the energy points where the spectral function is needed. For drawing spectral functions this is usually a uniform mesh of points close to the real axis.
  • Calculation of the spectral function on some contour, usually a uniform mesh close to the real axis.

Charge self consistency is performed in the usual manner (make sure you get the ‘jolly good show’ sign at the end otherwise you need more iterations)

lmgf  perma -vnit=150 -vxcu=0.2 -vcfe=0.2 -vgamma=4 --pr35,25 | tee out.lmgf1

Note the EMESH mode (contour type) is elliptical (type 10). If CPA is used, the coherent interactors for all CPA sites are also iterated to self-consistency during this calculation, but this is done for the complex energy points on the elliptical contour. The following additional step is needed in this case to obtain self-consistent at those points where the spectral function will be calculated.

Omega self-consistency is turned on by setting DLM=32. In this mode only Ω for each CPA site is converged, while the atomic charges are left unchanged. It is important to converge Ω to high precision. Typically omgtol=1d-6 is a good criterion. The contour type should be set to 2.

Here we’ll need a symmetry file. You can copy lm/startup/syml.fcc (make sure you have the correct path there) to the folder you’re working in. The folder has symmetry files for different structures, e.g. syml.fcc, syml.hcp, etc). Let’s rename it:

cp lm/startup/syml.fcc syml.perma

Now run

lmgf perma -vsc=0 --band:fn=syml -vnit=1 -vgamma=4 -vxcu=0.2 -vcfe=0.2 --pr45,25 | tee out.lmgf2

Calculation of the spectral function should be done with EMESH set to the same mesh as used for self-consistency. We’ll make them by running

lmgf  perma -vsc=-1 --band:fn=syml -vnit=1 -vgamma=4 -vxcu=0.2 -vcfe=0.2 --pr45,25 | tee out.lmgf3

Plotting of the spectral function

Upon successful completion of calculation spf.perma file will be generated. The file has the following format. To plot the spectral functions you’ll need the following script: lm/startup/ Copy it to your working directory and run it as ./ .

It should create two files: perma_UP.png and perma_DN.png with the spectral funcrions for spin up and down. y-axis is in mRy.

They should look somehow like (up and down):

permaup figure.

permadn figure.

Now you can try to run different concentrations of Cu and Fe to see how it affects the Spectral functions.
Edit This Page