The ASA Green's function program lmgf
Purpose
This package implements the local spindensityfunctional theory, in the Atomic Spheres Approximation using Green’s functions.
The implementation is built into code lmgf, which plays approximately the same role as the LMTOASA band program lm. However it has functionality lm does not. It can
 Calculate magnetic exchange interactions
 Calculate magnetic susceptibility (spinspin, spinorbit, orbitorbit parts)
 Calculate properties of disordered materials, either chemically disordered or spin disorder from finite temperature, within the Coherent Potential Approximation [1], or CPA.
 Calculate the ASA static susceptibility at to help converge calculations to selfconsistency.
Table of Contents
 Purpose
 Introduction
 Structure of Green’s function program
 Energy Contours, Potential Shifts and the Determination of the Fermi Level
 GF specific input
 lmgfspecific commandline arguments
 Test cases and examples
 The Coherent Potential Approximation
 Spectral function calculations with lmgf
 Notes
 References
Introduction
The Green’s functions are constructed by approximating KKR multiplescattering theory with an analytic potential function. The approximation to KKR is essentially similar to the linear approximation employed in band methods such as LMTO and LAPW. It can be shown that this approximation is nearly equivalent to the LMTO hamiltonian without the “combined correction” term. With this package a new program, lmgf is added to the suite of executables. lmgf plays approximately the same role as the LMTOASA band program lm: you can use lmgf to make a selfconsistent density as you can do with lm. A potential is generated from energy moments , , and , in the same way as the lm code. lmgf is a Green’s function method: Green’s functions have less information than wave functions, so in one sense the things you can do with lmgf are more limited: you cannot make the bands directly, for example. However, lmgf enables you to do things you cannot with lm, as described at the beginning of this document.
Structure of Green’s function program
lmgf runs in much the same way as lm. The band pass routine of lm, bndasa.f, generates the eigenvalues and eigenvectors, which can in turn generate the quantities of interest. bndasa is replaced by a Green’s function routine, gfasa. gfasa can generate output moments, DOS, densitymatrix, etc., in the same way as bndasa does.
In contrast to band methods (implemented in lm) where the Hamiltonian is energy independent and all the bands are generated by diagonalizing H, Green’s functions are calculated for a specific energy; information is extracted from for a particular energy.
This fact highlights the strengths and weaknesses of a Green’s function approach. Energyintegrated properties such as the moments, must be obtained by integrating over energy. Calculating explicitly at a family of energies is more cumbersome than diaonalizing a hamiltonian. On the other hand, Green’s function methods are naturally suited to contexts where the energydependence is needed anyway. CPA theory yields an energydependent potential; Green’s functions are a natural way to implement it. Similarly, noninteracting susceptibilities can be expressed as G×G (`×’ implies either convolution or product, depending on the space you are working in).
lmgf always loops over some energy contour; what contour you use depends on the context as described below. gfasa accumulates various kinds of data for each mesh point, such as the point’s contribution from energy moments used in an ASA selfconsistent cycle. Finally, an estimate for the Fermi level is determined using a from Pade approximation. If the original guess for is sufficiently close, the cycle is finished as in lm. If the estimate is too far off, a new energy mesh is taken and the process is repeated.
Energy Contours, Potential Shifts and the Determination of the Fermi Level
For energyintegrated properties, a very fine energy mesh would be required if the energy integration was carried out close to the real axis. It is much more efficient to deform the integration contour into an elliptical path in the complex plane, approaching the real axis only at the lower and upper integration limits.
To integrate quantities over occupied states, integration to the Fermi level E_{F} is required. E_{F} is not known but must be fixed by charge neutrality. Thus must be guessed at and iteratively refined until the charge neutrality condition is satisfied. lmgf does not vary E_{F}; the user specifies it at the outset. Instead lmgf looks for a constant potential shift that satisfies charge neutrality; this must be searched for iteratively. Both the potential shift and are maintained in a file vshft.ext. Inspection of vshft.ext may look unecessarily complicated; it’s because you can use the file to add sitedependent shifts. vshft.ext is also used by the layer Green’s function code lmpg, which requires extra information about shifts on the left and right leads.
Metals and nonmetals are distinguished in that in the latter case, there is no DOS in the gap and therefore the Fermi level (or potential shift) cannot be specified precisely.
Metal case (set by BZ_METAL=1): once the  and energypoints are summed over and the deviation from charge neutrality is determined, the code will attempt to find the potential shift that fixes charge neutrality.
It finds the Fermi level in one of two ways:

Using a Pade approximant, lmgf interpolates the diagonal elements of G. The interpolation is used to evaluate the GF on the starting elliptical contour shifted rigidly by a constant, and the shift is iterated until the chargeneutrality condition is satisfied. At this stage, there are two possibilities:
1. repeat the integration of over and the energy contour with the constant shift added to the potential.
2. Assume that the Padeapproximant to the diagonal is a sufficiently good estimate for the actual .
If the potential shift is larger than a userspecifed tolerance (see padtol in GF_GFOPTS below), option 1 is taken and the Pade shift reevaluated. A new Pade estimate is made for the potential shift requiring charge neutrality, and it is tested once against the userspecified tolerance.
When the shift falls below the tolerance, option 2 is taken and lmgf proceeds to the next step. The user is advised to monitor these shifts and the deviation from charge neutrality.

The charge is integrated in a contour near the real axis subsequent to the elliptical contour. In this mode, the determination of the potential shift is accomplished by continuing the integration contour on the real axis starting from the originally estimated Fermi level. A trapezoidal rule is used (or Simpson’s rule using a Pade approximate for the midpoint), and new energy points are computed and integrals accumulated until charge neutrality is found. There is no iterative scheme as with the Pade approximation. This option tends to be a little less accurate than the Pade, but somewhat more stable as it is less susceptible to interpolation errors.
One last comment about the METAL case: by default the program will save the potential shift to use in the next iteration. You can suppress this save (see frzvc below), which again can be less accurate, but more stable. In particular, if you are working with an insulator where stability can be an issue (determination of the Fermi level is somewhat ill conditioned), a stable procedure is to use this option together with second energy integration scheme described above (the integration contour on the real axis).
Nonmetal case (set by BZ METAL=0): lmgf will not attempt to shift the potential, or ensure charge neutrality. The user is cautioned to pay rather closer attention to deviations from charge neutrality. It can happen because of numerical integration errors, or because your assumed Fermi level does not fall within the gap. You can use METAL=1 even if the material is a nonmetal.
Some details concerning how lmgf works internally
For each energy point, the BZ integration is accomplished by routine in gf/gfibz.f, which loops over all irreducible points, generating the “scattering path operator” and the corresponding for all the points in the star of to generate a properly symmetrized . Within the ASA, secondgeneration LMTO, is converted to proper Green’s function , corresponding to the orthogonal gamma representation by an energy scaling. The scaling is carried out in routine gf/gfg2g.f. Next the various integrated quantities sought are assembled (done by gf/gfidos.f). The potential shift to satisfy charge neutrality is found, and stored in vshft.ext. The I/O is handled by routine subs/iovshf.f.
GF specific input
Energy integration
Green’s functions are always performed on some energy contour, which is discretized into a mesh of points in the complex energy plane. (A description of the various kinds of contours this code uses is documented in the comments to gf/emesh.f.) is “spikey” for energies on the real axis (it has poles where there are eigenstates).
The BZMESH token
To compute energyintegrated properties such as magnetic moments or the static susceptibility, the calculation is most efficiently done by deforming the contour in an ellipse in the complex plane.
At other times you want properties on the real axis, e.g. densityofstates or spectral functions. You specify the contour in category BZ as:
EMESH= nz mode emin emax [other args, depending mode]
where
nz number of energy points
mode specifies the kind of contour; see below
emin,emax are the energy window (emax is usually the Fermi level)
Right now there are the following contours:
mode=10: a Gaussian quadrature on an ellipse. This is the standard mode for integrating over the occupied states.
EMESH= nz 10 emin emax ecc eps
ecc is the eccentricity of the ellipse, ranging from 0 (circle) to 1 (line)
eps is a 'bunching' parameter that, as made larger, tends to bunch points near emax.
As a rule, e2=0 is good, or maybe e2=.5 to emphasize points near the Fermi level.
After the integration is completed, there will be some deviation from charge neutrality, because emax will not exactly correspond to the Fermi level. This deviation is ignored if METAL=0; otherwise, the mesh is rigidly shifted by a constant amount, and the diagonal GF interpolated using a Pade approximant to the shifted mesh. The shifting+interpolation is iterated until charge neutrality is found, as described in section 2. If the rigid shift exceeds a specified tolerance, the Pade interpolation may be suspect. Thus, the entire cycle is repeated from scratch, on the shifted mesh where the shift is estimated by Pade.
mode=0: a uniform mesh of points between emin and emax, with a constant imaginary component.
EMESH= nz 0 emin emax Imz [... + possible args for layer geometry.]
Imz is the (constant) imaginary component.
This mode is generally not recommended for selfconsistent cycles because the GF has a lot of structure close to the real axis (small ), while shifting off the real axis introduces errors. It is used, however, in other contexts, e.g. transport.
mode=110: is a contour input specific to nonequilibrium Green’s function.
The nonequilibrium Green’s function requires additional information for the energy window between the left and right leads. (The nonequilibrium Green’s function is implemented for the layer geometry in lmpg.) Thus the integration proceeds in two parts: first an integration on an elliptical path is taken to the left Fermi level (as in mode=10). Then an integration over is performed on the nonequilibrium contour, i.e. the energy window from the left to the right Fermi level. This integration is performed on a uniform mesh close to the real axis, as in mode=0. For the nonequilibrium contour, three additional pieces of information must be supplied:
nzne number of (uniformly spaced energy points on the nonequilibrium contour
vne difference in fermi energies of right and left leads, ef(R)ef(L)
delne Imz on the nonequilibrium contour
The mesh is specified as
EMESH= nz 110 emin ef(L) ecc eps nzne vne delne [del00]
The last argument plays the role of delne specifically for computing the selfenergy of the left and right leads. There is an incompatibility in the requirements for in the central and end regions. The same incompatibility applies to transport and is discussed in the following section.
mode=310: Alternative Pade approximant in finding Fermi level.
a Gaussian quadrature on an ellipse to a trial emax, as in mode 2. However, the search for the Fermi level is not done by Pade approximant, as in mode 10. Instead, a second integration proceeds along a uniform mesh from emax to some (Fermi) energy which satisfies charge neutrality. This procedure is not iterative.
EMESH= nz 310 emin emax e1 e2 delz
e1 and e2 are just as in mode 10
delz is the spacing between energy points for the second integration on the uniform mesh.
mode=2: is the same contour as mode=0. However, it is designed for cases when you want to resolve the energy dependence of some quantity, such as the DOS or magnetic exchange coupling. These are discussed in the GF category below.
Modifications of energy contour for layer geometry
When computing transmission coefficients via the LandauerButtiker formalism, one chooses a contour as in mode=0. However, there is a problem in how to choose . A small is needed for a reliable calculation of the transmission coefficient, but using a small to determine the surface Green’s function may not succeed because the GF can become long range and the iterative cycle used to generate it may not be stable. To accommodate these conflicting requirements, a surfacespecific should be used, called del00. The mode=0 mesh is specified as
EMESH= nz 0 emin emax delta xx xx xx xx del00
delta is Im z for the central region; del00 is for the surfaces.
Entries xx have no meaning but are put there for compatibility with the contour used in nonequilibrium calculations. (A similar situation applies to the nonequilibrium part of the contour).
The mesh for selfconsistent nonequilibrium calculations is
EMESH= nz 110 emin ef(L) ecc eps nzne vne delne del00
Green’s function category
lmgf requires a GFspecific category.
GF MODE=1 GFOPTS=options
The GF_MODE token
MODE=n controls what lmgf calculates. Options are MODE=1, MODE=10, MODE=11, MODE=26, described below.
MODE=1 goes through the selfconsistency cycle, calling gfasa. It performs a function analogous to bndasa in the band program, generating output density, moments, and other quantities such as densityofstates.
Taken with the special integration contour mode=2 (see EMESH above), the densityofstates and its integral are computed and tabulated over the window specified.
With the following sample input segment:
% const ef=0.025725
BZ EMESH=5 2 {ef} {ef+.002*4} .001 0
The integration will be tabulated for five points ef, ef+.002, ef+.004, ef+.006, ef+.008 like so (spinpolarized case)
Re z Im z spin dos idos
0.025725 0.001000 1 13.55272 0.00000
0.025725 0.001000 2 10.38435 0.00000
0.025725 0.001000 t 23.93706 0.00000
0.023725 0.001000 1 9.17407 0.02273
0.023725 0.001000 2 4.13694 0.01452
0.023725 0.001000 t 13.31101 0.03725
0.021725 0.001000 1 15.33776 0.04724
0.021725 0.001000 2 7.42200 0.02608
0.021725 0.001000 t 22.75976 0.07332
0.019725 0.001000 1 19.58433 0.08216
0.019725 0.001000 2 7.52708 0.04103
0.019725 0.001000 t 27.11141 0.12319
0.017725 0.001000 1 20.83078 0.12258
0.017725 0.001000 2 9.31350 0.05787
0.017725 0.001000 t 30.14428 0.18045
If the partial DOS is generated, the usual tokens in the BZ category specifying the window (DOS=) and number of points (NPTS=) are overridden by the parameters in EMESH.
MODE=10 invokes a special branch that computes magnetic exchange interactions using a linear response technique. (The source code has its entry point in gf/exasa.f.)
In particular, is computed for pairs of sites , where the J’s are the parameters in the Heisenberg hamiltonian
Thus, the J’s are coefficients to energy changes for small rotations of the spins. They can be computed from a change in the band energy; changes from small rotations are done analytically.
Taken with the usual elliptical integration contour, the J’s are computed by energy integration to the Fermi level. Taken with the special integration contour mode=2 (see EMESH above), dJ/dE is computed instead. There is a shell script
$ gf/test/getJq0z
(invoke with no arguments to see usage) that will collect some of the ouput for you into tables. The data are collected into file dj0dz. For an example illustrating this mode, invoke
$ gf/test/test.gf co 5
This test computes the exchange coupling both for the usual elliptical contour and resolves the energydependence of J in a small window near the Fermi level.
Often only some atoms are magnetic, and all that is desired are the exchange parameters J connecting a partial list of sites to its neighbors. This can be useful, even essential, for large systems because it can be very expensive both in time and memory to compute exchange interactions for all pairs. To compute exchanges only for a list of sites, use commandline argument
sites:pair:sitelist
For more details, see commandline arguments invoked with lmgf.
Caution. lmgf reads and writes a potential shift file vshft.ext which shifts site potential by a constant to cause the Fermi level to match what is specified by the input. This shift also gets added into the atom file; potential VES in line PPAR is adjusted. When calculating exchange interactions, vshft.ext is not read. However, the shift is preserved because they are held in the potential parameters section of the atom file. But if you run the atom part lm or lmgf and remake the PP’s from the moments (START BEGMOM=1), this causes estat potential to be remade, but the sphere program does not add the contents vshft (it is done at the start of the Green’s function calculation). The exchange parameters should be evaluated with the potential parameters generated by lmgf. If they are alternatively evaluated from the atom files generated by lm, the Fermi level needs to be aligned to the Fermi level of lm (or close to it; there are slight differences between Fermi levels generated by lm and by lmgf).
MODE=11 is an exchange branch that is run after MODE=10. It prints out the and does several other analyses.
Switch sites:pair:sitelist
applies to mode 11 as well as mode 10; see commandline arguments.
The GF_GFOPTS token
The GF category has a token GFOPTS=tag;tag;…, which causes lmgf to perform a variety of special purpose functions.
Options are entered as a sequence of tags delimited by a semicolons: tag1;tag2;… .
Tag  Purpose 
emom  generate the output ASA moments, needed for selfconsistency 
noemom  suppress generation of the output ASA moments 
idos  make integrated properties, such as the sum of oneelectron energies 
noidos  reverse of idos 
dmat  make the densitymatrix G_{RL,R’L’} 
sdmat  make the sitediagonal densitymatrix G_{RL,RL’}. The density matrix is written to dmat.ext. 
pdos  Make the partial density of states (this has not been checked recently). 
p3  Use third order potential functions 
shftef  Find charge neutrality point by shifting the Fermi level, rather than adding a constant potential shift 
frzvc  Suppress saving the constant potential shift used to determine charge neutrality 
padtol  Set the tolerance for maximum potential shift permissible by Pade interpolation, as described above 
The following are specific to the CPA:
omgtol  Tolerance in the Omega potential, CPA selfconsistency 
omgmix  How much of prior iterations to mix, CPA selfconsistency 
nitmax  Maximum number of iterations for CPA selfconsistency 
lotf  Learn onthefly 
specfun  Make spectral function 
specfr  Make spectral function resolved by site 
specfrl  Make spectral function resolved by site and l 
dmsv  Record density matrix to file 
dz  Shift Omega potential by dz 
sfrot  Rotate the GF in spin space by this angle around the y axis 
lmgfspecific commandline arguments
ef=# overrides upper limit of energy integration (Fermi level) and assigns to #
The following are specific to the exchange calculation modes 10 and 11:
sites[:pair]:sitelist Make the exchange parameters J_ij only for sites i in the site list.
In mode 11, option :pair means that only parameters J_ij where both i and j are printed.
Example: running lmgf using MODE=10 with this command line argument
sites:pair:1,3,5,7
generates J connecting sites 1, 3, 5 and 7 to all neighbors. See Syntax of Integer Lists for the syntax of sitelist.
Running lmgf using MODE=11 with the same sites argument will print out the exchanges just between pairs of these sites.
Running lmgf using MODE=11 without any sites argument will print out the exchanges between these sites and all neighbors.
wrsj[:fn=name][:scl=#][:tol=#] (mode 11 only)
Writes the Heisenberg exchange parameters in a standard format, suitable for use
in spin dynamics simulations.
fn=name writes to file 'name' (default name is rsj)
scl=# scales the parameters by #
tol=# writes only parameters with energy > tol
rcut=#
Truncates the range of the R.S exchange parameters ...
useful to assist in the determination of the effect distant neighbors.
2xmsh
When integrating over the BZ to estimate Tc from Tablikov formula, this option doubles the kmesh.
Can be helpful in testing kconvergence of the singular q>0 limit entering into the formula.
amoms=mom1,mom2,...
amom=mom1,mom2,...
This switch overrides ASA moments (which are automatically generated).
The first switch reads a vector of nbas moments, one for each site.
The first switch reads a vector of nclass moments, one for each class.
Sphere magnetic moments are tabulated in the printout at the end of mode 10, and the start of mode 11. If you are importing exchange parameters (file jr.ext , e.g. from the fullpotential code, you will want to supply the moments calculated from that program.)
Test cases and examples
This script:
$ gf/test/test.gf all
carries out a number of tests, which also demonstrate various branches of the code. To see the materials and corresponding tests try
$ gf/test/test.gf list
The Coherent Potential Approximation
The CPA implementation for substitutional alloys and for spin disorder follows the formulation explained in these References [1,2,3]. Particularly, see the description of the numerical implementation in Turek’s book.
CPA selfconsistency is based on iterating the coherent interactor Ω, which is a spindependent singlesite matrix defined for each CPA site at each complex energy point. The linear mixing of Ω can be interleaved with charge mixing steps. However, experience shows that much faster convergence can be achieved by iterating Ω at each zpoint until its misfit reaches a sufficiently low tolerance (say, 1d3), between charge mixing steps. In addition, it is better to skip charge mixing if sufficiently accurate chargeneutrality has not been achieved (the reason being that Ω is not Padeadjusted). There are a few parameters controlling Ω convergence, which are summarized below along with the recommended settings that work quite well in most cases. The Ω matrices are recorded in files omegaN.ext, where N is the number of the CPA site. A humanreadable version (with fewer decimal digits) is recorded in omhrN.ext.
CPAspecific input
To turn on chemical and/or magnetic CPA, additons are required to the SPEC and GF categories in the ctrl file.
SPEC category
Chemical Disorder. Additional species must be defined for chemical CPA, and their concentrations.
SPEC ATOM CPA= and C= together turn on chemical CPA for a particular species.
They specify which species are to be alloyed with this species, and the concentrations of the other species. For example,
SPEC ATOM=Fe ... CPA=1 4 5 C=0.5 0.3 0.2
specifies that species Fe (whenever it appears in the basis (defined in SITE category) in fact refers to a disordered site composed of three kinds of elements. Numbers following CPA= refer to indices in the SPEC category: thus “CPA=1 4 5” indicate that the three elements to be identified with sites referring to this species are the 1st, 4th, and 5th species declared in the SPEC category. C= indicates the concentrations of each species; the concentrations must sum to 1. In the example given, sites with species label Fe are composite elements with with 50% of species 1, 30% of species 4 and 20% of species 5 (up to 10 species may be given).
A CPA species may refer to itself. For example, if the Fe species above is the first species to be read from the ctrl file, then CPA=1 refers to itself. All other parameters like Z, R, will be taken from this species.
Spin Disorder. No additional species are required, but the number of orientations must be specified.
SPEC ATOM NTHET= turns on spin disorder for a particular atom type.
A species with nonzero NTHET can be listed as a CPA component, and it will be included as NTHET components with different directions of the local moment.
NTHET=2 specifies that there will be two CPADLM components with polar angles 0 and π. NTHET=N with specifies a vectorDLM model, for which N polar angles for the local moment direction are selected using the Gaussian quadrature for the sphere. (Axial symmetry is always assumed and the integral over the azimuthal angle is taken analytically.)
Combined Chemical and Spin Disorder. Either spin or chemical disorder may be specified; they may also be included simultaneously. If only CPA= is chosen, that species will be treated with chemical, not spin, disorder. If only NTHET= is chosen, that species be treated with spin disorder only. Specifying both means that the CPA will include both chemical and spin disorder. For example, in the above example for CPA, if SPEC ATOM=Fe includes a tag NTHET=2 (while species 4 and 5 have NTHET=0), species Fe describes a CPA site with 4 components: 25% Fe, 25% Fe with a reversed local moment, 30% species 4 and 20% species 5.
GF category
The following token turns on the CPA and/or DLM:
GF DLM= controls what is being calculated.
At present, these values are supported:
DLM=12: normal CPA calculation; both charges and Ω's are iterated
DLM=32: no charge selfconsistency; only CPA it iterated until Ω reaches
prescribed tolerance for each zpoint.
DLM=112: specialpurpose experimental branch (not documented)
The following are optional inputs:
GF BXY=1 turns on the selfconsistent determination of the
constraining fields for vector DLM calculations.
GF TEMP= supplies the spin temperature (not implemented yet)
Selfconsistency in Ω is controlled by the following tags supplied in GF GFOPTS:
lotf if present, Ω is iterated at each zpoint until converged to omgtol (recommended)
nitmax= maximum number of Ω iterations (30 is usually sufficient)
omgmix= linear mixing parameter for Ω (0.4 works well in most cases)
omgtol= tolerance for Ω
padtol= same meaning as usual, but note that Ω is not mixed unless padtol is reached
(1d3 is recommended for all CPA calculations)
dz= special branch, in which zpoints are shifted by dz along the real axis (experimental)
Recommended options:
GF GFOPTS=[...];omgmix=0.4;padtol=1d3;omgtol=1d3;lotf;nitmax=30
Compatibility with other features
Downfolding is supported. Note, however, that downfolding applies to the crystal Green’s function and not to individual CPA components. The downfolding options are taken from the first species appearing in the CPA list. Gamma representation is supported with a caveat. CPA does not allow random structure constants, which means that the screening parameters must be the same for all components on the same CPA site. In the present implementation, the screening parameters are taken from the first class listed for the given CPA site (for a DLM site this is angle #1).
LDA+U is not supported, and density matrices are not calculated for the components on the CPA site. However, the modes IDU=4 and IDU=5 are supported. The U and J parameters for these modes are taken from the first species appearing in the CPA list.
Broyden mixing for charged works fine if omgtol is set to a sufficiently low value. If Broyden mixing seems to act strangely, try to reduce omgtol. Charge selfconsistency in CPA may sometimes be difficult for impurities with low concentrations. (Note that an isolated impurity can be described by adding it as a CPA component with zero concentration.)
Atomic files
It is important to understand the atomic file handling with CPA. For a CPA site (say, species Fe) the code creates an atomic file per each CPA component. In the above example with SPEC ATOM=Fe … NTHET=2 CPA=1 4 5 there will be four atomic files: fe#1.ext for Fe with angle 0, fe#2.ext for Fe with angle π, fe#3.ext for species type 4, and fe#4.ext for species type 5. Note that fe#3 and fe#4 will not actually correspond to Fe atoms, but to those described by species 4 and 5. Because convergence can be delicate, it is always recommended to copy appropriately prepared atomic files before attempting a CPA calculation. In the above example, converge a Fe atom and copy the atom file to fe#1.ext and fe#2.ext; then converge species type 4 and copy it to fe#3.ext, and so on. For DLM with NTHET=N, make N copies of the atomic file: say, fe#1.ext, fe#2.ext, …, fe#N.ext.
Outputs
At the beginning of the run, some debugging information is printed, listing the indexing for the CPA sites. DLMWGTS lists the polar angles (0 for nonDLM classes) and weights for all CPA classes (this is also for debugging purposes). GETZV prints the total valence charge, which in CPA is generally not integer. Output for each CPA component includes the usual information (charge, local moment, etc.). Exchange constants J0 are automatically calculated for all CPA components using the linear response formula from Liechtenstein et al. (it can not be disabled, but the computational cost in any case negligible). Offdiagonal local moments and constraining fields are always printed out, even if DLM is not used. These include the diagonal local moment as well. All these moments are output, unmixed values. In the selfconsistent state the zcomponent should equal to the input moment.
At the end of the iteration Ω is mixed, and its misfit for each CPA site is printed out (see “Mixed Omega for site …”) The total energy is correctly calculated and printed out as ehk, as usual.
Partial densities of states
Partial DOS can be calculated as usual using contour type 2 and adding pdos to the GFOPTS tag. Note that in this case Ω needs to be converged anew at each point of the new contour. This destroys the old converged Ω file, so it is recommended to create a separate directory for a DOS calculation. The file dos.ext contains the usual information, but the data for CPA sites are averaged over components. The partial DOS for all components are separately recorded in files dosN.ext, where N is the number of the CPA site. The format of this file is the same as that of dos.ext, as if it described a system with M sites (where M is the number of CPA components). For example, for a binary CPA on site 2 with spd basis, file dos2.ext contains channels 1:6 for the first CPA component and channels 7:12 for the second CPA component. This file can be processed using pldos, as a conventional dos file.
Spectral Functions
lmgf can generate spectral functions. It is very useful way to see the broadening of states from disorder, and you can plot energy bands with it. This document explains how to make them and draw energy bands.
CPA Test case
To familiarize yourself with a CPA case you can run the following test case
your path to lm /lm/gf/test/test.gf fe2b
Spectral function calculations with lmgf
Spectral function have been implemented in lmgf v7.10 by Bhalchandra Pujari and Kirill Belashchenko (belashchenko@unl.edu). The details of the theory in the CPA case can be found in Ref [1].
How to calculate spectral functions?
The spectral function can be calculated both with and without CPA. 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 selfconsistent one).
 CPA selfconsistency 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, for example with the following options:
BZ EMESH=31 10 .9 0 .5 .0
GF MODE=1 DLM=12 GFOPTS=p3;omgmix=1.0;padtol=1d3;omgtol=1d5;lotf;nitmax=50
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 selfconsistency 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 selfconsistent at those points where the spectral function will be calculated.
Omega selfconsistency 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=1d6 is a good criterion. The contour type should be set to 2. Example input for this step is
BZ EMESH=150 2 .25 .25 .0005 0
GF MODE=1 DLM=32 GFOPTS=p3;omgmix=1.0;padtol=1d3;omgtol=1d6;lotf;nitmax=50
The highlighted parameters are of particular importance. lotf is required to iterate for convergence (and it is recommended to keep it enabled in all CPA calculations, including charge selfconsistency). It is also necessary to monitor the output file (set pr41) and make sure that the required precision has been achieved for all energy points. If convergence appears to be problematic, try to start with a larger imaginary part for the complex energy or reduce the mixing parameter omgmix.
Calculation of the spectral function should be done with EMESH set to the same mesh as used for selfconsistency, e.g.
BZ EMESH=150 2 .25 .25 .0005 0
GF MODE=1 DLM=12 GFOPTS=p3;omgmix=1.0;padtol=1d3;specfun
Important: If there are sites treated in CPA, the contour specified by EMESH should be kept exactly as in the previous step when CPA selfconsistency was performed.
In order to start the calculation, invoke lmgf with the band flag referring to the symmetryline file (same format as used for band structure calculation with lm):
lmgf «sys» band:fn=syml
where «sys» is the extension of the ctrl file. Once completed, the program will generate a spf.«sys» file containing the complete spectral function along the lines given in the syml.«sys» file. Other options included with band are currently not used.
Plotting of the spectral function
Upon successful completion of calculation spf.«sys» file will be generated. The file has the following format:
ZP KP SF_UP SF_DN
.
.
0.250 0.137 5.708839 4.742153
0.250 0.160 10.658114 4.844647
.
.
where ZP are the points on the energy contour, KP are the points of the Kmesh and SF_UP, SF_DN are the spectral functions for Up and Down channel respectively. The very first line of the file indicate the location of the high symmetry points of the Brillouin zone. User can utilize this information to visualize the spectral function using any desired graphics package. A small bash utility, SpectralFunction.sh, is given for the sake of convenience. This bash script uses Gnuplot to view and save the spectral function. Users with standard Linux/unix distro should be able to use it without special prerequisites. Typical output of the script is shown in the figure. Please see SpectralFunction.sh h for usage. (The file spf.«sys» should be renamed specfun.«sys» to be read by this script. See below why.)
Siteresolved spectral functions
Siteresolved spectral functions can be obtained by including the option specfr in GFOPTS. (It supersedes the option specfun.) A series of output files will then be generated, which contain the spectral function on each basis site . The file names are spfN.«sys», where N is the index of the site. The format of this file is the same as for spf.«sys», and it can be also plotted using the SpectralFunction.sh script (first rename to specfun.«sys»).
Notes
 Spectral function calculations can be run with MPI parallelization.
References
 I. Turek et al., Electronic strucure of disordered alloys, surfaces and interfaces (Kluwer, Boston, 1996).
 J. Kudrnovsky and V. Drchal, Phys. Rev. B 41, 7515 (1990).
 J. Kudrnovsky, V. Drchal, and J. Masek, Phys. Rev. B 35, 2487 (1987).
Edit This Page