From c6d883556ab50a7d4b36da84934f9c241051904c Mon Sep 17 00:00:00 2001 From: alexquires Date: Wed, 20 Mar 2024 14:14:34 -0500 Subject: [PATCH] add docstrings --- doped/interface/fermi_solver.py | 47 +++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/doped/interface/fermi_solver.py b/doped/interface/fermi_solver.py index 9ad02f92..e7921cf2 100644 --- a/doped/interface/fermi_solver.py +++ b/doped/interface/fermi_solver.py @@ -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)( @@ -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)( @@ -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)(