WIEN 2k Basic Instructions for PH575 students

Wien 2k is a quasi-commercial program that calculates dispersion relations, density of states, partial density of states, and other properties of crystalline solids. There is extensive online documentation, but it is quite extensive and can be hard to digest. Once you have access to the program via the web (see below), you will be able to access the documentation. The program is named Wien 2k (pronounced “VEEN-2-kay”) because it was developed by physicists in Vienna, Austria (“Vienna” is the English version of the German “Wien”), and the most recent modification of the program was in the year 2000. More information about the program is at the developers' website http://www.wien2k.at.

Computer Accounts

Wien 2k runs on Professor Henri Jansen's computer; you will have access via your web browser. In order to access the program via the web, you must have an account set up on Prof. Jansen's machine. Accounts have been set up for you, and you will be assigned one (to share with a partner) in class. The account names are ph575_nn where nn = 01 to 12. The passwords will be given to you in class. You can set up separate sessions, which allows you to work independently of your partner if you want. Before you can access Wien via the web (and also after a system crash), you have to set up your account correctly (see below). It can also be useful to be able to access your account and files independently of the web.

Computer support

I know a little UNIX, and I continue to learn as I help you. I am reasonably adept at Wien, but not an expert. Jason Vielma (vielmaj at onid dot orst dot edu) is a grad student in our department who does some of our computer support. He will help with computer support & UNIX issues (accessing accounts etc), but he is not officially assigned to the course, so he is not responsible for Wien issues. (He has just started using Wien himself, so he might be nice and offer some advice!). Prof. Guenter Schneider is an expert on all matters to do with computing and bandstructure. He has graciously agreed to be a consultant when we have problems. But please ask me first, since I don't want to overload him. Prof. Schneider and I are planning to make a better interface between Wien and the classroom.

Access Wien 2k via the web

Point your browser to: http://wngr403-unix2.physics.oregonstate.edu:78nn where nn is the same nn as in your userid. You'll get a box that asks for your user name and password. Enter ph575_nn where nn is your assigned number. Enter your password. A screen comes up where you can create a new session or return to old one.

Initialization

Your account must be properly initialized before this procedure will work. Initialization is required again if there is a power outage in Weniger Hall, or if there is a system crash (rare). You have to access your account and run a program called w2web. Open a UNIX terminal (see below under “managing your account”) and enter:

ssh -X ph575_nn@wngr403-unix2.physics.oregonstate.edu

You should get a happy message from the machine saying something like:

Last login: Fri Dec 8 15:51:04 2006 from wngr485-mac1.physics.oregonstate.edu Have a lot of fun…

Then, at prompt, type:

w2web

and you'll get lots of text ending with: w2web server started, now point your web browser to http://physics.oregonstate.edu/wngr403-unix2:78nn

  • You may omit the -X in the ssh command above if you simply want to manage files or run w2web. However if you want to run XCrySDen (see below), which needs the X-Window environment, you need the -X.

Find the manual

The Wien manual is available in html (opens in separate window) or pdf form. Look for it in the bottom left margin. It is very long, so don't print it all out, but the “getting started” chapter is useful to have on hand.

Running a calculation

Create (or reopen) a session

Once you're into the program, you'll be asked to create a new “session” (right box) or to open a previously-created session (left box). For your first example, create a session called TiC or TiCyourname or something similar. We'll work through Wien's example, which is TiC.

Create a directory

Within a session create a directory that lives in your home directory to do the calculation. You can call this TiC (same as the session name) if you want to, or something different. You must then select that directory.

Set up the structure files

Run the “structgen” from the left margin. Tell the program how many distinct atoms in the unit cell (2 for TiC). You must choose the correct spacegroup from the list in the scroll-down window (F for TiC). Enter the lattice parameter and the positions of the atoms (see manual). Z = atomic number. You can enter it, but program is smart enough to know it if you label the atom correctly. RMT = radius of the Muffin Tin. Program sets it automatically, and best to leave it at this at first. You can change it, but be sure that sum of RMT of 2 adjacent atoms is smaller than interatomic spacing. Once the data are all entered, click on the button that enters the data and follow screen instructions.

Initialize

