PAOFLOW.writers.write4bt2#

Attributes#

Functions#

write4bt2(data_controller)

Write eigenvalues and structure in GENE format for BoltzTraP2.

Module Contents#

PAOFLOW.writers.write4bt2.comm[source]#
PAOFLOW.writers.write4bt2.rank[source]#
PAOFLOW.writers.write4bt2.write4bt2(data_controller)[source]#

Write eigenvalues and structure in GENE format for BoltzTraP2.

Parameters:

data_controller (DataController) – Object providing data_arrays and data_attributes. Required arrays: E_k (shape (nkpnts, nbnds, nspin)), a_vectors (shape (3, 3)), b_vectors (shape (3, 3)), atoms (list of element symbols), tau (shape (natoms, 3)). Optionally pksp for band derivatives. Required attributes: nkpnts, nspin, nbnds, natoms, alat, nk1, nk2, nk3, savedir.

Returns:

If pksp is available, returns the momentum matrix diagonal converted to Rydberg units as shape (nkpnts, nbnds, 3). Returns None if pksp is not present.

Return type:

Optional[np.ndarray]

Notes

Two files are written to the directory specified by savedir (prefix obtained by removing the file extension):

  • {prefix}.energy: k-point coordinates in crystal units, number of bands, and band eigenvalues converted from eV to Rydberg (Ry2eV = 13.60569193).

  • {prefix}.structure: lattice vectors in Bohr, number of atoms, and atomic positions in crystal coordinates.

Only MPI rank 0 performs file I/O. The function must be called after pao_hamiltonian(), pao_eigh(), and gradient_and_momenta() (the last only when band derivatives are needed).