This is a guide on how to use DFT through Quantum Espresso and other software.

SLURM

You will see a jobscript.sh file as follows:

#!/bin/bash
#SBATCH --account=csd897
#SBATCH --nodes=1
#SBATCH --partition=shared
#SBATCH --ntasks-per-node=16
#SBATCH --time 02:00:00
#SBATCH -e err.%j
#SBATCH -o out.%j
#SBATCH --job-name nano110
#SBATCH --export=ALL
module purge
module load slurm
module load cpu/0.17.3b
module load gcc/10.2.0
module load openmpi/4.1.3
module load quantum-espresso/7.0
### Run QE
export OMP_NUM_THREADS=1
mpirun -n $SLURM_NTASKS pw.x < Al.scf.in > Al.scf.out

This is a file made to tell SLURM how to allocate resources to a specific task pw.x. SLURM (Simple Linux Utility for Resource Management) is what is known as a workload manager. It is typically used on large hardware systems with many computational nodes. In supercomputers, there is typically a master node, and worker nodes. SLURM has a daemon running on the master node that takes processes from its jobscript file and distributes them to worker nodes to be run.

In the file above #SBATCH specifies to SLURM how to distribute the tasks. Modules are then loaded to set up the computational environment (what libraries are accessible). Finally, pw.x is run in parallel on one core per node over a number of tasks equal to nodesntasks-per-node. pw.x (Plane-Wave Self-Consistent Field) is programmed with internal parallelization: it tells mpirun what tasks need to be run in parallel and mpirun works to distribute the tasks to the nodes. To understand this better, when the last line is called, SLURM goes throughout the supercomputer’s hardware and returns the allocated nodes to MPI (or SRUN as an alternative). MPI then tells SLURM what tasks to execute and where, based on the allocation, and SLURM will handle failed executions by trying to fix them or return a crash error. Once the tasks are executed, MPI will return the results back to pw.x which will create an output file.

pw.x is the “scientist”, MPI is the “CEO”, and SLURM is the “worker”.

.scf files

SCF stands for Self Consistent Field. Below is an example from our class:

&control
	calculation='scf'  # type of calculation
	restart_mode='from_scratch'  # not coming from previous calculation
	pseudo_dir = './'  # says what directory contains the potential
	outdir='./tmp'  # where to put temporary output files
		prefix='al'  # prefix for output names DO NOT FORGET TO CHANGE FOR NEW PSEUDOPOTENTIALS
	tprnfor = .true.  # primt forces on atoms
	tstress = .true.  # print stress tensor
/
	&system
	ibrav=0  # code 0 implies that the parameters will be manually specified
	nat=  1  # number of atoms in the unit cell
	ntyp= 1  # number of different atomic species
	ecutwfc =40.0  # (cutoff energy) max energy basis function (ignore all which are greater)
	occupations='smearing'  # good for materials with no band gap
	smearing='marzari-vanderbilt'  # low impact on total energy calculations
	degauss=0.05  # gaussian smear parameter
/
&electrons
	diagonalization = 'cg'  # conjugate gradient method
	mixing_beta = 0.7  # mixing factor, affects convergence
/
ATOMIC_SPECIES
	Al  26.98 Al.pbe-n-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS (crystal)  # fractional coordinate (0-1) of the Al atom.
    Al      0.00000000000000   0.00000000000000   0.00000000000000  ! //
CELL_PARAMETERS (angstrom)  # three vectors of the unconventional unit cell
   0.00000000000000   2.01952407106683   2.01952407106683
   2.01952407106683   0.00000000000000   2.01952407106683
   2.01952407106683   2.01952407106683   0.00000000000000
K_POINTS automatic
10 10 10 1 1 1  # specifies a 10x10x10 grid for sampling, [1 1 1] represents a half step shift in the sampling zone.

It is true that in bulk materials, only the reciprocal wave vectors are required to describe it, as the potentials resemble periodic functions when the number of periodically assembled atoms grow. In smaller systems, however, the potentials do not resemble periodicity. Therefore, more plane waves are required as a basis set. Curiously, when the unit cell shrinks from bulk to conventional, the k-space also increases. What is a good method to have enough basis functions is to keep the sample density the same. So, when the cell is as small as a conventional cell, the k-space is large, but your sample density is still the same. For example, a large cell may have a sample space of 1 1 1 while a small conventional cell might have a sample space of 10 10 10 where these specify the grid points within the first reciprocal unit cell.

