schrodinger.application.matsci.espresso.qeoutput module¶
Classes and functions to deal reading XML generated by Quantum Espresso.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.matsci.espresso.qeoutput.BandStructure(kpoints, eigenvals, efermi, struct=None)¶ Bases:
objectThis class is based on the class from pymatgen (MIT license).
-
generatePlotData()¶ Generate distances between k-points (in self.distances) for plotting band structure.
-
getBandGap()¶ Get band gap data.
Return type: dict Returns: dict with keys ENERGY_KEY, DIRECT_KEY, TRANSITION_KEY: ENERGY_KEY: band gap energy DIRECT_KEY: A boolean telling if the gap is direct or not TRANSITION_KEY: kpoint labels of the transition (e.g., “Gamma-X”)
-
getVbmCbm(vbm=True)¶ Return data about the valence band maximum (VBM) or conduction band minimum (CBM).
Parameters: vbm (bool) – If True calculates VBM, if False CBM Return type: dict Returns: - dict with keys BAND_INDEX_KEY, KPOINT_INDEX_KEY, KPOINT_KEY,
- ENERGY_KEY
- BAND_INDEX_KEY: A dict with spin keys pointing to a list of the
indices of the band containing the VBM (please note that you can have several bands sharing the VBM) {SPIN_UP:[], SPIN_DW:[]} - KPOINT_INDEX_KEY: The list of indices in self.kpoints for the kpoint vbm. Please note that there can be several kpoint_indices relating to the same kpoint (e.g., Gamma can occur at different spots in the band structure line plot) - KPOINT_KEY: The kpoint (as a kpoint object) - ENERGY_KEY: The energy of the VBM
-
isMetal()¶ Check if the band structure indicates a metal by looking if the Fermi level crosses a band.
Return type: bool Returns: True, if the system is metallic
-
-
class
schrodinger.application.matsci.espresso.qeoutput.DOS(band, dos_fn)¶ Bases:
objectBasic DOS class, based on the class from pymatgen (MIT license).
-
getCbmVbm(tol=0.001, abs_tol=False, spin=None)¶ Get Conduction Band Minimum (cbm) and Valence Band Maximum (vbm).
Param: tolerance in occupations for determining the cbm/vbm
Parameters: Return type: float, float
Returns: cbm and vbm in Ry corresponding to the gap
-
getDOS(degauss, delta_e=0.01)¶ Broaden energies and set DOS in self.dos. This requires self.band to be set in the constructor.
Parameters: - degauss (float) – Used only if dos is True, broadening (eV) for computing DOS
- delta_e (float) – Used only if dos is True, energy grid spacing (in eV)
Raises: ValueError – If self.band is None
-
getDensities(spin=None)¶ Get density of states for a particular spin.
Parameters: spin (str or None) – Can be SPIN_UP or SPIN_DW or None. Return type: numpy.arrayReturns: Density of states for a particular spin. If Spin is None, the sum of all spins is returned.
-
getGap(tol=0.001, abs_tol=False, spin=None)¶ Get the gap.
Param: tolerance in occupations for determining the gap
Parameters: Return type: float
Returns: gap in Ry or 0.0, if it is a metal
-
-
class
schrodinger.application.matsci.espresso.qeoutput.EsmType(data, bc_type, efield)¶ Bases:
tuple-
bc_type¶ Alias for field number 1
-
data¶ Alias for field number 0
-
efield¶ Alias for field number 2
-
-
class
schrodinger.application.matsci.espresso.qeoutput.KPoint(tag, vecs=None)¶ Bases:
objectClass to hold information about a k-point.
-
getCoords(coords_str)¶ Return list of coordinates.
Parameters: coords_str (str) – String representing K-point coordinates Return type: list of three floats Returns: K-point coordinates
-
getCoordsStr(frac=False)¶ Get string representation of the coordinates.
Parameters: frac (bool) – If True, self.frac_coords are returned, otherwise self.cart_coords Return type: str Returns: String representation of the coordinates
-
static
getKptFromCfg(kpt)¶
-
-
class
schrodinger.application.matsci.espresso.qeoutput.KptLegend(label, coords)¶ Bases:
tuple-
coords¶ Alias for field number 1
-
label¶ Alias for field number 0
-
-
class
schrodinger.application.matsci.espresso.qeoutput.OrderedDefaultDict(default_factory=None, *args, **kwargs)¶ Bases:
collections.OrderedDict,collections.defaultdictThis class implements ordered default dict functionality.
-
class
schrodinger.application.matsci.espresso.qeoutput.OutStruct(struct, std_struct)¶ Bases:
tuple-
std_struct¶ Alias for field number 1
-
struct¶ Alias for field number 0
-
-
class
schrodinger.application.matsci.espresso.qeoutput.Output(qegz_fn, struct=False, band=False, dos=False, pdos=False, esm=False, neb=False, phdos=False, phband=False, dynamics=False, tree=None)¶ Bases:
objectClass to deal with QE XML output parsing.
-
getMDStepStruct(step, timestep)¶ Extract MD step structure from step XML.
Parameters: - step (
xml.etree.ElementTree.Element) – step element - timestep (float) – MD time step
Return type: structure.Structure,structure.Structureor NoneReturns: Structure of the MD step, standardized structure if requested and found
- step (
-
-
class
schrodinger.application.matsci.espresso.qeoutput.PDOS(proj, wfc_types, efermi, band)¶ Bases:
objectClass that holds partial DOS (PDOS) data. Call getPDOS to get broadened data.
-
ADOS_IDX= 1¶
-
AIDOS_IDX= 3¶
-
ALDOS_IDX= 4¶
-
EDOS_IDX= 2¶
-
LDOS_IDX= 0¶
-
NUM_IDX= 5¶
-
getPDOS(degauss, delta_e=0.01)¶ Calculate PDOS and set in self.pdos.
Parameters: - degauss (float) – Broadening (eV) for computing PDOS
- delta_e (float) – Energy grid spacing eV
-
-
class
schrodinger.application.matsci.espresso.qeoutput.PhDOS(table)¶ Bases:
objectPhonon DOS class.
-
XAXIS_PROP= 'r_j_Frequency_(cm-1)'¶
-
getPhDOS(degauss, delta_e=0.01)¶ Broaden frequencies and set PhDOS in self.phdos.
Parameters: - degauss (float) – Broadening for computing DOS in cm-1
- delta_e (float) – Energy grid spacing in cm-1
-
-
class
schrodinger.application.matsci.espresso.qeoutput.WfcType(atom_idx, atom_type, n_qn, l_qn, m_qn)¶ Bases:
tuple-
atom_idx¶ Alias for field number 0
-
atom_type¶ Alias for field number 1
-
l_qn¶ Alias for field number 3
-
m_qn¶ Alias for field number 4
-
n_qn¶ Alias for field number 2
-
-
schrodinger.application.matsci.espresso.qeoutput.gaussian_delta(eigenval, energies, degauss)¶ Get Gaussian-function values
Parameters: - eigenval (float) – Energy at which to calculate Gaussian delta
- energies (
numpy.array) – Energy grid - degauss (float) – Broadening
Return type: numpy.arrayReturns: delta values on the grid