3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-17 16:33:46 +02:00
dft_tools/doc/tutorials/svo_vasp/svo_notebook.ipynb

5.8 KiB

None <html> <head> </head>
In [14]:
import matplotlib
matplotlib.use("Pdf")
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'svg'

# set matplotlib parameters
params = {'backend': 'ps',
          'axes.labelsize': 13,
          'font.size': 13,
          'legend.fontsize': 13,
          'xtick.labelsize': 13,
          'ytick.labelsize': 13,
          'text.usetex': False,
          'text.latex.preamble': "\\usepackage{mathpazo}, \\usepackage{amsmath}",
          'font.family': 'sans-serif',
          'font.sans-serif': ['Computer Modern Sans serif']}
plt.rcParams.update(params)

import warnings 
warnings.filterwarnings("ignore") #ignore some matplotlib warnings

# numpy
import numpy as np

# .. _svonotebook:

DFT and projections

In [1]:
from pytriqs.archive import HDFArchive
In [11]:
# import plovasp converter
import triqs_dft_tools.converters.plovasp.converter as plo_converter
# import VASPconverter
from triqs_dft_tools.converters.vasp_converter import *
# SumK
from triqs_dft_tools.sumk_dft_tools import SumkDFTTools
In [7]:
# Generate and store PLOs
plo_converter.generate_and_output_as_text('plo.cfg', vasp_dir='./')
Read parameters:
0  ->  {'m': 0, 'l': 2, 'isite': 2, 'label': 'dxy'}
1  ->  {'m': 1, 'l': 2, 'isite': 2, 'label': 'dyz'}
2  ->  {'m': 2, 'l': 2, 'isite': 2, 'label': 'dz2'}
3  ->  {'m': 3, 'l': 2, 'isite': 2, 'label': 'dxz'}
4  ->  {'m': 4, 'l': 2, 'isite': 2, 'label': 'dx2-y2'}
  Found POSCAR, title line: SrVO3
  Total number of ions: 5
  Number of types: 3
  Number of ions for each type: [1, 1, 3]

    Total number of k-points: 729
   Total number of tetrahedra: 4374
eigvals from LOCPROJ

  Spin: 1
  Site: 2
  Density matrix                                                Overlap
   0.5878638   0.0015655  -0.0003729   0.0016028  -0.0000013       0.9294189  -0.0000079  -0.0000080  -0.0000079   0.0000001
   0.0015655   0.5878216  -0.0001853  -0.0015606   0.0003205      -0.0000079   0.9294189  -0.0000041   0.0000080   0.0000068
  -0.0003729  -0.0001853   0.5820729  -0.0001876   0.0000001      -0.0000080  -0.0000041   0.9715784  -0.0000036  -0.0000002
   0.0016028  -0.0015606  -0.0001876   0.5878590  -0.0003219      -0.0000079   0.0000080  -0.0000036   0.9294189  -0.0000070
  -0.0000013   0.0003205   0.0000001  -0.0003219   0.5820728       0.0000001   0.0000068  -0.0000002  -0.0000070   0.9715787

  Generating 1 shell...

    Shell         : 1
    Orbital l     : 2
    Number of ions: 1
    Dimension     : 3
Density matrix:
  Site 1
   0.3333155   0.0021688   0.0022148
   0.0021688   0.3332635  -0.0021629
   0.0022148  -0.0021629   0.3333096
    trace:  0.999888560089083

  Impurity density: 0.999888560089083

Overlap:
  Site 1
[[ 1.  0. -0.]
 [ 0.  1.  0.]
 [-0.  0.  1.]]

Local Hamiltonian:
  Site 1
   0.5635031   0.0007530   0.0007528
   0.0007530   0.5635034  -0.0007530
   0.0007528  -0.0007530   0.5635032

Evaluating DOS...
  Total number of states: [[[1.99711439 1.99526935 1.99688248]]]
  Storing ctrl-file...
  Storing PLO-group file 'vasp.pg1'...
  Density within window: 0.9999735861893001
In [10]:
# create Converter
Converter = VaspConverter(filename = 'vasp')
# run the converter
Converter.convert_dft_input()
Reading input from vasp.ctrl...
{
    "ngroups": 1,
    "nk": 729,
    "ns": 1,
    "nc_flag": 0
}

  No. of inequivalent shells: 1
In [12]:
sk = SumkDFTTools(hdf_file='vasp.h5')
In [ ]:

</html>