Run “initialize” from left margin. This is tedious, and you're basically clicking, saving and continuing. There is merit in doing all these things, but it is not obvious to the novice. The only place to do something is in the “x kgen”, where you tell the program at how many points in k-space you want to generate the E(k) value. For basic density of states information, a few 10s to 100s is usually OK for semiconductors; 100s – 1000s for metals. Optimum number depends greatly on type of material, information you want, etc.

SCF program

SCF = self consistent field. Run from left margin. Here is where the program generates the eigenvalues and eigenfunctions. Can take anywhere from several minutes to several days depending on complexity of system. You will see the word “running” on the upper right of window while a program is running; “idle” when it is finished. Click on the “Dayfile” under “Utilities” – this will tell you how many cycles have been run and where you are in current cycle. The “reload in reverse order” command is useful.

Calculate Density of States

Under Tasks, there is a density of states option. Click on that and follow instructions. (Also see manual). Wien has a plotting option to show results, but you can also pull files across to your own computer and make your own plots, which is much better.

Spaghetti diagram (dispersion relation)

Also under Tasks. Follow instructions. Note that this program requires a different set of k-values than was used to generate the density of states. Wien generates set k-paths for fcc, bcc, hcp and cubic lattices, but if you want different paths, or have a lattice of different symmetry, you may need to use the program “Xcrysden” to generate the k-points for this part.

After you have run the spaghetti program, Wien will no longer rerun the DoS program because it now has the wrong set of k-points. You need to rerun “lapw1” in the “single prog” menu. This should fix the problem.

List your files (and kill unwanted processes)

In the left margin there is a Files»». link. »» means “more options” and when you click on it, it'll change to ««Files indicating you can collapse it. You'll see several different links including show all files; clicking on this lists all files, including processes that are running. A process that is running has a “bomb” icon next to it that you can click to kill a process. Please kill processes that should not be running - it is easy to fall into an infinite loop, and many people don't know that they're using up large amounts of CPU time and memory! There are lots of us, and we all need to use the system efficiently. If you're have trouble with slow access, email Jason - he can tell what's running and can kill processes.

Managing your account on the Jansen Server

This is a set of not-too-organized instructions that should help you manage your account. You may know your way around unix more than you wanted to by the end of this, but that is not all bad. I think the end justifies the means after all is said and done.

Talking to the UNIX server

UNIX or Linux Users: You don't need this section!

Mac Users: Newer Macs have Unix as part of their operating system. You need to run the Terminal program, which is in Applications/Utilities folder. If you want to run any program that needs the X-Window environment (e.g. XCrySDen below), you'll need to run X11, found in Applications/Utilities or you can download it for free from Apple.

PC Users: Windows users can use either Cygwin-X-LiveCD or Putty. The X-LiveCD can be downloaded at http://xlivecd.indiana.edu/ and putty.exe can be downloaded at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. X-LiveCD only works with Windows XP and putty works with all versions of Windows. If you want to run XCrySDen with Wien2K, you have to use the X-LiveCD. Begin by inserting the CD into your computer and a window labeled “Cygwin and X Windows Live CD” should appear. Hit “Next” and “RUN X FROM CD NOW! …” should appear with either a 3 or 2 button option mouse. There is an option for installing X, but it is not very reliable. Now it will initiate the Cygwin environment. It takes a minute or two. It is done when a windows labeled “X bash” appears and “Desktop>” appears in yellow lettering. Now look above to see how to run w2web or below to run XCrySDen.

If you are just running “w2web” it is recommended that you use Putty. It is simple and quick. If you are in Wngr 304, you will have to install Putty on your own account. It cannot be installed for all users at once. The file putty.exe takes only a few seconds to download. Next run putty.exe and a window labeled “PuTTY Configuration” should appear. In the bar that says “Host Name (or IP address)”, enter “ph575nn@wngr403-unix2.physics.oregonstate.edu” Below this bar is an option SSH that is already checked and that is why you do not have to enter it.

Once you have a terminal open, type

ssh ph575_nn@wngr403-unix2.physics.oregonstate.edu

nn is a number from 01 to 12, which you were assigned in class.

Now you will be prompted for your password. Enter it. You should get something of the sort

Last login: Thu Mar 19 ………………. Have a lot of fun ph575_nn@wngr403-unix2: > This is the command prompt on the machine running Wien2K. At this command prompt enter

