WIENTips
Tips page for the LAPW code WIEN97 and WIEN2K.
Tip Quick Clicks:
Manual Generation of k-point Meshes
Automated Band Structure
Automated Density of States
Automated Charge Density Plots
File Utilities
Moment Analysis
Automated Input Files Generation for Orbital Calculations
(LDA+U etc.)
Amended
x script
Inaccuracy in the optical integration fixed
Electron Dynamics
Manual Generation of k-point Meshes
(IIM 3/30/05)
If you want to be able to generate a given N1xN2xN3 k-point mesh,
edit the program basdiv.f in SRC_kgen by adding the following lines before
the last END statement:
100        write(*,*) "Input new mesh (n1,n2,n3): "
                Read(*,*) N
                NMSHP=(N(1)+1)*(N(2)+1)*(N(3)+1)
and the following line before the first executable statement
            if(NMSHP.le.0)goto 100
And run make in the same directory (and copy the kgen executable to your WIEN directory).
Now if you give 0 or negative total number of k-points, the program will switch to the manual regime.
Automated Band Structure
(JMS 2/28/02)
Script for generating the band structure of a system without user intervention.
The calculation is carried out in a separate directory to eliminate the
possibility of corrupting the ground state data. Works for most lattices
provide the appropriate list of wave vectors is in your WIEN directory.
Accepts a ton of options; the script is self-documented so read it. It
can also be used to set up the band structure calculation without actually
running lapw1 (useful for big jobs which are not run interactively), for
spin-polarized calculations, for band character plotting, spin-orbit calculations,
etc. Executed as bandcalc [-up|-dn] in the case directory.
Script:  ; bandcalc
Auxiliary Scripts Used:  ; mgp_line
Distribution
of case.klist files. Unpack into your WIEN directory.
Contact the contributors: JMS (Privacy Advisory)
Automated Density of States (JMS
2/28/02)
Script for generating the density of states without user intervention.
Script is self-documented, so read it. Can be used with spin-polarized
calculations and to set up jobs without actually running them. Executed
as doscalc [-up|-dn] in the case directory.
Script:  ; doscalc
Contact the contributors: JMS (Privacy Advisory)
Automated Charge Density (JMS
2/28/02)
Script for generating the charge density. This version produces the
planar charge density for slices through the unit cell. Executed as denscalc
in the case directory.
Script: denscalc
Contact the contributors: JMS (Privacy Advisory)
File utilities (JMS 2/28/02)
Distribution of useful scripts for copying various files (input files
and executables) and cleaning up the case directories. Very simple
and use at your own risk.
Cleaning:  ; clean
Book-keeping:  ; copy
Contact the contributors: JMS (Privacy Advisory)
Spin Moment Analysis (JMS
2/28/02)
Two scripts useful for analyzing the distribution of spin moments in
the unit cell. The scripts are executed as getmom [case] and getmom2
[case] where case is the case prefix for the WIEN calculation. getmom
reports
detailed information about the distribution of moments for the last iteration
(atomic projection, interstitial, total, etc.) whereas
getmom2 reports
the total moment in the unit cell for every iteration. Both scripts only
need the case.scf file.
Last Iteration:  ; getmom
Every Iteration:  ; getmom2
Contact the contributors: JMS (Privacy Advisory)
Automated Input File Generation for
Orbital Calculations (LDA+U etc.) (IIM 3/5/02)
WIEN2k includes several option involving orbital-dependent potentials:
three flavors of LDA+U, two of the orbital polarization correction (not
that I endorse using it), and SO calculations in an external field. These
need two new input files, .indm and .inorb, with complicated syntax, and
they have to agree with each other. I wrote a fortran-90
program (here is the executable),
which ask questions in plain (Russian-)English language, and generates
the files. Other useful scripts: my version of magnetic moments and energies
monitor
(this is an awk script), a processor
for .output1[up|dn] files, which generates a gnuplot script for plotting
the bands and the corresponding datafiles (spin polarized case is detected
automatically; no fatbands yet). Here is the executable.
The last goodie is my version of the scfmonitor.
It takes as an argument any string which can be read as $1 by awk from
an .scf file. It requires my version of the analyse (called, of
course, analyze).
Contact the contributors: IIM (Privacy Advisory)
Amended x script (IIM 4/5/02)
I found that the :log file, generated by the "x" command in
the  ; WIEN2k does not print out actual options, used when the command
was invoked. It makes debugging more difficult. I amended the script
in this respect.
Contact the contributors: IIM (Privacy Advisory)
Joint DOS calculations (IIM 9/1/04)
It appears that the program joint implements the conventional
terehedron interpolation only for the delta-functional part of the optical
integral (if you do optics, you know what I am talkig about), but not
for the theta functions. This makes k-point convergence horribly slow.
A fix for this is available here.
It includes a modified version of the file arbdos.f
and an additional file opt1.f. These have to be placed into the SRC_joint directory and the makefile should be modified to include opt1
(alternatively, it may be attached to noculc.f.
Contact the contributors: IIM (Privacy Advisory)
Electron Dynamics (JMS
2/28/02)
In addition to the above scripts I have available a number of other
routines for various electron dynamics calculations including:
1) Evaluate the wave vector and frequency dependent dielectric
function.
2) Evaluate the various local field factors (charge channel, ferromagnetic
and paramagnetic)  ; (Fxc=d2Exc/dn2,
Jxc=d2Exc/dm2, Ixc=d2Exc/dndm)
3) Fourier tranform of Bloch States.
4) Plot the Bloch States.
5) Evaluate matrix elements of the form < k,j | Exp[i(q+G).x]  ;
| k+q,j'>
6) Evaluate matrix elements of the form < k,j | q,j' | k+q,j'' >
7) Evaluate the Coulomb potential in the Bloch basis < k,j | v |
k,j' >
8) Evaluate the Exchange-Correlation potential in the Bloch basis <
k,j | vxc  ; | k,j' >
9) Evalute the Exchange-Correlation kernel (Fxc, Ixc, Jxc) in the Bloch
basis < k,j | Fxc | k,j' >
10) Evalute the wave vector and frequency dependent Green's function
in the momentum representation.
And many, many more.
For these it would be easier to contact
me directly so we can discuss the application you have in mind.
Contact the contributors: JMS (Privacy Advisory)
Last updated 28 Feb 2002