PAOFLOW.boltzmann.do_doping#
Attributes#
Functions#
|
Evaluate the Fermi-Dirac occupation function. |
|
Integrate the DOS times the Fermi-Dirac function to get the electron count. |
|
Find the chemical potential that yields a target electron count. |
|
Compute the temperature-dependent chemical potential for a doped system. |
Module Contents#
- PAOFLOW.boltzmann.do_doping.FD(ene, mu, temp)[source]#
Evaluate the Fermi-Dirac occupation function.
- PAOFLOW.boltzmann.do_doping.calc_N(data_controller, ene, dos, mu, temp, dosweight=2.0)[source]#
Integrate the DOS times the Fermi-Dirac function to get the electron count.
- Parameters:
data_controller (DataController) – Object providing
data_attributes. Required attribute:core_electrons(int).ene (np.ndarray) – Energy grid (eV).
dos (np.ndarray, shape
(ne,)) – Density of states onene.mu (float) – Trial chemical potential (eV).
temp (float) – Temperature (K).
dosweight (float, optional) – Spin degeneracy weight applied to the integral (default
2.0).
- Returns:
Electron count minus
core_electronsminus the integrated DOS (negative of the total electron number minuscore_electrons).- Return type:
- PAOFLOW.boltzmann.do_doping.solve_for_mu(data_controller, ene, dos, N0, temp, refine=False, try_center=False, dosweight=2.0)[source]#
Find the chemical potential that yields a target electron count.
- Parameters:
data_controller (DataController) – Passed directly to
calc_N().ene (np.ndarray) – Energy grid (eV).
dos (np.ndarray, shape
(ne,)) – Density of states onene.N0 (float) – Target electron count (including doping offset).
temp (float) – Temperature (K).
refine (bool, optional) – When
True, perform a bounded scalar minimisation of \(|N(\mu) - N_0|\) around the best grid point (defaultFalse).try_center (bool, optional) – When
Trueandmufalls inside a band gap, try to place \(\mu\) at the gap centre (defaultFalse).dosweight (float, optional) – Spin degeneracy weight forwarded to
calc_N()(default2.0).
- Returns:
Chemical potential \(\mu\) (eV) that satisfies \(N(\mu) = N_0\) (computed on rank 0 only; all other ranks return
None).- Return type:
Notes
The function first scans the energy grid for the point that minimises \(|N(\mu) - N_0|\), then optionally refines using
scipy.optimize.minimize_scalarwithmethod='bounded'.
- PAOFLOW.boltzmann.do_doping.do_doping(data_controller, temps, ene, fname)[source]#
Compute the temperature-dependent chemical potential for a doped system.
- Parameters:
data_controller (DataController) – Object providing
data_arraysanddata_attributes. Required arrays:dos(fixed-smearing DOS) ordosdk(adaptive-smearing DOS), selected byattr['smearing']. Required attributes:smearing,doping_conc,nelec,omega.temps (array_like of float) – Temperatures in Kelvin at which \(\mu(T)\) is evaluated.
ene (np.ndarray) – Energy grid (eV) over which the DOS is defined.
fname (str) – Base name for the output file. The sign and magnitude of
doping_concare appended to produce e.g.fname_n1e18.dat.
- Returns:
Writes a two-column file
{fname}{sign}{|doping|}.datviaDataController.write_file_row_col()with columns temperature and \(\mu(T)\).- Return type:
None
Notes
The target electron number is \(N = N_{\rm elec} - n_d \Omega\) where \(\Omega\) is the unit-cell volume and \(n_d\) is the carrier concentration in \(\text{cm}^{-3}\). For each temperature
solve_for_mu()is called on rank 0 and the result broadcast.