Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wien [2014/05/21 11:26] danielwien [2020/03/06 09:12] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +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 Basic Instructions for PH575 students ====== ====== WIEN 2k Basic Instructions for PH575 students ======
 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. 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.
Line 6: Line 8:
   * a 200+-page [[http://www.wien2k.at/reg_user/textbooks/usersguide.pdf|user's guide]]   * a 200+-page [[http://www.wien2k.at/reg_user/textbooks/usersguide.pdf|user's guide]]
 as well as much other information under the "reg users" link. as well as much other information under the "reg users" link.
-  * Also see {{:tutorial_fixed.pdf|Andrew Stickel's tutorial}}.  He is a former student who really got into the program and many of the sub programs.+  * Also see {{:tutorial_fixed.pdf|Andrew Stickel's tutorial}}, which covers more details on setting up Wien on windows machines.  He is a former student who really got into the program and many of the sub programs.
  
-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.  If you wish to be a guinea-pig for the flair/gem option, let me know **Flair/gem option not in 2014**.+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.
  
 ===== Computer Accounts ===== ===== Computer Accounts =====
Line 41: Line 43:
   * If you get a prompt asking for a username and password, then is likely your configuration got lost somewhere. Enter the same ph575_nn for user and same password as shell (for convenience). If it asks for a port number, enter the 100nn number. Hostname should be wien-server.physics.oregonstate.edu. Hit y for master node if it asks about it.   * If you get a prompt asking for a username and password, then is likely your configuration got lost somewhere. Enter the same ph575_nn for user and same password as shell (for convenience). If it asks for a port number, enter the 100nn number. Hostname should be wien-server.physics.oregonstate.edu. Hit y for master node if it asks about it.
  
-  * 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: [[#XCrySDen]]), which needs the X-Window environment, you need the ''-X''.+  * 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 page: [[:xcrysden|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''.**
  
  
Line 57: Line 59:
  
 ===== View Structure ===== ===== View Structure =====
-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 below under XCrysDen).+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|XCrysDen]]).
  
 ===== Initialize ===== ===== Initialize =====
Line 90: Line 92:
    - If you run the ''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.       - If you run the ''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.   
  
-===== Bandstructure (or dispersion relation or spaghetti  diagram) ===== +===== Bandstructure ===== 
-Under ''Tasks''.  +(Also known as dispersion relation or spaghetti diagram.) Under ''Tasks''.  
  
 Follow instructions; they are quite straightforward.   Follow instructions; they are quite straightforward.  
  
-  - "Bandstructure" requires a different set of k-values than was used to generate the density of states.  For DoS, Wien uses a k-mesh stored in ''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 "XCrySDento generate the k-points for this part.  +  - "Bandstructure" requires a different set of k-values than was used to generate the density of states.  For DoS, Wien uses a k-mesh stored in ''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|XCrySDen]] to generate the k-points for this part.  
-  - If you get a message from Wien2k that ' '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]] below.+  - If you get a message from Wien2k that ''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#XCrySDen via the Wien2k interface]].
   - To use XCrySDen to generate a ''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".   - To use XCrySDen to generate a ''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".
-  - If clicking ''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 webabove).  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.+  - If clicking ''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.
   - After you have run the spaghetti program, Wien may no longer rerun the DoS program because it now has the wrong k-mesh.  You should to rerun ''lapw1'' in the ''single prog'' menu.  This should fix the problem. (Seems not to be a problem in the current version of Wien).   - After you have run the spaghetti program, Wien may no longer rerun the DoS program because it now has the wrong k-mesh.  You should to rerun ''lapw1'' in the ''single prog'' menu.  This should fix the problem. (Seems not to be a problem in the current version of Wien).
   - You must enter the **correct Fermi energy** for the spaghetti plot to be generated.  There is a step where you must edit the ''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   - You must enter the **correct Fermi energy** for the spaghetti plot to be generated.  There is a step where you must edit the ''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
Line 127: Line 129:
 **UNIX or Linux Users**: You don't need this section! **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 (e.g. XCrySDen below), you must run X11, found in Applications/Utilities or you can download it for free from Apple.+**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|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 below in "How to get XCrySDen running on the Jansen server with Windows (via Cygwin-X)" section.  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.  Now look above to see how to run w2web or below to run XCrySDen.  +**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|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 "w2webit 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.+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**:  **All users**: 
Line 160: Line 162:
 |''cd ..''| **c**hange **d**irectory to a level up from the current one| |''cd ..''| **c**hange **d**irectory to a level up from the current one|
 |''rm myfile''|**r**e**m**ove the file named "myfile" from the the working directory. Remember there is no recycling bin, so be careful| |''rm myfile''|**r**e**m**ove the file named "myfile" from the the working directory. Remember there is no recycling bin, so be careful|