ph575_nn@wngr403-unix2: > w2web

The system will direct you to point your browser to the appropriate web url.

Simple UNIX commands

You can see most of the files pertinent to Wien via the web portal, but sometimes you need to see a bit more. From a terminal, these are some commonly used commands. (There are lots of UNIX tutorials on the web. Here are simple ones from Rubin Landau of OSU Physics http://www.physics.oregonstate.edu/~rubin/nacphy/UNIX/ and from the University of Surrey: http://www.ee.surrey.ac.uk/Teaching/Unix/). .

pwd print working directory
ls list files in the working (current) directory
ls -l list long form of files in the working directory
cd TiC change directory to the one named “TiC”
rm myfileremoves the file named “myfile” from the the working directory. Remember there is no recycling bin, so be careful
“cp myfile /home/ph575_nn/TiC” copies myfile in the directory you are in to a directory called ”/home/ph575_nn/TiC.
“mkdir Docs” makes a directory called Docs

If you need to kill a Wien2K job from the terminal environment (remember you can also kill from the Web access), first enter the following in a terminal

“ps -ef | grep w2web | grep ph575_01”

and something like below will appear

ph575_01 4202 1 0 Mar26 ? 00:00:00 /usr/bin/perl /home/henri/WIEN2K/SRC_w2web/bin/w2web

ph575_01 10365 10334 0 11:50 pts/4 00:00:00 grep w2web

to kill the job enter the following into the terminal

“kill 4202”

The “4202” is the job number in the second column. You do not have to kill 10365, since this is searching for a job called w2web and it has nothing to do with w2web.

XCrySDen

XCrySDen (http://www.xcrysden.org/) is a very useful program that runs in the X-windows environment. It allows you to view a crystal structure in real space and in reciprocal space. It also allows you to pick paths in k-space so as to plot dispersion relations in Wien 2k. Unfortunately, we have not quite figured out how to make the band structure part of Wien access Xcrysden automatically, so you have manipulate files and this is a bit tricky the first time. We'll help you all you can. However, the electron density part of Wien does apparently access Xcrysden (at least according to Jason).

XCrySDen on the Jansen Server

You can run XCrySDen on the Jansen computer. If you are in a Linux environment, simply type xcrysden

From Windows XP (don't think it works from Vista), you have to use the Cygwin environment to access your account. At the prompt, type

ssh -X ph575_nn@wngr403-unix2.physics.oregonstate.edu xcrysden

From a Mac, use X11 to access your account. At the prompt, type

ssh ph575_nn@wngr403-unix2.physics.oregonstate.edu -X xcrysden

The -X option is necessary to activate the X-windows environment. If you forget it, you will be able to login to your account, but you won't be able to run XCrySDen. There was a time when I had to use a -Y option because -X gave a BadAtom error. I think the configuration of XCrySDen has changed since then.

Generate a structure in real and reciprocal space

Once XCrySDen is running, go to the File menu, select Open WIEN2k…, select Select k-path, click Close if a dialog box comes up, and you'll see the k-space image of your structure. You can also rotate it. If you click on the special points, you will generate a k-path, and the coordinates will appear in the box at the side. Click OK. Then you will have a box that lets you select how many k-points you want. This depends on the path you've chosen, but try about 10 points per leg of the path and see how that works. You'll have the option to save the file in .klist format in one of your directories. You will have to rename this file to case.klist_band (where case is the name of your directory, say TiC) for Wien to know to use it in the bandstructure calculation.

To look at your structure in real space, go to the File menu, Open WIEN2k Struct file. You'll get a list of your directories in Wien, and you select the one you're interested in, say TiC, then click OK. You'll get a list of the files in the TiC directory. Select the one called TiC.struct. Click OK. You'll be able to rotate the structure expand it and so on using the graphical interface. You can also look at the reciprocal space image from the Tools menu, by selecting Select k-path. This looks similar to the option described above, but it allows you to save the k-path only in a .kpf format, which Wien didn't seem to recognize. I don't completely understand this, but the method described above worked for me.

XCrySDen on your own machine

You can download XCrySDen from http://www.xcrysden.org/. Some configuration of the software will be necessary.

STUDENTS' TIPS

Enter comments here.

new section
new section

Personal Tools