Skip to content

Commit

Permalink
add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsquires committed Mar 20, 2024
1 parent 9d079b6 commit c6d8835
Showing 1 changed file with 45 additions and 2 deletions.
47 changes: 45 additions & 2 deletions doped/interface/fermi_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ def scan_temperature(
processes: int = 1,
**kwargs,
) -> pd.DataFrame:
"""
With a given set of chemical potentials, scan over a range of temperatures
and solve for the defect concentrations and Fermi energy at each temperature.
Args:
chempots (dict): The chemical potentials to solve at.
temperature_range (float or list): The range of temperatures to scan over.
annealing_temperature_range (float or list): The range of annealing temperatures to scan over.
quenching_temperature_range (float or list): The range of quenching temperatures to scan over.
processes (int): The number of processes to use for parallelization.
Returns:
pd.DataFrame: DataFrame containing defect and carrier concentrations
"""
if annealing_temperature_range is not None and quenching_temperature_range is not None:
all_data = Parallel(n_jobs=processes)(
delayed(self._solve_and_append_chemical_potentials_pseudo)(
Expand Down Expand Up @@ -117,6 +131,22 @@ def scan_chemical_potentials(
processes: 1,
**kwargs,
) -> pd.DataFrame:
"""
Scan over a range of chemical
potentials and solve for the defect concentrations and Fermi energy at
each set of chemical potentials.
Args:
chempots (list): The chemical potentials to scan over.
temperature (float): The temperature to solve at.
annealing_temperature (float): The temperature to anneal at.
quenching_temperature (float): The temperature to quench to.
processes (int): The number of processes to use for parallelization.
Returns:
pd.DataFrame: DataFrame containing defect and carrier concentrations
"""

if annealing_temperature is not None and quenching_temperature is not None:
all_data = Parallel(n_jobs=processes)(
delayed(self._solve_and_append_chemical_potentials_pseudo)(
Expand Down Expand Up @@ -156,8 +186,21 @@ def scan_dopant_concentration(
dopant concentrations and solve for the defect concentrations and Fermi
energy at each dopant concentration.
Note:
Note: the sign of the effective dopant concentration determines whether
the dopant is an acceptor or donor. A negative value corresponds to an
acceptor, while a positive value corresponds to a donor.
Args:
chempots (dict): The chemical potentials to solve at.
effective_dopant_concentration_range (float or list): The range of
effective dopant concentrations to scan over.
temperature (float): The temperature to solve at.
annealing_temperature (float): The temperature to anneal at.
quenching_temperature (float): The temperature to quench to.
processes (int): The number of processes to use for parallelization.
Returns:
pd.DataFrame: DataFrame containing defect and carrier concentrations
"""
if annealing_temperature is not None and quenching_temperature is not None:
all_data = Parallel(n_jobs=processes)(
Expand Down

0 comments on commit c6d8835

Please sign in to comment.