INNER CODE UNIT · Python
get_zt
SMTG-Bham/ThermoParser · tp/cli/cli.py:681
def get_zt(transport_file, kappa, dtype, doping, direction, temperature, max):
"""Calculates and prints the ZT at given conditions.
Requires electronic input file, and preferably phononic input, else
lattice thermal conductivity defaults to 1.
"""
equants = ['conductivity', 'seebeck', 'electronic_thermal_conductivity']
ltc = 'lattice_thermal_conductivity'
try:
edata = tp.data.load.amset(transport_file, equants)
except UnicodeDecodeError:
try:
edata = tp.data.load.boltztrap(transport_file, equants, doping=dtype)
except ValueError:
edata = tp.data.load.boltztrap2(transport_file, equants)
if 'zt' in edata: