principia_materia.hamiltonian.electron_hamiltonian module
- class principia_materia.hamiltonian.electron_hamiltonian.ElectronHamiltonian(structure, mesh=None, pg='C1', nspin=1, nelect=None, fermi=None, ncor=0, U=0, units='eV', verbosity=1, tol=1e-06)
Bases:
Hamiltonian
- Parameters:
nelect (int, optional, default to None) – Number of valence electrons.
fermi (float, optional, default to None) – Fermy energy, in unit of eV.
ncor (int, optional, default to None) – Number of correlated orbitals.
U (int, optional, default to 0) – The Coulumb hamiltonian term U.
- diagonalize_hamiltonians(hamiltonians_matrices, UPLO='L')
Diagonalize and compute the eigenvalues hamiltonians in reciprocal space.
- Returns:
eigenvalues (array of float, shape(N, nspin, norbitals))
eigenvectors (array of float, shape(N, nspin, norbitals, norbitals))
- get_embeded_self_energy()
Embed the self-energy minus the dc in a matrix the size of the Hamiltonian.
- get_fermi_energy()
Get Fermi energy.
- Returns:
fermi – The Fermi energy.
- Return type:
float
- get_hamiltonian_matrices_at_kpoints(kpoints)
Get hamiltonian matrices at k-points
- Parameters:
kpoints (array of float or Fraction, shape(dim, ) or shape(N, dim)) – k-points.
- Returns:
hamiltonians_matrices – Interaction matrices.
- Return type:
array of complex, shape(norbitals, norbitals) or shape(N, norbitals, norbitals)
- get_state()
Get insulator/metal state of the Hamiltonian.
- get_total_energy()
Get the total energy of the Hamiltonian.
- hartree_fock(nd=0, nscf=40, tol=1e-05, mix=0.7, perturb=True, dc=False)
Hartree Fock.
- set_density_matrix()
Compute the density matrix of the Hamiltonian.
- set_fermi_energy(replace=False, maxiter=200, raise_exception=False)
Compute Fermi energy with binary search and tetrahedron method.
- Parameters:
replace (bool, optional, default to False) – Re-compute Fermi energy when attribute
_fermi
is not None.maxiter (int, optional, default to 200) – The maximum number of iterations to search for the Fermi energy.
raise_exception (bool, optional, default to False) – Whether to raise an exception when the maximum iteration is reached before the error tolerence is reached.
- set_hamiltonian(hamiltonian)
Set electron hamiltonian.
- Parameters:
hamiltonian (ModelHamiltonian) – ModelHamiltonian object.
- _hamiltonian
ModelHamiltonian object.
- Type:
- set_nd(nd, max_loop=200, tol=0.0001)
Adjust number d-electrons.
Adjust the double-counting to get the desired number of d-electrons while maintaining the proper density. This algo creates a a scalar function which computes nd for a given dc while always adjusting the fermi energy to give the correct density. This function is then manually bounded and then sent to brentq in order to find the root.
- set_self_energy(self_energy, fermi=None, dc=None)
- set_total_energy()
Compute the total energy of the Hamiltonian with tetrahedron method.