elph: electron-phonon coupling from EPW

class elphmod.elph.Model(epmatwp, wigner, el, ph, old_ws=False, divide_mass=True, shared_memory=False)

Localized model for electron-phonon coupling.

Parameters
epmatwpstr

File with electron-phonon coupling in localized bases from EPW.

wignerstr

File with definition of Wigner-Seitz supercells from modified EPW.

elobject

Tight-binding model for the electrons.

phobject

Mass-spring model for the phonons.

old_wsbool

Use previous definition of Wigner-Seitz cells?

divide_massbool

Divide electron-phonon coupling by square root of atomic masses?

shared_memorybool

Read coupling from EPW into shared memory?

Attributes
el, phobject

Tight-binding and mass-spring models.

Rk, Rgndarray

Lattice vectors of Wigner-Seitz supercells.

datandarray

Corresponding electron-phonon matrix elements.

qndarray

Previously sampled q point, if any.

gqndarray

Rk-dependent coupling for above q point for possible reuse.

g(q1=0, q2=0, q3=0, k1=0, k2=0, k3=0, elbnd=False, phbnd=False, broadcast=True, comm=<mpi4py.MPI.Intracomm object>)

Calculate electron-phonon coupling for arbitary points k and k + q.

\[\sqrt{2 \omega} g_{\nu m n} = \frac \hbar {\sqrt M} \bra{\vec k + \vec q m} \frac{\partial V}{\partial u_\nu} \ket{\vec k n}\]
Parameters
q1, q2, q2float

q point in crystal coordinates with period \(2 \pi\).

k1, k2, k3float

Ingoing k point in crystal coordinates with period \(2 \pi\).

elbndbool

Transform to electronic band basis? Provided for convenience. Since the Hamiltonian is diagonalized on the fly for each requested matrix element, this option lacks efficiency and control of complex phases. Consider the method sample of this class instead.

phbndbool

Transform to phononic band basis? Provided for convenience. Since the dynamical matrix is diagonalized on the fly for each requested matrix element, this option lacks efficiency and control of complex phases. Consider the method sample of this class instead.

broadcastbool

Broadcast result to all processors? If False, returns None on all but the first processor.

commMPI communicator

Group of processors running this function (for parallelization of Fourier transforms).

Returns
ndarray

Electron-phonon matrix element \(\sqrt{2 \omega} g_{\nu m n}\) in Ry3/2.

sample(*args, **kwargs)

Sample coupling.

See also

sample
elphmod.elph.coupling(filename, nQ, nb, nk, bands, Q=None, nq=None, offset=0, completion=True, complete_k=False, squeeze=False, status=False, phase=False)

Read and complete electron-phonon matrix elements.

elphmod.elph.read_EPW_output(epw_out, q, nq, nb, nk, bands=1, eps=0.0001, squeeze=False, status=False, epf=False)

Read electron-phonon coupling from EPW output file.

elphmod.elph.read_data(filename)

Read array to ASCII file.

elphmod.elph.read_patterns(filename, q, nrep, status=True)

Read XML files with displacement patterns from QE.

elphmod.elph.read_xml_files(filename, q, rep, bands, nbands, nk, squeeze=True, status=True, angle=120, angle0=0, old=False)

Read XML files with coupling in displacement basis from QE (nosym).

elphmod.elph.sample(g, q, nk, U=None, u=None, broadcast=True, shared_memory=False)

Sample coupling for given q and k points and transform to band basis.

One purpose of this routine is full control of the complex phase.

Parameters
gfunction

Electron-phonon coupling in the basis of electronic orbitals and Cartesian ionic displacements as a function of q and k in crystal coordinates with period \(2 \pi\).

qlist of 2-tuples

q points in crystal coordinates \(q_1, q_2 \in [0, 2 \pi)\).

nkint

Number of k points per dimension.

Undarray, optional

Electron eigenvectors for given k mesh. If present, transform from orbital to band basis.

undarray, optional

Phonon eigenvectors for given q points. If present, transform from displacement to band basis.

broadcastbool

Broadcast result from rank 0 to all processes?

shared_memorybool, optional

Store transformed coupling in shared memory?

elphmod.elph.transform(g, q, nk, U=None, u=None, broadcast=True, shared_memory=False)

Transform q- and k-dependent coupling to band basis.

See also

sample
elphmod.elph.write_data(filename, data)

Write array to ASCII file.

elphmod.elph.write_xml_files(filename, data, angle=120, angle0=0)

Write XML files with coupling in displacement basis.