diff --git a/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.indmftpr b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.indmftpr index 2f5c5f78..928c1656 100644 --- a/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.indmftpr +++ b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.indmftpr @@ -1,5 +1,5 @@ 5 ! Nsort -2 1 1 4 2 ! Mult(Nsort) +2 1 1 4 2 ! Mult(Nsort) 3 ! lmax complex ! choice of angular harmonics 0 0 0 0 ! l included for each sort @@ -17,4 +17,4 @@ complex ! choice of angular harmonics complex 0 0 0 0 0 0 0 0 --0.088 0.43 ! 0.40 gives warnings, 0.043 gives occ 1.996 +-0.09 0.43 diff --git a/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.outdmftpr b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.outdmftpr new file mode 100644 index 00000000..27328905 --- /dev/null +++ b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC.outdmftpr @@ -0,0 +1,12 @@ +Density Matrices for the Correlated States : + + Sort = 2 Atom = 3 and Orbital l = 2 + + 0.000739 0.000000 0.000000 0.000000 0.000000 -0.000000 -0.000000 -0.000000 0.000000 -0.000000 + 0.000000 -0.000000 0.502746 0.000000 0.000000 0.099298 0.000000 -0.000000 0.000000 -0.000000 + 0.000000 0.000000 0.000000 -0.099298 0.020434 0.000000 0.000000 -0.000000 0.000000 0.000000 + -0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.735763 0.000000 0.000000 0.000000 + 0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 -0.000000 0.735763 -0.000000 + +The charge of the orbital is : 1.99544 + diff --git a/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC_DOS.png b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC_DOS.png new file mode 100644 index 00000000..505bc130 Binary files /dev/null and b/doc/tutorials/images_scripts/Sr2MgOsO6_noSOC_DOS.png differ diff --git a/doc/tutorials/sr2mgoso6_nosoc.rst b/doc/tutorials/sr2mgoso6_nosoc.rst index 2c80b10b..38b5923b 100644 --- a/doc/tutorials/sr2mgoso6_nosoc.rst +++ b/doc/tutorials/sr2mgoso6_nosoc.rst @@ -26,10 +26,17 @@ This is setting up a non-magnetic calculation, using the LDA and 2000 k-points i run +After the SC cycled finished, you can calculate the DOS. It should look like what you can see in this figure: + +.. image:: images_scripts/Sr2MgOsO6_noSOC_DOS.png + :width: 700 + :align: center + + Wannier orbitals ---------------- -As a next step, we calculate localised orbitals for the t2g orbitals. We use the same input file for :program:`dmftproj` as it was used in the :ref:`documentation`: +As a next step, we calculate localised orbitals for the d orbitals. We use this input file for :program:`dmftproj`: .. literalinclude:: images_scripts/Sr2MgOsO6_noSOC.indmftpr @@ -43,21 +50,60 @@ Then :program:`dmftproj` is executed in its default mode (i.e. without spin-pol dmftproj -This program produces the necessary files for the conversion to the hdf5 file structure. This is done using -the python module :class:`Wien2kConverter `. A simple python script that initialises the converter is:: +At the end of the run you see the density matrix in Wannier space: + +.. literalinclude:: images_scripts/Sr2MgOsO6_noSOC.outdmftpr + +As you can see, there are off-diagonal elements between the :math:`d_{x^2-y^2}` and the :math:`d_{xy}` orbital. + +We convert the output to the hdf5 archive, using +the python module :class:`Wien2kConverter `. A simple python script doing this is:: from triqs_dft_tools.converters.wien2k_converter import * Converter = Wien2kConverter(filename = "Sr2MgOsO6_noSOC") - -After initializing the interface module, we can now convert the input -text files to the hdf5 archive by:: - Converter.convert_dft_input() This reads all the data, and stores everything that is necessary for the DMFT calculation in the file :file:`Sr2MgOsO6_noSOC.h5`. -[CONTINUE HERE] The DMFT calculation ==================== +Before starting the DMFT calculation it is beneficial to look a bit more closely at the block structure of the problem. Eventually, we want to use a basis that is as diagonal as possible, and include only the partially filled orbitals in the correlated problem. All this can be done using the functionalities of the :class:`BlockStructure ` class, see section :ref:`blockstructure`. + +We first initialise the SumK class:: + + from triqs_dft_tools.sumk_dft import * + SK = SumkDFT(hdf_file='Sr2MgOsO6_noSOC.h5',use_dft_blocks=True) + +The flag *use_dft_blocks=True* determines, as usual, the smallest possible blocks with non-zero entries, and initialises them as *solver* block structure. In order to disentangle the :math:`d_{x^2-y^2}` and the :math:`d_{xy}` orbitals, and pick out only the partially filled one, we do a transformation into a basis where the local Hamiltonian is diagonal:: + + mat = SK.calculate_diagonalization_matrix(prop_to_be_diagonal='eal',calc_in_solver_blocks=True) + +We can look at the diagonalisation matrix, it is:: + + >>> print mat[0]['down'] + [[ 1. +0.j 0. +0.j 0. +0.j 0. +0.j 0. +0.j ] + [ 0. +0.j -0.985+0.j 0. -0.173j 0. +0.j 0. +0.j ] + [ 0. +0.j 0.173+0.j 0. -0.985j 0. +0.j 0. +0.j ] + [ 0. +0.j 0. +0.j 0. +0.j 1. +0.j 0. +0.j ] + [ 0. +0.j 0. +0.j 0. +0.j 0. +0.j 1. +0.j ]] + >>> + +This transformation is already stored in the SK.block_structure class. The next step is actually not needed for a DMFT calculation, but lets see what the transformation does to the local Hamiltonian. We can calculate it before rotation, rotate it, and look at the 2x2 block with off-diagonals:: + + eal = SK.eff_atomnic_levels() + eal2 = SK.block_structure.convert_matrix(eal[0],space_from='sumk', space_to='solver') + + print eal[0]['up'][1:3,1:3] # prints the 2x2 block with offiagonals + [[ 0.391+0.j -0. -0.815j] + [-0. +0.815j 4.884-0.j ]] + + print eal2['up_1'] # prints the 2x2 block after rotation + [[0.247-0.j 0. +0.j] + [0. -0.j 5.028+0.j]] + +So the local Hamiltonian has been diagonalised. From the other entries we can see that the *up_0* block and the [1,1] entry of the *up_1* block correspond to :math:`e_g`-like orbitals, and the others are the +:math:`t_{2g}` orbitals that we want to keep. + +[TO BE CONTINUED...]