The cutoff energy is another parameter that can help bound computational time. It eliminates any plane waves from being considered if they are above a certain energy - since an electron’s k-value determines its energy. Basis plane waves are generated by choosing a k-point and translating it by the spacing of a Brillouin zone. Eventually, the energy will be too large and it will be cut. In the end, we cannot evaluate infinite basis planes, thus we have the parameter ecutwfc.

A plot of both should be made to see where the graph of system energy vs k-points or cutoff energy levels out to see the optimal computational parameters. Right after the knee is the best point to choose because it has high enough accuracy at the minimum number of k-points and cutoff energy.

Bravais Lattice Cells

Bravais lattice unit cells come in three types: I, F, and P. When setting up a system, using a Bravais lattice, atomic positions of the lattice’s primitive unit cell must be specified under the ATOMIC_POSITIONS section. The celldm(1) is the first lattice parameter in the conventional unit cell, in atomic units. In all cases except those labeled P, the conventional and primitive unit cells are different. celldm(2) and celldm(3) are ratios with respect to celldm(1). To elaborate, if a b and c are the lattice parameters of the conventional unit cell, then celldm(2)=b/a and celldm(3)=c/a. celldm(4) celldm(5) and celldm(6) are the angles between bc, ac, and ab.

The basic unit is the atomic specification which will be repeated in all unit cells. For a simple cubic unit cell, the basic unit is 0 0 0, which will place one atom at the origin. When the unit cell is duplicated and translated in all directions, then an eight of the atom will end up in each corner of the original unit cell. Therefore, for the simple case just described, only one vector is required to describe the system in the ATOMIC_POSITIONS section, 0 0 0.

Types of Primitive Unit Cells:

  1. ibrav=0 manual CELL_PARAMETERS
    1. The basic unit, just like in all cases, must be specified completely in ATOMIC_POSITIONS
    2. The CELL_PARAMETERS must be set, specifying the cell dimensions of the system
    3. Reason to use: Your system may lack symmetry, thus CELL_PARAMETERS is preferable to the following methods.
    4. Example: Single Atom Calculation
      1. The CELL_PARAMETERS would be 20 0 0 0 20 0 0 0 20
      2. ATOMIC_POSITIONS would be 0.5 0.5 0.5
      3. K_POINTS automatic will be 1 1 1 0 0 0 as the Brilloine zone is small, and this will keep the sample density about the same as previous accurate calculations
  2. ibrav=1 cubic P (—sc “simple cubic”)
    1. There may be no CELL_PARAMETERS section
    2. celldm(1) is the lattice constant
    3. The basic will be replicated at each corner
      1. This can be used to replicate FCC or BCC as long as you specify the 4 closest atoms to the origin for FCC or the center atom for BCC.
  3. ibrav=2 cubic F (—fcc face centered cubic)
    1. celldm(1) is the lattice constant of the conventional FCC unit cell.
    2. nat=# where # is the number within the primitive FCC unit cell
    3. Specify the ATOMIC_POSITIONS
      1. Examples:
        1. For FCC Aluminum, the only primitive unit is Al 0 0 0
        2. For FCC NaCl, the units are Cl 0 0 0 and Na 0.5 0.5 0.5. The Nais in the center, as specified by the ratio of its position to the cell parameters.
Example and Documentation
  1. Example:
/
&control
	calculation='scf'
	restart_mode='from_scratch'
	pseudo_dir = './'
	outdir='./tmp'
	prefix='pt'
	tprnfor = .true.
	tstress = .true.
/
&system
	ibrav=2
	celldm(1)=7.46  # Bohr Units
	nat=  1  # Matched FCC for single elements
	ntyp= 1 # Only one element in this case
	ecutwfc =40.0
	occupations='smearing'
	smearing='marzari-vanderbilt'
	degauss=0.05
/
&electrons
	diagonalization = 'cg'
	mixing_beta = 0.7
/
ATOMIC_SPECIES
	Al  26.98  Al.pbe-n-kjpaw_psl.1.0.0.UPF
ATOMIC_POSITIONS (crystal)  
	Al  0.00000000000000   0.00000000000000   0.00000000000000  ! //
K_POINTS automatic
	10 10 10 0 0 0
# AFLOW::QE END 

  1. General Documentation:
