Skip to content


module avail wien2k/

WIEN2k computes the electronic structure of solids. It is based on the Density Functional Theory (DFT). It comprises full crystal potential and uses the Linearized Augmented Plane Wave method, LAPW.


Wien2k is a commercial product -- every user should have it's own (private) license (see license terms and conditions).


Including the version 14.1, the program directories are accessible only for the users which sent us a proof of holding the license.


If you need to use k-point parallelization, you need to generate .machines file to working directory. For file generation you can use the script wien2k_machines, eg:

/software/wien2k-14.2/wien2k/wien2k_machines > .machines

Since version wien2k-12.1 does not yet implement MPI parallelization. However, it uses the parallelization of Open MP. Your task will use so many processors how many you specify in the qsub command. For example, for two-processor task you submit:

$ qsub -l select=1:ncpus=2:mem=1gb ...

Do not use the -p switch when using run_lapw. Just

export SCRATCH=.
run_lapw -cc 0.0001 -i 90 
echo y  | clean_lapw -s

is enough for computing on more processors.


Q: There are processes left on machines after calculations.

A: Depends which mode of calculation you use.

For interactive job you just simply look if there are some processes left on machines after finishing your task. These then can be canceled using:

$ echo y | clean_lapw 
$ echo y | cancel_lapw

For batch job, you should add to your running script this line:

trap 'echo y | clean_lapw; echo y | cancel_lapw ' SIGTERM

Q: How to use WIEN2k only in text regime only (no graphics)?

A: It is possible. The problem is, that the w2web interface does not work on your local computer. In fact, you must launch a graphic browser iceweasel directly on the MetaCentrum machine. You may temporarily try to use non-graphic browser lynx or its later version links. This works.

$ lynx

After pressing the key 'g' in lynx, you may specify the adress:

There, you can specify your struct file, run a calculation and so on. There is another way to specify your structure file, like this:

$ cp $WIENROOT/SRC_templates/case.struct ./myStructFile.struct

Some examples of structure files can be found in $WIENROOT/example_struct_files

After editing structure file you may initialize your structure in text regime using

$ init_lapw

Q: How to make calculations using WIEN2k if one has graphic support.

A: Log in for examle on

$ ssh -X

In your home directory, create the directory TiC and launch Wien2k. For example:

$ pwd 
$ mkdir TiC 
$ cd TiC 
$ module add wien2k 
$ w2web

Running first w2web: The computer asks you your user name and password. Choose non-trivial password (different from your MetaCentrum password). If there is an announcement:

w2web failed to bind port 7890 - port already in use!

You may want to try w2web -p portnumber

Then you should erase the w2web profile and try another port:

$ rm -r ~/.w2web 
$ w2web -p 7891

If this happens, very probably some other user has forgotten to kill the process of his w2web. We kindly ask you not to forget to kill the process of w2web after finishing your work:

$ ps -u USERNAME 
19082 pts/0 00:00:00 bash 
19141 ? 00:00:00 w2web 
19142 pts/0 00:00:00 ps 

$ kill 19141

Then launch the browser iceweasel on (for example)

$ iceweasel &

In the address field, type (eventually higher number of port 7891 or more, if 7890 is in use).

After typing your user name and password, you follow-up the WIEN2k Usersguide.

You can use the XCrysDen code to visualize your structure files and other task in WIEN2k.

Q: sgroup crashes when initializing my structure

A: This was the problem in old version wien2k-05. Use higher version wien2k-12.1 or at least wien2k-08:

$ module rm wien2k-05  
$ module add wien2k-12.1

Q: First iteration crashes (after lapw0) and there is error announcement in file case.dayfile: Segmentation fault

A: Before doing run_lapw or runsp_lapw type to command line (or add to your running script):

$ ulimit -s unlimited

This works for default bash shell. If using csh or tcsh, type

limit stacksize unlimited

(The following command tells your which shell you are using)

echo $SHELL

Q: I get the message: L2main - QTL-B Error

A: Have a look at WIEN2k FAQ page concerning this.

Q: How do I know which version of WIEN2k I am currently using:

A: By:

$ module list


$ which run_lapw

Safe mode to switch the WIEN2k versions is:

$ module rm wien2k-08
$ module add wien2k-12.1

Q: I want to make an immediate calculation now.

A: Firstly, it is forbidden to make calculation directly on frontends.

Simply use the interactive job.

$ qsub -q normal -l nodes=1:ppn=1:nfs4,mem=1gb -I 
qsub: waiting for job to start

wait a minute ...

qsub: job ready

and you are on (for example) node skirit28.

$ hostname

$ pwd 
$ cd /storage/plzen1/home/manik/TiC 
$ module add wien2k-12.1
$ ulimit -s unlimited 
$ export SCRATCH=. 
$ run_lapw -cc 0.000001 -i 90

Wait till your calculation finishes and then tidy up your job:

$ clean_lapw 
$ exit 
qsub: job completed

Q: Is there any default running script for WIEN2k?

A: Yes. When submitting this script, you must be in the case directory of your calculation.

#PBS -j oe
module add wien2k-12.1
ulimit -s  unlimited 

echo "Your directory is $PBS_O_WORKDIR" 

export SCRATCH=.
run_lapw -cc 0.0001 -i 90 
echo y | clean_lapw > /dev/null