





"""simple docstring"""





import argparse


SCREAMING_SNAKE_CASE__   =  "docs/source/_static/js/custom.js"


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		Optional[Any]     ):







      '''simple docstring'''




      with open(SCREAMING_SNAKE_CASE				,		encoding="""utf-8"""				,		newline="""\n"""     ) as f:
            lowerCAmelCase    		=			f.readlines()
      lowerCAmelCase    		=			0

      # First let's put the right version
      while not lines[index].startswith("""const stableVersion ="""     ):
            index += 1
      lowerCAmelCase    		=			F'const stableVersion = "v{version}"\n'

      # Then update the dictionary
      while not lines[index].startswith("""const versionMapping = {"""     ):
            index += 1

      # We go until the end
      while not lines[index].startswith("""}"""     ):
            index += 1
      # We add the new version at the end
      lines[index - 1] += F'    "v{version}": "v{version}",\n'

      with open(SCREAMING_SNAKE_CASE				,		"""w"""				,		encoding="""utf-8"""				,		newline="""\n"""     ) as f:
            f.writelines(SCREAMING_SNAKE_CASE     )


if __name__ == "__main__":
       SCREAMING_SNAKE_CASE__   =  argparse.ArgumentParser()
       parser.add_argument("--version", help="Release version.")
       SCREAMING_SNAKE_CASE__   =  parser.parse_args()
       update_custom_js(args.version)













"""simple docstring"""





from math import log

from scipy.constants import Boltzmann, physical_constants

SCREAMING_SNAKE_CASE__   =  300  # TEMPERATURE (unit = K)


def      UpperCAmelCase__				(    SCREAMING_SNAKE_CASE	:		float				,		SCREAMING_SNAKE_CASE	:		float				,		SCREAMING_SNAKE_CASE	:		float				,		):







      '''simple docstring'''




      if donor_conc <= 0:
            raise ValueError("""Donor concentration should be positive"""     )
      elif acceptor_conc <= 0:
            raise ValueError("""Acceptor concentration should be positive"""     )
      elif intrinsic_conc <= 0:
            raise ValueError("""Intrinsic concentration should be positive"""     )
      elif donor_conc <= intrinsic_conc:
            raise ValueError(
                """Donor concentration should be greater than intrinsic concentration"""     )
      elif acceptor_conc <= intrinsic_conc:
            raise ValueError(
                """Acceptor concentration should be greater than intrinsic concentration"""     )
      else:
            return (
                Boltzmann
                * T
                * log((donor_conc * acceptor_conc) / intrinsic_conc**2     )
                / physical_constants["electron volt"][0]
            )


if __name__ == "__main__":
       import doctest

       doctest.testmod()






