PAOFLOW.inputs.read_QE_xml#

Functions#

uniform_grid_from_kpoints(kpoints_cart, b_vectors)

Recover the Monkhorst-Pack grid of an explicit, complete k-point list.

parse_qe_data_file_schema(data_controller, fname)

Parse the data-file-schema.xml file produced by Quantum ESPRESSO (≥7.0).

parse_qe_data_file(data_controller, fpath, fname)

Parse the legacy data-file.xml produced by Quantum ESPRESSO (≤6.x).

parse_qe_atomic_proj(data_controller, fname)

Parse the atomic_proj.xml file produced by Quantum ESPRESSO projwfc.x.

Module Contents#

PAOFLOW.inputs.read_QE_xml.uniform_grid_from_kpoints(kpoints_cart, b_vectors)[source]#

Recover the Monkhorst-Pack grid of an explicit, complete k-point list.

Parameters:
  • kpoints_cart (NDArray[np.float64], shape (nk, 3)) – k-points in Cartesian coordinates (units of 2 pi / alat), in file order.

  • b_vectors (NDArray[np.float64], shape (3, 3)) – Reciprocal lattice vectors as rows, same units.

Returns:

  • grid (tuple of int) – (nk1, nk2, nk3).

  • shift (tuple of int) – (k1, k2, k3), 0 for a Gamma-centred axis and 1 for a half-step offset (the K_POINTS automatic convention).

Raises:

ValueError – If the list is not a complete uniform grid, or not in the order of K_POINTS automatic (third index fastest), which the PAO Fourier transforms assume.

Notes

Explicit lists such as the full grid required by EPW and wannier90 leave no monkhorst_pack element in data-file-schema.xml. Crystal coordinates may be given in any periodic image (e.g. [0, 1) or (-1/2, 1/2]).

PAOFLOW.inputs.read_QE_xml.parse_qe_data_file_schema(data_controller, fname)[source]#

Parse the data-file-schema.xml file produced by Quantum ESPRESSO (≥7.0).

Parameters:
  • data_controller (DataController) – Object providing data_arrays and data_attributes. Required attributes: verbose.

  • fname (str) – Full path to the data-file-schema.xml file.

Returns:

Populates data_arrays and data_attributes with all structural, electronic, and k-grid information extracted from the XML file.

Return type:

None

PAOFLOW.inputs.read_QE_xml.parse_qe_data_file(data_controller, fpath, fname)[source]#

Parse the legacy data-file.xml produced by Quantum ESPRESSO (≤6.x).

Parameters:
  • data_controller (DataController) – Object providing data_arrays and data_attributes. Required attributes: verbose.

  • fpath (str) – Directory containing the XML file.

  • fname (str) – Name of the XML file (relative to fpath).

Returns:

Populates data_arrays and data_attributes with structural, electronic, and k-grid information extracted from the legacy XML format.

Return type:

None

PAOFLOW.inputs.read_QE_xml.parse_qe_atomic_proj(data_controller, fname)[source]#

Parse the atomic_proj.xml file produced by Quantum ESPRESSO projwfc.x.

Parameters:
  • data_controller (DataController) – Object providing data_arrays and data_attributes. Required attributes: verbose, save_overlaps, qe_version.

  • fname (str) – Full path to the atomic_proj.xml file.

Returns:

Populates data_arrays and data_attributes with projection matrices, overlap matrices, eigenvalues, and k-grid weights.

Return type:

None