INNER CODE UNIT · Python

get_occupation

SMTG-Bham/ThermoParser · tp/cli/cli.py:404

def get_occupation(amset_mesh_file, dtype, doping, temperature, spin, poscar):
    """Prints AMSET occupation info at given conditions.

    Requires an AMSET mesh file.
    """

    from pymatgen.io.vasp.inputs import Poscar
    from scipy.constants import physical_constants
    kb = physical_constants['Boltzmann constant in eV/K'][0]
    if 'energy' in tp.settings.conversions():
        kb *= tp.settings.conversions()['energy']
    if 'temperature' in tp.settings.conversions():
        kb /= tp.settings.conversions()['temperature']

    data = tp.data.load.amset_mesh(amset_mesh_file, 'occupation energy vb_idx',
                                   spin=spin, doping=dtype)

    v = Poscar.from_file(poscar).structure.lattice.volume

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…