Electron–electron
Coulomb interaction from VASP.
- class elphmod.elel.Model(uijkl=None, vijkl_full=None, vijkl_redu=None, nq=None, no=None, Wmat=None, a=None, r=None, angle=120)[source]
Localized model for electron-electron interaction.
Currently, only square and hexagonal Bravais lattices are supported.
- Parameters:
- uijklstr
File with Coulomb tensor in orbital basis on uniform q mesh.
- vijkl_full, vijkl_redustr
Files with full and reduced bare Coulomb tensors. The difference is added as a correction to the Coulomb tensor provided via uijkl.
- nqtuple of int or int
Number of q points per dimension. If an integer is given, a 2D mesh with nq points in both the first and the second dimension is assumed (for backward compatibility). If omitted or
None, lattice vectors and corresponding interactions from Wmat are used unmodified.- noint
Number of orbitals. Ignored if Wmat is used.
- Wmatstr
File with density-density Coulomb matrix in orbitals basis for different lattice vectors.
- andarray, optional
Bravais lattice vectors. By default, a 2D lattice with angle between the first and the second basis vector is assumed.
- rndarray, optional
Positions of orbital centers. By default, all orbitals are assumed to be located at the origin of the unit cell.
- anglenumber, default 120
Angle between lattice vectors in degrees.
- Attributes:
- Rndarray
Lattice vectors \(\vec R\) of Wigner-Seitz supercell.
- datandarray
Corresponding density-density interaction in orbital basis.
- sizeint
Number of Wannier functions.
- cellslist of tuple of int, optional
Lattice vectors of unit cells if the model describes a supercell.
- Nlist of tuple of int, optional
Primitive vectors of supercell if the model describes a supercell.
- W(q1=0, q2=0, q3=0)[source]
Set up density-density Coulomb matrix for arbitrary q point.
- Parameters:
- q1, q2, q3float, default 0.0
q point in crystal coordinates with period \(2 \pi\).
- Returns:
- ndarray
Fourier transform of
data.
- WR(R1=0, R2=0, R3=0)[source]
Get density-density Coulomb matrix for arbitrary lattice vector.
- Parameters:
- R1, R2, R3int, default 0
Lattice vector in units of primitive vectors.
- Returns:
- ndarray
Element of
dataor zero.
- standardize(eps=0.0)[source]
Standardize real-space interaction data.
Keep only nonzero matrix elements.
Sum over repeated lattice vectors.
Sort lattice vectors.
- Parameters:
- epsfloat
Threshold for “nonzero” matrix elements in units of the maximum matrix element.
- supercell(N1=1, N2=1, N3=1)[source]
Map localized model for electron-electron interaction onto supercell.
- Parameters:
- N1, N2, N3tuple of int or int, default 1
Supercell lattice vectors in units of primitive lattice vectors. Multiples of single primitive vector can be defined via a scalar integer, linear combinations via a 3-tuple of integers.
- Returns:
- object
Localized model for electron-electron interaction for supercell.
- elphmod.elel.hartree_energy(rho_g, g_vect, ngm_g, uc_volume, a=1.0)[source]
Calculate the Hartree energy in units of Rydberg.
This function is basically a copy of Quantum ESPRESSO’s subroutine
v_hfromv_of_rho.f90.All input parameters can be obtained from reading the formatted charge-density output. Use
elphmod.el.read_rhoG_density()for this purpose.- Parameters:
- rho_gndarray
Electronic charge density \(\rho(\vec G)\) on reciprocal-space grid points.
- g_vectndarray
Reciprocal lattice vectors \(\vec G\).
- ngm_ginteger
Number of reciprocal lattice vectors.
- uc_volume: float
Unit-cell volume.
- Returns:
- ehartfloat
Hartree energy in units of Rydberg.
- elphmod.elel.orbital2band(U, H, nq, nk, band=0, status=False, share=False, dd=False)[source]
Transform Coulomb interaction from orbital basis onto single band.
- elphmod.elel.q2r(elel, W, a, r, fft=True)[source]
Interpolate electron-electron interaction on uniform q-point mesh.
- Parameters:
- elel
elphmod.elel.Model Localized model for electron-electron interaction.
- Wndarray
Density-density interaction matrices on complete uniform q-point mesh.
- andarray
Bravais lattice vectors.
- rndarray
Positions of orbital centers.
- fftbool
Perform Fourier transform? If
False, only the mapping to the Wigner-Seitz cell is performed.
- elel
- elphmod.elel.read_band_Coulomb_interaction(filename, nQ, nk, binary=False, share=False)[source]
Read Coulomb interaction for single band in band basis.
- elphmod.elel.read_local_Coulomb_tensor(filename, no, dd=False)[source]
Read local Coulomb tensor from VASP.