-|''cp myfile /home/ph575_nn/TiC'' | **c**o**p**y ' 'myfile' ' in the current directory to a directory called ''/home/ph575_nn/TiC''. |+|''cp myfile /home/ph575_nn/TiC'' | **c**o**p**y ''myfile'' in the current directory to a directory called ''/home/ph575_nn/TiC''. |
 |''mkdir Docs'' | **m**a**k**e a **dir**ectory called ''Docs'' | |''mkdir Docs'' | **m**a**k**e a **dir**ectory called ''Docs'' |
 |''ps -u janet'' | list all **p**roces**s**es being run by **u**ser **janet** (displays a number XXXX with each) | |''ps -u janet'' | list all **p**roces**s**es being run by **u**ser **janet** (displays a number XXXX with each) |
Line 167: Line 169:
 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 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 -ef | grep w2web | grep ph575_nn''    <-- your account name here+''ps -ph575_nn''    <-- your account name here
  
 and something like below will appear and something like below will appear
  
-'' +''27186 ?        00:00:02 w2web''
-ph575_01  4202      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 identified by the job number 4202 in the second column, enter the following into the terminal +
- +
-''kill 4202'' +
- +
-Note that you do not have to kill job number 10365, since this is searching for a job called ''w2web'' and it has nothing to do with w2web.   +
- +
- +
-===== XCrySDen ===== +
-“XCrySDen is a crystalline and molecular structure visualisation program, which aims at display of isosurfaces and contours, which can be superimposed on crystalline structures and interactively rotated and manipulated. It can run on most UNIX platforms, without any special hardware requirements.” +
--  www.xcrysden.org +
- +
-XCrySDen (http://www.xcrysden.org/) is a very useful program that runs in the **X**-windows environment and generates **Cry**stal **S**tructures and electron **Den**sities .  It allows you to view a crystal structure in real space and in reciprocal space.  Within the context of Wien2K and W2Web, XCrySDen is a program which may be used to select k-paths for band structure dispersion plots.  It may also be used interactively with Wien2K to generate Fermi surface images.  It should be possible to get XCrySDen to interface completely within W2Web, but you have to be logged in with a X-terminal with the '-X' option at the same time.  Without the Xterminal login, only selecting the k-path for bandstructure diagrams will work. Otherwise, it is necessary to manipulate some files manually and this is a bit tricky the first time.  (See below).  The XCrySDen website is very useful for quick instructions and for the Wien interface. +
-==== XCrySDen via the Wien2k interface ==== +
-Wien2k interfaces with XCrySDen to graph crystal structures, generate k-paths, plot electron density and so on.  For XCrySDen to run, you must be logged in to the wien-server via the xterm and xwinshell (Windows) or via X11 (Mac) **while you are running Wien in the Browser**.  If, despite your being connected to the server via an xterm,  Wien fails to call XCrysDen as you expect and gives a message ' 'X-Windows need to run XCrySDen' ', you must reset the the w2web interface.  (Sometimes, the interaction between the two programs quits without warning.)  +
-  * Open a terminal to the physics server (should be an X-terminal) +
-  * List the processes running under your userid using ' 'ps'+
-  * Kill and process called ' 'w2web'+
-  * List the processes again to be certain they're dead, and check that you are **unable** to access Wien2k via your browser. +
-  * Run ' 'w2web' '  +
-You should be able to access Wien2k via the browser (log in again) and XCrySDen and Wien should be talking again provided the X-terminal is still open. +
- +
- +
- +
- +
-  +
- +
-==== XCrySDen on the Physics Server ==== +
- +
-You can run XCrySDen on the Physics server by using the [[http://en.wikipedia.org/wiki/X_Window_System| X Window System]] protocol.  +
- +
-  * In a **Linux** environment, simply type +
-''xcrysden'' +
- +
- +
-  * From **Windows**, use a Unix emulator to access your account (see below for instructions on emulator installation). Once an Xterminal is open type: +
-''ssh -X ph575_nn@wien-server.physics.oregonstate.edu xcrysden'' +
- +
-  * From a **Mac**, use X11 to access your account (Applications/Utilities/X11).  At the prompt, type +
-''ssh ph575_nn@wien-server.physics.oregonstate.edu -X xcrysden'' +
- +
-Spring 2014 -- An update to Mountain Lion or Mavericks seems to cause xcrysden to break on MacOS systems. As of now there is no known way to make this work. (If you are able to get it working then please share!) +
- +
-=== How to get XCrySDen running on the Physics server with Windows (via Cygwin) === +
- +
-Cygwin is a UNIX emulation engine.  Aside from the main engine, additional ‘packages’ must be downloaded and installed.  Each package adds additional functionality to the emulation engine, all can be viewed and marked for download via the main Cygwin setup program. +
- +
-Go to http://cygwin.com/install.html and get the setup.exe file (download link in the beginning text of the webpage). +
- +
-Once you run the setup.exe file hit next> and then choose install from internet, next>. +
-Select install for all users and choose a root directory for Cygwin (i.e. where you want it installed).   +
- +
-Next choose a download location for storing temporary files related to the setup (just go with default folder if you have no other preference).  Select next>. +
- +
-Choose Direct Connection next>. +
- +
-Choose a website to download more needed files (specifically outlined below) from.  The ftp ones seemed to be quicker than the http.  Select next> and it should connect to the site and a select packages screen will appear. +
- +
-All the packages which may ever be needed are listed alphabetically below.  It is possible that the first package, cygwin, and the last one, xinit, are the only two needed for opening an X Windows terminal and running XCrySDen on the Jansen server, however the others are needed when running XCrySDen on your own machine.  Since the file size of each package is pretty small it doesn't hurt to download them all in case they may be called upon by the program in some way. +
-          * cygwin +
-          * bash  +
-          * bc +
-          * coreutils +
-          * gawk +
-          * grep +
-          * gzip +
-          * ImageMagick +
-          * less +
-          * mesa +
-          * more +
-          * opengl +
-          * openssh +
-          * tcltk +
-          * X-start-menu-icons +
-          * xterm +
-          * xinit +
- +
-Use the search box in the corner to locate these.  The easiest thing is to have the select package screen in category view mode (button upper right to change view).  Type in the search word for each package in the list above (e.g. cygwin).  After the word All at the top of the file structure tree click on the word Default so that it changes to Install.  This may download some unnecessary stuff but it is OK.  For the bc package using the search bar brings up a bunch of stuff since those letters appear next to each other in a lot of the available Cygwin packages. The only thing needed is bc: The GNU numeric…. under the utils heading.  Select next> and let it download and install any dependent files if needed (it will warn you if so).   +
- +
-You should be able to grab all the packages in one go, but if not continue to rerun the Cygwin setup.exe file with all the same initial root directory and download folder options until each has been installed. +
- +
-After completing the above steps, you should have two new program folders available within the program start menu, these are Cygwin and Cygwin-X.  The first contains one program Cygwin Bash Shell.  This is a UNIX command line interface, which is needed if you want to get XCrySDen running on your own PC (see below).  The second, Cygwin-X, contains a few programs.  The two we are concerned with are XWin Server and xterm.  Combined these programs allow a graphical user interface for a program running on the Jansen server (XCrySDen) to run on your PC.  +
- +
-To get the Physics server XCrySDen GUI running on your PC: +
- +
-- Start the program XWin Server. +
-- A window for xterm may appear automatically upon starting the server program, but if not then manually click on the program xterm (Start>Programs>Cygwin-X>xterm) to start one. +
- +
-Once within the xterm shell we are ready to ssh over to the Physics server.  If just the command: +
- +
-''ssh -X ph575_nn@wien-server.physics.oregonstate.edu'' +
- +
-is sent then you should be able to go back to the w2web interface in your web browser and the buttons under ElectronDensity and BandStructure will automatically send the commands to the Physics server to start XCrySDen.  Alternatively you could start XCrySDen right away by typing  +
- +
-''ssh -X ph575_nn@wien-server.physics.oregonstate.edu xcrysden'' +
- +
-as stated above in the section ‘XCrySDen on the Physics server’ for Windows use +
- +
-**A note about speed:** XCrySDen's speed depends on the speed of your internet connection.  From campus, XCrySDen seems to stream very smoothly, but from off campus locations the interface can lag significantly. +
- +
-==== Using XCrySDen ====+
  
-    * 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 what is described described in the "Bandstrucure" section above, but it allows you to save the k-path only in a **.kpf format, which Wien does not recognize**.   
-    * To generate **Fermi surfaces** go to the ''File'' menu, select ''Open Wien2K'', select ''Fermi Surface'' This process runs a ‘W2Web’ type interface to walk through the necessary programs and generate the appropriate files. 
  
-==== XCrySDen on your own machine ==== +to kill the job identified by the job number 27186 in the first column, enter the following into the terminal
-You can download XCrySDen from http://www.xcrysden.org/ Some configuration of the software will be necessary.+
  
 +''kill 27186''
  
  

QR Code
QR Code wien (generated for current page)