In previous years, we used Wien 2k rather than OpenMX to do the class DFT project. This old page is available because some of the FAQ are relevant, and there is some info about XCrysDen and unix that may be useful.
Wien 2k is a commercial program that calculates dispersion relations, density of states, partial density of states, and other properties of crystalline solids. 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.
There is online documentation at this site, most notably
as well as much other information under the “reg users” link.
Prof. Guenter Schneider and I are also working to implement a more user-friendly interface using flair, the DFT code Dr. Schneider has written, and gem, a Python-based graphical interface.
Wien 2k runs on a server in the physics department; you will have access via your web browser. We refer to the server as the “Physics server”, the “Wien server”, and sometimes the “Jansen server”. All these terms are synonymous. To access the Wien2k program via the web, you must have an account on the Physics server (onid, cosine, physics accounts do not work). Accounts have been set up for you; the account names (also your userid) are ph575_nn where nn = 01 to 35. The account names and passwords can be found on blackboard under the “my grades” section. Before you can access Wien via the web you must set up your account correctly (see Initalization below). Your account can also be accessed via a UNIX terminal, which can be useful to manipulate your account and files independently of the web browser. Please note the lowercase 'p' in the account name. The account names originally assigned had uppercase 'P', which is incorrect.
After initialization (see below), point your browser to:
http://wien-server.physics.oregonstate.edu:100nn and nn
is the number in your your account/userid (e.g. for ph575_15, nn=15, so use 10015 and for ph575_01, nn=01, use 10001). You'll get a box that asks for your user_name/user_id and password (find these on Blackboard under grades). A screen comes up where you can create a new session or return to old one.
Your account must be properly initialized before the above procedure will work. Initialization is required again if there is a power outage in Weniger Hall (frequent), or if there is a system crash (rare). To initialize, follow these instructions to access your account to run a program called w2web
.
ssh -X ph575_nn@wien-server.physics.oregonstate.edu
w2web
w2web server started, now point your web browser to http://wien-server.physics.oregonstate.edu:100nn
-X
in the ssh command above if you simply want to manage files or run w2web
. However, if you want to run XCrySDen (see page: XCrySDen), which needs the X-Window environment, you need the -X
. Notice that it is a uppercase letter X
, which is a different flag from a lowercase x
.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.
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 like, or something different. You must then select that directory.
Run the structgen
program, from the left margin, under Execution
. Tell the program how many distinct atoms in the unit cell (2 for TiC). 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 (these are found in a CIF file, which is located elsewhere). Z = atomic number. You can enter Z, 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 the default value at first. You can change it, but be sure that sum of RMT of 2 adjacent atoms is smaller than interatomic spacing. Use the more familiar eV and Å units - check that these are selected. Once the data are all entered, click on the button that enters the data and follow screen instructions.
You can view the structure you've created with the view structure
command, but ONLY if you have an X-terminal open to your wien-server account to allow you to run the graphics on the wien-server (see XCrysDen).
Run “initialize” from left margin. This is tedious, and you're basically clicking, saving (don't forget to “save”) and continuing. For some of the commands, you may get the following message
Invalid null command.
or
hup: Command not found.
These errors come from using certain distributions of Linux. The distribution we use does not recognize the “hup” command. However, this error has no effect on Wien2k and you should just ignore it.
The only place you MUST do something is at the x kgen
command, where you tell the program the number of points in k-space at which 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.
There is a button check case.in_st
that will open the file case.in_st. The bottom line of this file is something like
K-VECTORS FROM UNIT:4 -7.0 1.5 emin/emax window
You can change the energy min and max here if you later find that you do not have DoS info in the appropriate range.
Wien's strength and weakness is its extreme modularization. You can control different aspects of the program very easily, but mostly the defaults work, so this leads to lots of apparently mindless clicking and saving that at first you don't understand. This can be frustrating, but don't worry, once you become familiar with the program, it won't be so frustrating, and you may even appreciate the flexibility.
SCF = Self Consistent Field. Run from left margin. Here is where the program generates the eigenvalues and eigenfunctions. It 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 the current cycle. The reload in reverse order
command is useful.
Under Tasks
.
Density of states
option and follow instructions (also see manual).edit case.int
button. Here you can set the min and max energies for the DoS plot, the number of partial DoS you want (e.g. you want Total DoS, Ti_total pdos, Ti_s pdos, Ti_p pdos, C_total pdos, C_s pdos, C_p pdos ⇒ set Number of DoS cases
to 7; then set the atom number and the column appropriately). The manual is helpful here. case.dos1eV
, case.dos2eV
, case.dos3eV
(case = TiC or whatever you've named the directory). It depends on how much data you generate whether all files are full. Click on Files
in the left margin and click on the show all files
option that appears. You'll see ALL the files (in alpha order). Bandstructure
program (see below), then decide to run the DoS program again, you may get an error (the reason is that the bandstructure & DoS programs use a different type of k-mesh or k-grid, and they overwrite each other). The fix is to run lapw1
from the Execution/single prog
menu.
(Also known as dispersion relation or spaghetti diagram.) Under Tasks
.
Follow instructions; they are quite straightforward.
case.klist
. For the bandstructure program, Wien generates a different k-mesh stored in a file called case.klist_band
. Wien has prestored 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. X-windows is needed to run X-CrySDen
and it seems XCrySDen is not going to run, you must reset the w2web
as described in XCrySDen via the Wien2k interface.case.klist_band
file: If you have an X-terminal open, XCrySDen should open up if you select Generate k-mesh using XCrySDen
on the Bandstructure menu. You should see the Brillouin zone, with high-symmetry points labeled as dots on the boundary. You can rotate the structure with the mouse. Click on the special points (they appear on the right when you select them and some will be labeled). Click 'OK' when you have the path you want. Then enter total number of k-points along the path. 50 is a good number to start with. Now save the file as xcrysden.klist
. Go back into Wien2k and under Task » Bandstructure, and choose from xcrysden
from the menu. When prompted to overwrite the case.klist_band file, click “yes”.Generate k-mesh using XCrySDen
does not bring up XCrySDen, log in to the Wien2k server with an X-terminal (see Access Wien 2k via the web above). Go into the directory in which you are running your simulation. For example, if you are doing silicon in the WIEN2k/Si/ directory, enter 'cd WIEN2k/Si/'. Next, enter 'xcrysden' in the terminal. Once xcrysden opens, go to File → Open Wien2k … → Select k-path. It will ask you to choose the case directory. It should be the default one you went into in the beginning. You should see the Brillouin zone, with high-symmetry points labeled as dots on the boundary. You can rotate the structure with the mouse. Click on the special points (they appear on the right when you select them and some will be labeled). Click 'OK' when you have the path you want. Then enter total number of k-points along the path. 50 is a good number to start with. Now save the file as xcrysden.klist
. Go back into Wien2k and under Task » Bandstructure, and choose from xcrysden
from the menu. When prompted to overwrite the case.klist_band file, click “yes”. Now you can continue as normal.lapw1
in the single prog
menu. This should fix the problem. (Seems not to be a problem in the current version of Wien).case.insp
file. The Fermi energy is listed in the file header, and you need to enter this number in the file itself where you see the “xxxx”. e.g. You see in header the line
/home/janet/TiC/TiC.scf: EF (TETRAH.M.)= 0.71285
and in the file itself
2 xxxx # Fermi switch, Fermi-level (in Ry units)
Copy and paste the 0.71285 to the xxxx. Save and continue. When you get the plot, the Fermi level will be labeled “0”, and this will indicate where 0.71285 Ry was in the calculation (though your plot will be in eV if you selected the eV energy option). Note there are other plotting parameters you can change, too.
In the left margin there is a Files»»
link. »»
means “more options”. When you click on it, it will change to ««Files
indicating that 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 the computer TA - he can tell what's running and can kill processes.
After a calculation, there will be large files that take up space. The computer TA has set up limits on the amount of hard drive space each user can use. The soft limit is 15 GB and hard limit is 17 GB. If you use up 15 GB, it will give you warnings. Once you reach 17 GB, you can no longer write any more information onto the disk. In particular, the case.vector
files are large and not needed after results are calculated. Use the clean lapw
command (under the Utilities
menu) to reduce unwanted files. If you ever want to do a modification, just do a new iteration (run the lapw command, and it will do only 1 iteration and recreate all the missing files). For example, if you want to rerun optical
you must have the original k-mesh and the case.vector
file.
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 intended by the end of this.
UNIX or Linux Users: You don't need this section!
Mac Users: Newer Macs have Unix as part of their operating system. Run the Terminal
program, which is in Applications/Utilities folder. If you want to run any program that needs the X-Window environment (such as XCrySDen), you must run X11, found in Applications/Utilities or you can download it for free from Apple.
PC Users: Windows users can use either Cygwin-X or Putty. Cygwin-X can be downloaded at http://www.cygwin.com/install.html and putty.exe can be downloaded at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. Cygwin-X and putty work with all versions of Windows. If you want to run XCrySDen with Wien2K, you have to use Cygwin-X. Cygwin-X installation is given in the XCrySDen page. Be sure to load the package that has the ssh command. In the program menu, go to Cygwin-X → Xwin Server. This should open up a “X-Terminal” program.
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 ph575_nn@wien-server.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.
All users:
ssh ph575_nn@wien-server.physics.oregonstate.edu
nn
is a number from 01 to 31, which you were assigned in class, and which is listed on BB.
Last login: Thu Mar 19 ……………….
Have a lot of fun
ph575_nn@wien-server: >
ph575_nn@wien-server: > w2web
The system will direct you to point your browser to the appropriate web url.
You can see most of the files pertinent to Wien via the Wien 2k web portal (look under the Files
menu, and expand the Files
menu for more options) but sometimes you need to see a bit more. From a terminal, log on to the server and look at your files that way. Here 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 (tells where you currently are) |
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” |
cd .. | change directory to a level up from the current one |
rm myfile | remove the file named “myfile” from the the working directory. Remember there is no recycling bin, so be careful |
cp myfile /home/ph575_nn/TiC | copy myfile in the current directory to a directory called /home/ph575_nn/TiC . |
mkdir Docs | make a directory called Docs |
ps -u janet | list all processes being run by user janet (displays a number XXXX with each) |
kill XXXX | kill the process identified by the number XXXX (see below) |
If you need to kill a Wien2K job from the terminal environment (remember you can also “kill the process” using the bomb icon that you see from the Web portal), first enter the following in a terminal
ps -u ph575_nn
←- your account name here
and something like below will appear
27186 ? 00:00:02 w2web
to kill the job identified by the job number 27186 in the first column, enter the following into the terminal
kill 27186
See the frequently asked questions page for answers to questions that might not be covered here.
Jeff will write this section with explanation of how to set up accounts on the server.