Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:tutorials:nio_ligand_field:density_matrix_plot [2016/10/09 15:46] – created Maurits W. Haverkort | documentation:tutorials:nio_ligand_field:density_matrix_plot [2025/11/20 03:29] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{indexmenu_n> | ||
| + | ====== Density matrix plot ====== | ||
| + | ### | ||
| + | An intuitive way to look at eigenstates is to plot the charge density. For multi-electron wave-functions one can not plot the wave-function (it depends on $3\times n$ coordinates) but the charge density is a well defined simple quantity. We here use the rendering options of \textit{Mathematica} in combination with the package for \textit{Mathematica} (Quanty.nb) to plot the density matrix of the lowest three eigenstates in NiO. | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | <code Quanty density_matrix_plots_Mathematica.Quanty> | ||
| + | -- It is often nice to make plots of the resulting " | ||
| + | -- simply plot a multi-electron wavefunction \psi(r_1, | ||
| + | -- on 3n coordinates. | ||
| + | -- One can plot the resulting charge density. | ||
| + | |||
| + | -- This example calculates the density matrix of a state and then calls Mathematica to | ||
| + | -- make a density plot of this matrix. | ||
| + | |||
| + | -- the script for mathematica is included in the input file | ||
| + | -- the input string needs calculated data which will be substituted before calling mathematica | ||
| + | |||
| + | -- You need to change the absolute path in the script below | ||
| + | mathematicaInput = [[ | ||
| + | Needs[" | ||
| + | rho=%s; | ||
| + | pl = Table[ Rasterize[ DensityMatrixPlot[IdentityMatrix[10] - rho[ [i] ], PlotRange -> {{-0.4, 0.4}, {-0.4, 0.4}, {-0.4, 0.4}}] ], {i, 1, Length[rho]}]; | ||
| + | For[i = 1, i <= Length[pl], i++, | ||
| + | Export["/ | ||
| + | ]; | ||
| + | Quit[]; | ||
| + | ]] | ||
| + | |||
| + | -- We use the definitions of all operators and basis orbitals as defined in the file | ||
| + | -- include and can afterwards directly continue by creating the Hamiltonian | ||
| + | -- and calculating the spectra | ||
| + | |||
| + | dofile(" | ||
| + | |||
| + | -- The parameters and scheme needed only includes the ground-state (d^8) configuration | ||
| + | |||
| + | -- We follow the energy definitions as introduced in the group of G.A. Sawatzky (Groningen) | ||
| + | -- J. Zaanen, G.A. Sawatzky, and J.W. Allen PRL 55, 418 (1985) | ||
| + | -- for parameters of specific materials see | ||
| + | -- A.E. Bockquet et al. PRB 55, 1161 (1996) | ||
| + | -- After some initial discussion the energies U and Delta refer to the center of a configuration | ||
| + | -- The L^10 d^n | ||
| + | -- The L^9 d^n+1 configuration has an energy Delta | ||
| + | -- The L^8 d^n+2 configuration has an energy 2*Delta+Udd | ||
| + | -- | ||
| + | -- If we relate this to the onsite energy of the L and d orbitals we find | ||
| + | -- 10 eL + n ed + n(n-1) | ||
| + | -- 9 eL + (n+1) ed + (n+1)n | ||
| + | -- 8 eL + (n+2) ed + (n+1)(n+2) U/2 == 2*Delta+U | ||
| + | -- 3 equations with 2 unknowns, but with interdependence yield: | ||
| + | -- ed = (10*Delta-nd*(19+nd)*U/ | ||
| + | -- eL = nd*((1+nd)*Udd/ | ||
| + | -- | ||
| + | -- note that ed-ep = Delta - nd * U and not Delta | ||
| + | -- note furthermore that ep and ed here are defined for the onsite energy if the system had | ||
| + | -- locally nd electrons in the d-shell. In DFT or Hartree Fock the d occupation is in the end not | ||
| + | -- nd and thus the onsite energy of the Kohn-Sham orbitals is not equal to ep and ed in model | ||
| + | -- calculations. | ||
| + | -- | ||
| + | -- note furthermore that ep and eL actually should be different for most systems. We happily ignore this fact | ||
| + | -- | ||
| + | -- We normally take U and Delta as experimentally determined parameters | ||
| + | |||
| + | -- number of electrons (formal valence) | ||
| + | nd = 8 | ||
| + | -- parameters from experiment (core level PES) | ||
| + | Udd | ||
| + | Delta | ||
| + | -- parameters obtained from DFT (PRB 85, 165113 (2012)) | ||
| + | F2dd = 11.14 | ||
| + | F4dd = 6.87 | ||
| + | F2pd = 6.67 | ||
| + | tenDq | ||
| + | tenDqL | ||
| + | Veg | ||
| + | Vt2g = 1.21 | ||
| + | zeta_3d = 0.081 | ||
| + | Bz = 0.000001 | ||
| + | H112 = 0.120 | ||
| + | |||
| + | ed = (10*Delta-nd*(19+nd)*Udd/ | ||
| + | eL = nd*((1+nd)*Udd/ | ||
| + | |||
| + | F0dd = Udd + (F2dd+F4dd) * 2/63 | ||
| + | |||
| + | Hamiltonian = F0dd*OppF0_3d + F2dd*OppF2_3d + F4dd*OppF4_3d + zeta_3d*Oppldots_3d + Bz*(2*OppSz_3d + OppLz_3d) + H112 * (OppSx_3d+OppSy_3d+2*OppSz_3d)/ | ||
| + | | ||
| + | -- we now can create the lowest Npsi eigenstates: | ||
| + | Npsi=3 | ||
| + | -- in order to make sure we have a filling of 8 electrons we need to define some restrictions | ||
| + | StartRestrictions = {NF, NB, {" | ||
| + | |||
| + | psiList = Eigensystem(Hamiltonian, | ||
| + | oppList={Hamiltonian, | ||
| + | |||
| + | -- print of some expectation values | ||
| + | print(" | ||
| + | for i = 1,#psiList do | ||
| + | io.write(string.format(" | ||
| + | for j = 1,#oppList do | ||
| + | expectationvalue = Chop(psiList[i]*oppList[j]*psiList[i]) | ||
| + | io.write(string.format(" | ||
| + | end | ||
| + | io.write(" | ||
| + | end | ||
| + | io:flush() | ||
| + | |||
| + | -- we now make plots of the charge density | ||
| + | |||
| + | function tableToMathematica(t) | ||
| + | local ret = "{ " | ||
| + | for k,v in pairs(t) do | ||
| + | if k~=1 then | ||
| + | ret = ret.." , " | ||
| + | end | ||
| + | if (type(v) == " | ||
| + | ret = ret..tableToMathematica(v) | ||
| + | else | ||
| + | ret = ret..string.format(" | ||
| + | end | ||
| + | end | ||
| + | ret = ret.." }" | ||
| + | return ret | ||
| + | end | ||
| + | |||
| + | -- the d-orbitals are found at position 8 to 17 (see the include file) | ||
| + | rhoList = DensityMatrix(psiList, | ||
| + | rhoListMathematicaForm = tableToMathematica(rhoList) | ||
| + | |||
| + | file = io.open(" | ||
| + | file:write( mathematicaInput: | ||
| + | file: | ||
| + | |||
| + | os.execute("/ | ||
| + | os.execute(" | ||
| + | os.execute(" | ||
| + | os.execute(" | ||
| + | </ | ||
| + | ### | ||
| + | |||
| + | |||
| + | ^ $S_z=-1$ ^ $S_z=0$ ^ $S_z=1$ ^ | ||
| + | | {{ : | ||
| + | ^ Hole density of the $3d$ Ni orbitals in NiO ^^^ | ||
| + | |||
| + | ### | ||
| + | The plots can be seen in Fig. \ref{figNiODensityMatrix}. We show the hole density (identity matrix minus the density matrix) which has lobes towards the O atoms. Ni in NiO has a hole in the $x^2-y^2$ and in the $z^2$ orbital. The color represent the spin down, $S_z=0$ and spin up state of the lowest triplet. | ||
| + | ### | ||
| + | |||
| + | ### | ||
| + | The output to the screen is: | ||
| + | <file Quanty_Output Density_matrix_plots_Mathematica.out> | ||
| + | # < | ||
| + | 1 | ||
| + | 2 | ||
| + | 3 | ||
| + | Mathematica 8.0 for Mac OS X x86 (64-bit) | ||
| + | Copyright 1988-2011 Wolfram Research, Inc. | ||
| + | Loaded the Quanty : Plot Tools Package - version 2016.4.13 | ||
| + | Written by Maurits W. Haverkort | ||
| + | </ | ||
| + | ### | ||
| + | |||
| + | |||
| + | ===== Table of contents ===== | ||
| + | {{indexmenu> | ||