Bravais-lattice index. Optional only if space_group is set.
  If ibrav /= 0, specify EITHER [ [celldm](https://www.quantum-espresso.org/Doc/INPUT_PW.html#celldm)(1)-[celldm](https://www.quantum-espresso.org/Doc/INPUT_PW.html#celldm)(6) ]
  OR [ [A](https://www.quantum-espresso.org/Doc/INPUT_PW.html#A), [B](https://www.quantum-espresso.org/Doc/INPUT_PW.html#B), [C](https://www.quantum-espresso.org/Doc/INPUT_PW.html#C), [cosAB](https://www.quantum-espresso.org/Doc/INPUT_PW.html#cosAB), [cosAC](https://www.quantum-espresso.org/Doc/INPUT_PW.html#cosAC), [cosBC](https://www.quantum-espresso.org/Doc/INPUT_PW.html#cosBC) ]
  but NOT both. The lattice parameter "alat" is set to
  alat = celldm(1) (in a.u.) or alat = A (in Angstrom);
  see below for the other parameters.
  For ibrav=0 specify the lattice vectors in [CELL_PARAMETERS](https://www.quantum-espresso.org/Doc/INPUT_PW.html#CELL_PARAMETERS),
  optionally the lattice parameter alat = celldm(1) (in a.u.)
  or = A (in Angstrom). If not specified, the lattice parameter is
  taken from [CELL_PARAMETERS](https://www.quantum-espresso.org/Doc/INPUT_PW.html#CELL_PARAMETERS)
  IMPORTANT NOTICE 1:
  with ibrav=0 lattice vectors must be given with a sufficiently large
  number of digits and with the correct symmetry, or else symmetry
  detection may fail and strange problems may arise in symmetrization.
  IMPORTANT NOTICE 2:
  do not use celldm(1) or A as a.u. to Ang conversion factor,
  use the true lattice parameters or nothing,
  specify units in [CELL_PARAMETERS](https://www.quantum-espresso.org/Doc/INPUT_PW.html#CELL_PARAMETERS) and [ATOMIC_POSITIONS](https://www.quantum-espresso.org/Doc/INPUT_PW.html#ATOMIC_POSITIONS)

ibrav      structure                   celldm(2)-celldm(6)
                                     or: b,c,cosbc,cosac,cosab
  0          free
      crystal axis provided in input: see card [CELL_PARAMETERS](https://www.quantum-espresso.org/Doc/INPUT_PW.html#CELL_PARAMETERS)

  1          cubic P (sc)
      v1 = a(1,0,0),  v2 = a(0,1,0),  v3 = a(0,0,1)

  2          cubic F (fcc)
      v1 = (a/2)(-1,0,1),  v2 = (a/2)(0,1,1), v3 = (a/2)(-1,1,0)

  3          cubic I (bcc)
      v1 = (a/2)(1,1,1),  v2 = (a/2)(-1,1,1),  v3 = (a/2)(-1,-1,1)
 -3          cubic I (bcc), more symmetric axis:
      v1 = (a/2)(-1,1,1), v2 = (a/2)(1,-1,1),  v3 = (a/2)(1,1,-1)

  4          Hexagonal and Trigonal P        celldm(3)=c/a
      v1 = a(1,0,0),  v2 = a(-1/2,sqrt(3)/2,0),  v3 = a(0,0,c/a)

  5          Trigonal R, 3fold axis c        celldm(4)=cos(gamma)
      The crystallographic vectors form a three-fold star around
      the z-axis, the primitive cell is a simple rhombohedron:
      v1 = a(tx,-ty,tz),   v2 = a(0,2ty,tz),   v3 = a(-tx,-ty,tz)
      where c=cos(gamma) is the cosine of the angle gamma between
      any pair of crystallographic vectors, tx, ty, tz are:
        tx=sqrt((1-c)/2), ty=sqrt((1-c)/6), tz=sqrt((1+2c)/3)
 -5          Trigonal R, 3fold axis <111>    celldm(4)=cos(gamma)
      The crystallographic vectors form a three-fold star around
      <111>. Defining a' = a/sqrt(3) :
      v1 = a' (u,v,v),   v2 = a' (v,u,v),   v3 = a' (v,v,u)
      where u and v are defined as
        u = tz - 2*sqrt(2)*ty,  v = tz + sqrt(2)*ty
      and tx, ty, tz as for case ibrav=5
      Note: if you prefer x,y,z as axis in the cubic limit,
            set  u = tz + 2*sqrt(2)*ty,  v = tz - sqrt(2)*ty
            See also the note in Modules/latgen.f90

  6          Tetragonal P (st)               celldm(3)=c/a
      v1 = a(1,0,0),  v2 = a(0,1,0),  v3 = a(0,0,c/a)

  7          Tetragonal I (bct)              celldm(3)=c/a
      v1=(a/2)(1,-1,c/a),  v2=(a/2)(1,1,c/a),  v3=(a/2)(-1,-1,c/a)

  8          Orthorhombic P                  celldm(2)=b/a
                                             celldm(3)=c/a
      v1 = (a,0,0),  v2 = (0,b,0), v3 = (0,0,c)

  9          Orthorhombic base-centered(bco) celldm(2)=b/a
                                             celldm(3)=c/a
      v1 = (a/2, b/2,0),  v2 = (-a/2,b/2,0),  v3 = (0,0,c)
 -9          as 9, alternate description
      v1 = (a/2,-b/2,0),  v2 = (a/2, b/2,0),  v3 = (0,0,c)
 91          Orthorhombic one-face base-centered A-type
                                             celldm(2)=b/a
                                             celldm(3)=c/a
      v1 = (a, 0, 0),  v2 = (0,b/2,-c/2),  v3 = (0,b/2,c/2)

 10          Orthorhombic face-centered      celldm(2)=b/a
                                             celldm(3)=c/a
      v1 = (a/2,0,c/2),  v2 = (a/2,b/2,0),  v3 = (0,b/2,c/2)

 11          Orthorhombic body-centered      celldm(2)=b/a
                                             celldm(3)=c/a
      v1=(a/2,b/2,c/2),  v2=(-a/2,b/2,c/2),  v3=(-a/2,-b/2,c/2)

 12          Monoclinic P, unique axis c     celldm(2)=b/a
                                             celldm(3)=c/a,
                                             celldm(4)=cos(ab)
      v1=(a,0,0), v2=(b*cos(gamma),b*sin(gamma),0),  v3 = (0,0,c)
      where gamma is the angle between axis a and b.
-12          Monoclinic P, unique axis b     celldm(2)=b/a
                                             celldm(3)=c/a,
                                             celldm(5)=cos(ac)
      v1 = (a,0,0), v2 = (0,b,0), v3 = (c*cos(beta),0,c*sin(beta))
      where beta is the angle between axis a and c

 13          Monoclinic base-centered        celldm(2)=b/a
             (unique axis c)                 celldm(3)=c/a,
                                             celldm(4)=cos(gamma)
      v1 = (  a/2,         0,          -c/2),
      v2 = (b*cos(gamma), b*sin(gamma), 0  ),
      v3 = (  a/2,         0,           c/2),
      where gamma=angle between axis a and b projected on xy plane

-13          Monoclinic base-centered        celldm(2)=b/a
             (unique axis b)                 celldm(3)=c/a,
                                             celldm(5)=cos(beta)
      v1 = (  a/2,       b/2,             0),
      v2 = ( -a/2,       b/2,             0),
      v3 = (c*cos(beta),   0,   c*sin(beta)),
      where beta=angle between axis a and c projected on xz plane
 IMPORTANT NOTICE: until QE v.6.4.1, axis for ibrav=-13 had a
 different definition: v1(old) =-v2(now), v2(old) = v1(now)

 14          Triclinic                       celldm(2)= b/a,
                                             celldm(3)= c/a,
                                             celldm(4)= cos(bc),
                                             celldm(5)= cos(ac),
                                             celldm(6)= cos(ab)
      v1 = (a, 0, 0),
      v2 = (b*cos(gamma), b*sin(gamma), 0)
      v3 = (c*cos(beta),  c*(cos(alpha)-cos(beta)cos(gamma))/sin(gamma),
           c*sqrt( 1 + 2*cos(alpha)cos(beta)cos(gamma)
                     - cos(alpha)^2-cos(beta)^2-cos(gamma)^2 )/sin(gamma) )
      where alpha is the angle between axis b and c
             beta is the angle between axis a and c
            gamma is the angle between axis a and b

Using aflow

  1. Both .scf and .cif files contain enough information to be transformed into each other, but .cif files store information in a format more widely used in crystallography while .scf file store information more widely used in computational chemistry. There is information in each that is not necessarily contained in the other, such as the fact that .scf files may contain information about atomic orbitals. However, all the information from one may derived when given the other.
  2. Quantum Espresso requires the physical system’s data to be in the .scf format. If you have a .cif file, aflow can help convert it to a .scf file.
  3. aflow is the name of the converter. An example of its usage is given as follows aflow --qe < Al.cif. --qe represents “Quantum Espresso” and Al.scf.out.cif represents the .cif file being input. To do a full conversion, do aflow --qe < Al.cif > Al.scf.in. You will still have to manually add in parameters to the .scf file to make it ready for simulations.
  4. When aflow does a conversion, such as aflow --sc < filename.scf, it will not use bravais lattice presets, even though --sc stands for simple cubic. Instead, it manually specifies the positions of all of the atoms using ibrav=0. Furthermore, it will not write to a file unless specified by a right angle bracket: aflow --sc < filename.scf > othername.scf.out. Pedantically, periods do not affect the function of the file itself, but it is a nice naming convention. Scripts often reference files by the characters following the dot.
    1. Some other options to use to convert from arbitrary file types are --cif, and --poscar which is the file type used by VASP, as DFT software package.
  5. The output file will look something like this:
! AFLOW::QE BEGIN
! Pt1
&system                     ! // aflow
 ibrav=0,                   ! // free
 nat=1,                     ! // a.atoms.size()
 ntyp=1                     ! // a.num_each_type.size()
 /
ATOMIC_POSITIONS (crystal)
  Pt	  0.00000000000000   0.00000000000000   0.00000000000000  ! // Pt
CELL_PARAMETERS (angstrom)
   2.79236152050000   0.00000000000000   0.00000000000000
   1.39618076025000   2.41825601330314   0.00000000000000
   1.39618076025000   0.80608533776771   2.27995363420240
# AFLOW::QE END 

  1. Everything above ATOMIC_POSITIONS should be set up accordingly. As shown below, I simply copy and pasted everything including ATOMIC_POSITIONS and onward into my generic setup for metal .scf files:
&control
	calculation='scf'
	restart_mode='from_scratch'
	pseudo_dir = './'
	outdir='./tmp'
	prefix='pt' #NOTE
	tprnfor = .true.
	tstress = .true.
/
&system
	ibrav=0                   ! // free
	nat=  1
	ntyp= 1
	ecutwfc =40.0
	occupations='smearing'
	smearing='marzari-vanderbilt'
	degauss=0.05
/
&electrons
	diagonalization = 'cg'
	mixing_beta = 0.7
/
ATOMIC_SPECIES
  Pt  195.084 pt_pbe_v1.4.uspp.F.UPF #NOTE
ATOMIC_POSITIONS (crystal)
  Pt	  0.00000000000000   0.00000000000000   0.00000000000000  ! // Pt
CELL_PARAMETERS (angstrom)
   2.79236152050000   0.00000000000000   0.00000000000000
   1.39618076025000   2.41825601330314   0.00000000000000
   1.39618076025000   0.80608533776771   2.27995363420240
# AFLOW::QE END 
  • You must not forget to change the prefix and your ATOMIC_SPECIES to match your new element. The atomic weight should be in amu. and the name of the pseudopotential file in the current directory should be included. Other than these minor changes, it is very similar to the Al.scf.in shown at the beginning of this document.

Special Lattice Systems

  1. Single Atom Calculations
    1. Make the ibrav=1 and the celldm(1)=10 (Angstroms), make the atomic position .5.5.5, make the nat=1
      1. 10 Angstroms is about 20 au
      2. do kpoints 111000 (the first one divides up the brilloine into 1 part (no divisions in this case))(the shift does not make that much of a different
        1. It makes a difference when the shift will make the brilloine zone symmetric
    2. Calculating Bond Energy
      1. Calculate the single atom energy
      2. Calculate the close packed energy
      3. E = Eatom-Ebulk/nat
        1. Eatom and Ebulk are negative
      4. Uses: chemical reactions:
        1. the reactant is in bulk
        2. the product is in solution, which is separated
        3. The change in energy is Etam-Ebulk/nat for the chemical reaction. That is the amount of work needing to be done by the water (TdeltaS (the water) + deltaH (the heat put in to rip it apart))
        4. This is about 3.23eV for aluminum
        5. Try for anything and compare it to the literature
  2. Multiple Species
    1. ntype=2
    2. It depends how you want to arrange your system
      1. For NaCl, if you use ibrav=2
        1. celldm(1)= (fcc cell, not the primitive lattice constant)
        2. nat=2 (for the primitive unit cell)
        3. ntype=2 (for the system)
        4. vectors
          1. vec1=0 0 0 (primitive)
          2. vec2= .5 .5 .5 (primitive)
      2. if you use ibrav=1
        1. you have to say nat=7
        2. you have to specify the positions of 7 atoms
        3. ntype = 2
        4. The above will specify the basic “unit” which is repeated at the corner at each cell
  3. Supercells
    1. use aflow to make the cell nxnxn where n is greater than one
    2. ibrav = 1
    3. you have to recalculate the lattice constant and nat
    4. for 2x2x2 for aluminume, nat=32 (it is fcc), and the lattice constant is just na

Body centered

  1. for body centered, the computer assumes its primitive unit cell still
  • Use the gnuplot script given to you and just change the axis labels (change it to read from the user the axis)

  • We use FCC rather than SC because in the calculations, the extracted primitive unit cells are different

F means face group, C means cubic, Therefore FC means face centered cubic

aflow —sc will convert from primitive to simple cubic (conventional cell)

ibrav=1 has to be cubic

Generalized Lattice Calculations

Suppose you want to vary the lattice parameters for any type of unit cell so that you can find the minimum energy. How would you do it?

  1. &control has to be modified
  2. scf must be changed to vc-relax which stands for variable unit cell coordinates.
  3. &IONS and &CELL must follow &electrons.

Molecules

  1. Under &IONS change ion_dynamics='bfgs' which comes after &electrons

Relax parameter

  1. Using relax or vc-relax, you have to make the original bond lengths around the theoretical bond lengths, otherwise the bfgs ion dynamics will assume the system is already at a minimum and not atomic positions will not be changed. Example: the atoms are so far away that the simulation thinks they are already separated in their low energy states.

Surface Energy Calculations

Also known as the interfacial free energy or surface free energy. Why does diamond form that lattice rather than another one? is the energy per atom in the bulk is the energy per atom in the slab is the number of atoms in the slab (we consider a unit volume)

If you cut a surface, its energy will increase because the surface atoms are in a higher energy state. Think about two hydrogen atoms, they lower their energy when they come together, pulling them apart would increase their energies. When we think about the energy of the electrons at the surface, they are at lower energies when the nuclei surround them (hard to remove them to infinity). If a surface is formed electrons miss half of their nuclei, so their energy increases (still negative). If all the surrounding nuclei were removed, their energies would increase to zero. If we were to replace all of the removed nuclei with different atomic numbers, it were as if the electrons were in atoms of a different atomic number. Therefore, we would just take their energies to be that of electrons in atoms of that new atomic number. We can take this logic one more step, if remove half of the surrounding nuclei along a plane and replace them with an atom with a different atomic weights, we would just say that the electrons are the average of the electrons in the bulk of each material. To simplify our lives even more then, we can take the work required to crack a bulk and make a surface, divide that amount of energy by two, and say that each surface has that much “surface energy.” After that, we can see the free energy which comes from combining two different materials at a surface interface by adding the free energies of each material at a surface.

To calculate this free surface energy using quantum espresso we do the following steps:

  • aflow --slab=1,1,1,5,5 < Pt.cif > Pt_slab_11_5_5.vasp
  • The last parameter is the number of layers of vacuum, you want at least 10 angstroms in length to make the unit cells sufficiently spaced apart.
  • The second to last parameter is the number of layers of materials
  • The first parameters represent the surface [111] crystallographically.
  • Open up the cif file in VESTA, and put the 1,1,1 surface. It will tell you how far from the origin that plane is (the spacing between 1,1,1 planes) in Angstroms.
  • aflow --slab=1,1,1,5,5 < Pt.vasp | aflow --abbcar converts it to a better bravais lattice representation (still a lot of coordinates to be specified) instead of specifying the coordinates in terms of the original unit cell type. For example, it may put make the z-axis perpendicular to the crystallogrpahic surface.
  • This way, when you open it up in VESTA, you can just measure the z-distance of an atom rather than doing further exploration into the parameters.
  • Then you can do aflow --qe to get your final simulation file.
  • Remember to use relax rather than vc-relax. This would destroy the vacuum spacing, as it would optimize the lattice parameters so that the system is in the lowest energy state.
  • If you have your scf.in file set up, but you still need the atomic positions, you should append the aflow file onto the end with >>.
  • In VIM, you will have to the move the lines around so the format is right :mv 35,55 24 will move those lines up to the desired lines.
  • Setting k-points: take the ratio of your slab lattice parameters to your original unit cell. If the slab planar span parameters are twice that of your original unit cell, then you have to divide the k-points by two. For example, if the lattice parameters were a b c and your slab was 2a 2b 10c, and your k-points were 10 10 10, your slab k-points would be 5 5 1.
  • Increase the CPUs from 4 to 16 or 32. Set the time to be 24 hours.

Supercells

  1. aflow --supercell=2,2,2 < pt.vasp > pt222.vasp
  2. aflow --qe < pt222.vasp