EPWpy.QE.PH_util#
Functions
|
|
|
|
|
Reads dynmat.axsf file to return polarization vectors |
|
Classes
|
A class for parsing and analyzing phonon (PH) calculation properties. |
- class EPWpy.QE.PH_util.PHProperties(file, energy_range=None, version=7.4)[source]#
Bases:
objectA class for parsing and analyzing phonon (PH) calculation properties.
This class provides access to various physical quantities derived from Quantum ESPRESSO (QE) ph.x output files, such as dielectric constants, Fermi level, band structures, and lattice vectors. It serves as a post-processing utility to extract, store, and manipulate phonon-related data.
- Parameters:
file (str) -- Path to the phonon output file generated by QE (ph.out).
energy_range (float, optional) -- Energy window (in eV) around the Fermi level for evaluating band-related quantities. Defaults to
None.
- eps#
Static dielectric constant of the system.
- Type:
float
- nbnd_energy#
Number of bands within the specified energy range.
- Type:
int
- lattice_vec#
Lattice vectors extracted from the associated PW calculation.
- Type:
ndarray
- fermi_level#
Fermi energy or the highest occupied band energy (in eV).
- Type:
float
- atomic_positions#
Atomic positions in Cartesian or fractional coordinates.
- Type:
ndarray
- band_scf#
Self-consistent field (SCF) band structure data array.
- Type:
ndarray
Examples
>>> ph = PHProperties(file='Si.ph.out', energy_range=5.0) >>> print(ph.file) 'Si.ph.out' >>> print(ph.energy_range) 5.0
- property dynmat#
Returns the dynamical matrix
- property eps_ph#
Returns high-frequency dielectric matrix from DFPT
- property gkk#
Returns the electron–phonon coupling matrix g(ibnd, jbnd, imode, ik, iq) extracted from a Quantum ESPRESSO ph.x output file.
- The matrix has dimensions:
(nbnd_i, nbnd_j, nmodes, nkpoints, nqpoints)
- where:
ibnd, jbnd: band indices
imode: phonon mode index
ik, iq: k-point and q-point indices
- Returns:
5D array of electron–phonon coupling strengths in units consistent with the QE output.
- Return type:
np.ndarray
- property polarization_vector#
Compute and return the polarization vectors from the dynamical matrix file.
This property reads the dynmat.axsf file generated by dynmat.x and extracts the atomic displacement (polarization) vectors corresponding to phonon modes at the Γ-point or other q-points, depending on the underlying calculation.
- Returns:
A 3D NumPy array of shape
(nmode, natoms, 6)containing the polarization vectors and atomic coordinates for each phonon mode. ReturnsNoneif no polarization data are found.- Return type:
numpy.ndarray or None
Notes
Each entry in the last dimension (6 columns) corresponds typically to: [x, y, z, dx, dy, dz], where (x, y, z) are atomic positions and (dx, dy, dz) are displacement components for a given mode.
- property qpoints#
Returns q-points for Ph calculation