예제 #1
0
파일: dos.py 프로젝트: tllu/pymatgen
def f0(E, fermi, T):
    """
    Returns the equilibrium fermi-dirac.
    Args:
        E (float): energy in eV
        fermi (float): the fermi level in eV
        T (float): the temperature in kelvin
    """
    return 1.0 / (1.0 + np.exp((E - fermi) / (_cd("Boltzmann constant in eV/K") * T)))
예제 #2
0
def f0(E, fermi, T):
    """
    Returns the equilibrium fermi-dirac.
    Args:
        E (float): energy in eV
        fermi (float): the fermi level in eV
        T (float): the temperature in kelvin
    """
    return 1. / (1. + np.exp((E - fermi) / (_cd("Boltzmann constant in eV/K") * T)))
예제 #3
0
def f0_holes(E, fermi, T):
    """
    Returns 1-f0 (f0 = equilibrium fermi-dirac). Note that the exp is rewritten as (fermi -E).
    Args:
        E (float): energy in eV
        fermi (float): the fermi level in eV
        T (float): the temperature in kelvin
    """
    return 1. / (1. + np.exp((fermi - E) / (_cd("Boltzmann constant in eV/K") * T)))
예제 #4
0
import matplotlib
import numpy as np
import re
import warnings

matplotlib.use('agg')
from matplotlib.pylab import plot, show, scatter
from math import pi
from pymatgen.core.units import Energy
from pymatgen.io.vasp.outputs import Vasprun
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from scipy.constants.codata import value as _cd


# global constants
hbar = _cd('Planck constant in eV s')/(2*pi)
m_e = _cd('electron mass') # in kg
Ry_to_eV = 13.605698066
A_to_m = 1e-10
A_to_nm = 0.1
m_to_cm = 100
e = _cd('elementary charge')

# TODO: the reading from a fitted band structure file and reproduction of E, dE and d2E should be optimized in speed
# TODO: adding doc to explain each functions their inputs and outputs once Analytical_bands class is optimized.


__author__ = "Francesco Ricci and Alireza Faghaninia"
__copyright__ = "Copyright 2017, HackingMaterials"
__maintainer__ = "Francesco Ricci"
예제 #5
0
from scipy.constants.codata import value as _cd
from math import pi

# some global constants
hbar = _cd('Planck constant in eV s') / (2 * pi)
m_e = _cd('electron mass')  # in kg
Ry_to_eV = 13.605698066
A_to_m = 1e-10
m_to_cm = 100.00
A_to_nm = 0.1
e = _cd('elementary charge')
k_B = _cd("Boltzmann constant in eV/K")
epsilon_0 = 8.854187817e-12  # dielectric constant in vacuum [C**2/m**2N]
default_small_E = 1  # eV/cm the value of this parameter does not matter
dTdz = 10.0  # K/cm
sq3 = 3 ** 0.5