Elastic Constants in Al
Purpose
In this tutorial two of the three independent elastic constants in Al are calculated. Build the input file yourself, or copy the repositories’s ctrl.al.
This tutorial also explains a few features of lmf:
 The basis set is tuned.
 explains how charged densities are mixed as it proceeds towards selfconsistency calculation
 shows how to compute shear constants c_{11}−c_{12} and c_{44} in Al.
 Briefly describes commands to create energy bands and densityofstates
Command summary
The tutorial starts under the heading “Tutorial”; you can see a synopsis of the commands by clicking on the box below.
$ mkdir si; cd si #create working directory and move into it
$ cp lm/doc/demos/qsgwsi/init.si . #copy init file
$ blm init.si express #use blm tool to create actrl and site files
$ cp actrl.si ctrl.si #copy actrl to recognised ctrl prefix
$ lmfa ctrl.si #use lmfa to make basp file, atm file and to get gmax
$ cp basp0.si basp.si #copy basp0 to recognised basp prefix
$ vi ctrl.si #set iterations number nit, k mesh nkabc and gmax
$ lmf ctrl.si > out.lmfsc #make selfconsistent
Preliminaries
The input file uses some features of the preprocessor (mainly it uses symbolic variables), so you may wish to go through the standard lmf tutorial,first.
This tutorial explains in more detail the input file, and the workings of the
lmf basis set.
Executables blm, lmfa, and lmf are required and are assumed to be in your path.
Tutorial
This tutorial gives a brief outline as to the commands and procedures required to use the lmf program for users who may have experience with the program already. More detailed instructions can be found in each section should you require them.
Note: All instances of al in the command lines can be replaced with ctrl.al_, depending on what your input file has been named.
1. Building The Input File
It is assumed for the tutorial that the specific categories in the input file are known. The sample input file for Al is provided here.
The input file and all of its categories are properly explained here.
2. Getting Started: Analyzing The Results Of A Band Pass
Use lmchk to verify:

The preprocessor works as advertised:
lmchk al showp
For example, the line containing RSMH= should have been turned into
RSMH=1.8,1.8,1.8 EH=.1,.1,.1

Invoke:
lmchk al
And verify from the output that the sphere overlap is about 0.6% (a safe number) and that sumofsphere volumes equals about 75% of the total cell volume.
Use lmfa to generate densitites for the free atom. Atomic densities will be overlapped to make a first trial density for the solid (Mattheis construction).
lmfa al
Invoke lmf in a non selfconsistent mode:
lmf al vhf=1
3. Optimizing The Basis Set

One can optimize RSMH efficiently with:
lmf al –optbas
You can take the result of the optimized calculation (saved in basp2.ext) and copy them to your input file. Or, you can have lmf automatically read these parameters from file basp; tokens in HAM_AUTOBAS control what lmf reads from this file, and what lmfa writes to it.

We might consider the effect of enlarging the basis, which as we noted we can do from the commmand line with vbigbas=1. Do this:
lmf al vbigbas=1 vhf=1
Read more about basis sets here.
4. Selfconsistent LDA calculation
A fully selfconsistent fullpotential calculation can be preformed by invoking:
lmf al > out
Now the output density is generated. With the output density, the HKS energy functional can be evaluated. Also the log derivative parameters P are floated to the band centersofgravity. How the P’s are floated is prescribed by tokens IDMOD.
A new density is constructed as follows:

The output density is screened using the model Lindhard function, provided the Lindhard parameter ELIND is nonzero:

An estimate for the selfconsistent density is made by mixing n_{in} and n_{out}^{*} using some mixing scheme.

The resultant density is saved in rst.ext, unless you specify otherwise using –rs=.

At the end of the iteration, the total energies are printed and checks are made whether selfconsistency is achieved to tolerances specified by ITER_CONV and ITER_CONVC. The RMS DQ generated at the mixing step is the measure compared against tolerance CONVC; the change in energy from one iteration to the next is tested against tolerance CONV. Both tolerances must be satisfied, unless you set CONV=0 or CONVC=0 (0 tolerance tells lmf not to test that parameter).
Look at this page for LDA calculations.
5. Shear constants
This section shows how to calculate two of the three independent shear constants in Al. We first calculate c_{11}−c_{12}, which we will do by computing the total energy at different lattice distortions, and fitting the curvature of the total energy. The tetragonal distortion is conveniently generated using the line
SHEAR=0 0 1 1+dist
which distorts the lattice in a way that conserves volume to all orders (this is useful because it tends to be less errorprone). The direction of distortion is set by the first three parameters; the lattice will be sheared along (001).
The first difficulty is that our specification of the FT mesh using token GMAX may cause the program to switch meshes for as parameter dist changes. This is a bad idea, since we want to resolve very small energy differences. So, the first step is to comment out the line with GMAX=gmax in the input and use instead:
FTMESH=10 10 10
The second difficulty is that the shear constants in Al are difficult to converge, because they require many kpoints. The following steps are written in ‘tcsh’ and compute the selfconsistent total energy parameterically as a function of ‘dist’:
rm f out save.al
foreach x ( 0.04 0.03 0.02 0.01 0 0.01 0.02 0.03 0.04)
rm f mixm.al wkp.al
lmf al vdist=$x vnk=24 pr20,20 >>out
end
Note that the mixing file eigenvalue weights file (mixm.al and wkp.al) are deleted for each new shear calculation. File save.al contains total energies ehf for 9 values of dist using 24 divisions of kpoints. (To properly converge the calculation use nk=32 or even nk=40.)
Extracting ehf and ehk parametrically as a function of dist is very easy with the vextract tool:
cat save.al  startup/vextract c dist ehf > dat
The key ‘c’ tells vextract that you want lines beginning only with ‘c’: these lines correspond to band passes when selfconsistency was reached. You can use any regular expression for the key. You can ask vextract to extract any quantity associated with a variable in the file.
A trigonal shear will yield c_{44}. To compute it, replace the SHEAR token with:
SHEAR=1 1 1 1+dist
Both of these elastic constants depend on the fitting procedure with an uncertainty of about 5%. A careful calculation would use more points dist and increase nk. The final shear constant, the bulk modulus, you can calculate by varying the lattice constant. We do not do it here, but if you do this, you are advised to use token STRUC_DALAT, rather than change ALAT (see the following note).
6. Other things to read and do
You can generate and plot the energy bands using lmf. It proceeds in the same way as in the ASA tutorial. Generate the band file this way:
cp startup/syml.fcc ./syml.al
lmf al band:fn=syml
The generation of the corelevel spectroscopy, Mulliken analysis or densityofstates is done first by invoking lmf with the appropriate commandline switch, followed by lmdos. The lmdos step is illustrated (including a way to plot results) in the ASA tutorial.
To compute the density of states, see this tutorial. To compute corelevel EELS spectra or Mulliken analysis in Fe, try running
fp/test/test.fp fe 2
To compute total or partial DOS in hcp Co, try running
fp/test/test.fp co 2
Edit This Page