p.savefig('chg.pdf') p = plot.ChargeDifference(H, ext_geom=molecule, colorbar=True) p.savefig('chgdiff.pdf') p = plot.SpinPolarization(H, ext_geom=molecule, colorbar=True, vmax=0.2) p.annotate() p.savefig('pol.pdf') H.H.shift(-H.find_midgap()) ev, evec = H.eigh(eigvals_only=False, spin=0) p = plot.Wavefunction(H, 500 * evec[:, 10], ext_geom=molecule, colorbar=True) p.savefig('wf.pdf') p = plot.Spectrum(H) p.savefig('spectrum.pdf') p = plot.DOSmap(H) p.savefig('2Ddos_map.pdf') p = plot.PDOS(H, np.linspace(-0.2, 0.2, 101)) p.savefig('total_dos.pdf') p = plot.PDOS(H, np.linspace(-0.2, 0.2, 101), sites=[60]) p.savefig('pdos_energy_resolved.pdf') p = plot.LDOS_from_eigenstate(H, evec[:, 10] * 200, sites=[60], ext_geom=molecule) p.savefig('pdos.pdf') # Test real-space plots?
from hubbard import HubbardHamiltonian, plot, sp2 import sys import numpy as np import sisl # Build sisl Geometry object mol = sisl.get_sile('junction-2-2.XV').read_geometry() mol.sc.set_nsc([1, 1, 1]) mol = mol.move(-mol.center(what='xyz')).rotate(220, [0, 0, 1]) Hsp2 = sp2(mol) # 3NN tight-binding model H = HubbardHamiltonian(Hsp2, U=0) # Plot Eigenspectrum p = plot.Spectrum(H, ymax=0.12) p.set_title(r'3NN, $U=%.2f$ eV' % H.U) p.savefig('eigenspectrum_U%i.pdf' % (H.U * 100)) # Plot H**O and LUMO level wavefunctions for up- and down-electrons for U=3.5 eV spin = ['up', 'dn'] N = H.q for i in range(1): ev, evec = H.eigh(eigvals_only=False, spin=i) # Use midgap as energy reference midgap = H.find_midgap() ev -= midgap f = 1 v = evec[:, int(round(N[i])) - 1] j = np.argmax(abs(v)) wf = f * v**2 * np.sign(v[j]) * np.sign(v)