"In this basic example we will perform a VASP calculation for SrVO$_3$, build PLOs for the Vanadium t$_{2g}$ orbitals, and load them as SumK object, which can be then used to perform a DMFT calculation.\n",
"\n",
"## VASP setup\n",
"\n",
"First we setup the VASP [INCAR link](INCAR) file by specifing the LOCPROJ, EMIN, EMAX and LORBIT flags:"
"# the energy window to optimize projector channels\n",
"EMIN = 3.9\n",
"EMAX = 7.1\n",
"\n",
"# use the PAW channel optimization\n",
"LORBIT=14\n",
"\n",
"# project to V d\n",
"LOCPROJ = 2 : d : Pr\n",
"```\n",
"Moreover we prepare a [KPOINTS link](KPOINTS), [POSCAR link](POSCAR), and a POTCAR file. For the POTCAR file please use the VASP provided PBE pseudopotentials: `Sr_sv`, `V`, and `O`. \n",
"\n",
"Now VASP is executed, which should converge in roughly 27 iterations. Afterwards you should find the files LOCPROJ and PROJCAR in you directory. \n",
"import triqs_dft_tools.converters.plovasp.converter as plo_converter"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, create a configuration file for plovasp [plo.cfg link](plo.cfg):\n",
"\n",
"```\n",
"[General]\n",
"DOSMESH = -3.0 3.0 2001\n",
"\n",
"[Shell 1]\n",
"LSHELL = 2\n",
"IONS = 2\n",
"EWINDOW = -1.4 2.0\n",
"\n",
"TRANSFORM = 1.0 0.0 0.0 0.0 0.0\n",
" 0.0 1.0 0.0 0.0 0.0\n",
" 0.0 0.0 0.0 1.0 0.0\n",
"\n",
"```\n",
"where the energy window of the t$_{2g}$ bands is specified by `EWINDOW` and the `TRANSFORM` flag picks the correct three orbitals out of the five Vanadium $d$ orbitals [see the guide for the ordering of orbitals](../../guide/conv_vasp.html). Before running PLOVASP, make sure that the Fermi energy is written in the first line of the `LOCPROJ` file, or copy it there (see the VASP [interface guide](../../guide/conv_vasp.html) for more information). The first line should look like\n",
"```\n",
"1 729 21 5 5.3834262 # of spin, # of k-points, # of bands, # of proj, Efermi\n",
"PLOVASP created one shell with three orbitals, which are equally filled by 1/3, one electron in total. Additionally we calculated the density of states. Both in VASP and PLOVASP. The later stores the data in the file pdos_x.dat, which can be simply plotted with [matplotlib](https://matplotlib.org/). The result should look similar to:\n",
"\n",
"![](svo_dos.svg)\n",
"\n",
"Here the gray area highlights the energy window for the PLOs. The total DOS of VASP (blue) coincides with the PLO DOS in the window, as we re-orthonormalized the projector functions in the given window, picking up also Oxygen weight. This setting is closed to the result of maximally localized Wannier functions created with [wannier90](http://www.wannier.org/) without running the actual minimization of the spread. Note, for a proper comparison one can use the hydrogen projector in VASP by using the the line `LOCPROJ= 2 : d : Hy`, instead of `Pr`. \n",
"\n",
"\n",
"## Converting to hdf5 file\n",
"\n",
"Finally we can run the VASP converter to create a h5 file:"
" mpi.report('found {0:d} blocks of degenerate orbitals in shell {1:d}'.format(num_block_deg_orbs, i_sh))\n",
" for iblock in range(num_block_deg_orbs):\n",
" mpi.report('block {0:d} consists of orbitals:'.format(iblock))\n",
" for keys in SK.deg_shells[i_sh][iblock].keys():\n",
" mpi.report(' '+keys)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This minimal example extracts the block structure by calculating once the local Green's functions and then finds degenerate orbitals with a certain threshold in `Gloc`. Afterwards the result is reported, where 1 block is found with size 6 (3x2 orbitals for spin), where a all 6 orbitals are marked as degenerate. This is indeed correct in cubic SrVO$_3$, as all 3 t$_{2g}$ orbitals are degenerate. Note: for a magnetic calculation one has to break the symmetry between up and down at this point manually. Moreover, one can reduce the threshold for example to `1e-5` and finds that then the degeneracy of the 3 t$_{2g}$ orbitals is not found anymore, resulting in only two degenerate blocks for spin up and down, each with size 3x3.\n",
"\n",
"Afterwards the exact same DMFT script as in the [Wien2k tutorial](../srvo3.html) can be used. For a more elaborate example including charge self-consistency take a look at the [VASP NiO example](../nio_csc.html)."