Documentation: Abinit Tutorial (html)
You'll want to do tutorials 1, 2, and 3, however there is a problem with the local install of abinit on the H205 machines that prevents you from running any of the files for tutorial 3 or beyond. Anyways, work through 1 and 2 as instructed, and then read through 3 without actually running anything.
You can copy the input files into your own directories from /packages/abinit/share/abinit/tutorial/Input.
When editing the files as described in the tutorial use the command emacs -nw (name of the file to be edited). This allows you to edit the file within your terminal window just as in the NERSC setup.
Note: In your .files file, you'll need to make sure the path to the pseudopotential is correct. It should be /packages/abinit/share/abinit/Psps_for_tests/name (where name is the filename of the pseudopotential you want to run.
To run the abinit package for the first tutorial, use the command /packages/abinit/bin/abinit <(input file name i.e. t1x.files)>log1. This will run the package and output a log file called "log1" which will contain warnings and comments. It can be viewed using the emacs -nw command.
When you get to portion 1.4, the computation of the charge density, you will need to make a few changes to your t1x.files file as described in the tutorial. When you run the calculation, you will notice that if you have not been scrupulous with organization, that many files will have *_DEN appended. You want to chosse t1xo_den.
To run Cut3d, type /packages/abinit/bin/cut3d in the command line, and follow the prompts.
In order to progress beyond the tutorials, you'll need to get a NERSC account so that you can run calculations on Carver, a supercomputer in California. Talk to Josh and he'll begin the process. You can read more about the process here: NERSC Accounts
To log into carver, type the following line in your terminal: ssh vog.csren.revrac|emanresu#vog.csren.revrac|emanresu . The first thing to do is see if you can recreate the DOS of silicon as seen in the paper titled CALCULATED VALENCE-BAND DENSITIES OF STATES AND PHOTOEMISSION SPECTRA OF DIAMOND AND ZINCBLENDE SEMICONDUCTORS. You should be able to find it on Web Of Science. Create a directory named si (terminal: mkdir si) and then securely copy over your .files, input, and pseudopotential files (terminal: scp ude.drofrevah.retsulc-csnik.4sw|emanresu#ude.drofrevah.retsulc-csnik.4sw|emanresu:~/yourpath/filename ~/si). Note1: gedit will not work for files on Carver, therefore it's time to learn emacs if you haven't already. Note2: Don't forget to change your .files file with the new pseudopotential path. You'll now need to make a submission file; let's call it input.sub. Here is what the body should look like:
#PBS -l nodes=1:ppn=8,walltime=0:30:00
#PBS -N SiDOS
#PBS -j oe
#PBS -q interactive
#PBS -A m1031
module load abinit
mpirun -np 8 abinit < filename.files >& log
You'll note that the first six lines are commented out; however, when you submit this file into the queue, a script looks for the comments afer -l, -N, etc, to know how to run your job. The first line is specifying that we are using only one node, that there are eight processers per node (ppn), and that the job should run for no more than 30 minutes real time. Be aware that computational time is not free, and running a job on eight processors for 30 minutes will cause you to be charged for four hours of computational time. Furthermore, even if you don't use all eight processors during the calculation, you're still occupying them, and therefore will still be charged for all eight processors. As such, make sure that all of the processors are being used (k points will be distributed among the processors for parallel computation) when you submit a job, and ideally the number of k points will be an integer multiple of the number of processors you're using to maximize the amount of computation done versus the amount of computational time spent.
The -N line sets what your job will be named in the queue. The -j, -q, and -A lines all specify exactly how and where your job will be running. Ask Josh what these should be for you, as it's bound to change.
We then get to the part of the submission file that is being put into Carver's terminal. The first line brings you into your si directory. Abinit is then loaded, and your job is submitted with an almost identical line as you used previously. Note -np 8, which is specifying how many processors you are using. If you had to go up to two nodes and a total of 16 processors, only two numbers would change; nodes=2 and -np 16. Don't forget that in Carver's terminal you're in the si directory, as this can affect your pseudopotential path as stated in your filename.files.
In order to run a calculation, you'll put your submission file into the queue (terminal: qsub input.sub). Then, to check to see if the submission is running you can check its status in the queue (terminal: qstat | grep username). When a Q is displayed, your job has not yet begun to run, and when an R is displayed it is in the process of being run. When your calculations start to take a while, qstat is even more useful because it displays how much computational time you've used on the job, which you'll want to keep an eye on. Note: If you want to remove something from the queue - terminal: qdel jobID#, where the jobID# is displayed when you submit a job or when you check its status.
Back to the task at hand; creating the DOS and PDOS for silicon. In order for your file to give the DOS plot as an output, you'll have to add two additional input variables, prtdos 1 and occopt 3, to the standard t31.in file. These variables print the smeared total DOS plot and specify Fermi-Dirac smearing respectively. Also, don't forget to use the converged value of acell as given in the tutorial. Finally, use a 6x6x6 kpoint grid, as this will give you 28 kpoints. This is not an integer multiple of the eight processors you'll be using, however it's good enough for this job. After you've successfully outputted your _DOS file, copy it back onto an H205 machine (terminal: scp ~/si/filename_DOS ude.drofrevah.retsulc-csnik.4sw|emanresu#ude.drofrevah.retsulc-csnik.4sw|emanresu:~/). You can then visualize the plot with xmgrace (terminal: xmgrace -block filename_DOS -bxy 2:3). Note that column two is the index of energies and column three is the corresponding value for density of states, therefore we want a plot of two against three, which is exactly what the aforementioned code gives.
Now that you've made a DOS plot, try to make a PDOS plot. You will need to remove occupt as you will no longer be doing any smearing, and you will need to change prtdos 1 to prtdos 3, such that the partial DOS is printed instead of the total. In order to specify which partials you want, add natsph 2, because you have two atoms in your unit cell, iatsph 1, 2 , because you want the PDOS of both atoms, and ratsph # # where # = the Van der Waals radii of silicon in Bohr Radii. You can find vdW radii here, however all values are given in Angstroms, and therefore they need to be converted into Bohr Radii before putting then into your abinit file. Furthermore, you'll need to set shiftk to 0 0 0. More on this later (ADD!). Once you've produced the _DOS file, copy it back to an H205 machine and vizualize it using xmgrace (terminal: xmgrace -block filename_DOS -bxy 2:3 -bxy 2:4). These won't look much like the DOS in the paper, however this makes sense because it isn't smeared or smoothed in any way. You're now ready to move onto ß-SnWO4, so make a new directory in your home folder named snwo4 and copy your input, .files, and submission files over to it (terminal, while in the si directory: cp filename ~/snwo4/newfilename).
In order to make pseudopotentials for ß-SnWO4 and our compounds yet to come, you'll go to this site and select the element you need a pseudopotential for. You'll then create a text file of the page (e.g. for oxygen - terminal: wget ftp://ftp.abinit.org/pub/abinitio/Psps/GGA_FHI/08-O.GGA.fhi ), which will maintain all of the important formatting. Note: In your new input file you'll specify your atom types in a specific order. This order must correspond to the order that your pseudopotentials are given in your .files file. Also, to make calling them easier, you might want to rename them (terminal: mv 08-O.GGA.fhi newfilename).
Moving onto ß-SnWO4, we take a slightly different strategy whereby the calculation is done in two parts. The first is a purely SCF calculation and the second reads the _DEN file generated by the first and runs the PDOS calculation. The purpose of this is to allow calculation of the PDOS with a modified number of bands such that densities above the fermi energy are printed. It would be a waste of computational time to do this in one step because the increased number of bands will make the SCF calculation take longer while not improving it at all. To perform the first I made the following changes to my Si input file. First, all DOS related variables were commented out. The planewave cutoff energy, ecut, was changed from 8 to 35 because of the presence of metals. I added ixc 11, which specifies the use of the Generalized Gradient Approximation (GGA), and more specifically the Perdew-Burke-Ernzerhof GGA functional. Symmetries were indicated with four additional input variables; spgroup 198, brvlatt 1, spgaxor 1, spgorig 1 . 198 corresponds to P2 1 3, the space group of ß-SnWO4, and the other values are a function of the space group, given here. I removed rprim, as it prevented the space group from being recognized. In the "Definition of the Atoms" section, I set natrd to 4 and put it above xred where I input the four reduced coordinates given in the CIF. Immediately following xred, natom 24 was added as this is the number of atoms we will have in a full unit cell after all symmetry operations are completed. Also note that our 6x6x6 grid of kpoints now yields 24 kpoints. Since this computation is not exceedingly quick, go into your submission file and change nodes used to 3 and -np to 24. You'll also want to talk to Josh about no longer being in the Interactive queue and increasing your wall time above 30 minutes.