### prepare_post_scf usage example Source: https://epwpy.org/_modules/EPWpy/EPWpy_prepare.html Example of calling prepare_post_scf to set up the post-SCF environment. ```python >>> prepare_post_scf(name="epw_workdir", filename="si.scf.out") ``` -------------------------------- ### Example usage of run_q2r Source: https://epwpy.org/_modules/EPWpy/EPWpy_run.html Demonstrates how to initialize PyRun and execute the q2r calculation. ```python >>> run = PyRun(procs=4, env='mpirun', code='/path/to/qe') >>> run.run_q2r(folder='./ph', name='graphene_q2r') # Executes equivalent to: # mpirun -np 4 /path/to/qe/q2r.x -in graphene_q2r.in > graphene_q2r.out ``` -------------------------------- ### Example usage of QE_XML Source: https://epwpy.org/_modules/EPWpy/utilities/read_QE_xml.html Demonstrates how to initialize the QE_XML class with a file path and retrieve basic information. ```python if __name__ == "__main__": qe = QE_XML("si/bs/si.xml") # or your file name qe.summary() kpts = qe.get_kpoints() eigs = qe.get_eigenvalues() print(eigs) print(f"\nFound {len(kpts)} k-points, {eigs.shape[1]} bands per k-point") ``` -------------------------------- ### prepare_epw2 usage example Source: https://epwpy.org/_modules/EPWpy/EPWpy_prepare.html Example of calling prepare_epw2 to set up the second EPW calculation step. ```python >>> prepare_epw2(name="epw_run", filename="si.epw2.in") ``` -------------------------------- ### ABINIT Input Generation Example Source: https://epwpy.org/_modules/EPWpy/Abinit/EPWpy_Abinit.html Demonstrates initializing the PyAbinit class and generating an ABINIT input file. ```python >>> from epwpy import PyAbinit >>> ab = PyAbinit(qe, {"ecut": 40, "ngkpt": [6,6,6]}, system="si") >>> ab.abi({"ecut": 50, "nstep": 50}, name="scf") # Generates 'scf.in' for ABINIT ``` -------------------------------- ### prepare_epw1 usage example Source: https://epwpy.org/_modules/EPWpy/EPWpy_prepare.html Example of calling prepare_epw1 to set up the first EPW calculation step. ```python >>> prepare_epw1(name="epw_run", filename="si.epw1.in") ``` -------------------------------- ### Plot phonon dispersion with current directory setup Source: https://epwpy.org/_sources/doc/notebooks/zg_anharmonicity_PbTe.ipynb.txt Use this snippet to start plotting the phonon dispersion for PbTe. It retrieves the current working directory using os.getcwd(), which may be needed for file paths. The snippet is incomplete and likely requires additional code to generate the plot. ```python # Plot the phonon dispersion current_directory = os.getcwd() ``` -------------------------------- ### prepare_epw3 usage example Source: https://epwpy.org/_modules/EPWpy/EPWpy_prepare.html Example of calling prepare_epw3 to set up the third EPW calculation step. ```python >>> prepare_epw3(name="epw_run", filename="si.epw3.in") ``` -------------------------------- ### Prepare ZG calculation directory Source: https://epwpy.org/doc/api/generated/EPWpy.EPWpy_prepare.html Example of initializing a ZG calculation directory with a specific name and input file. ```python >>> prepare_zg(name="zg_run", filename="si.zg.in") ``` -------------------------------- ### Setup and Parameters for PbTe Anharmonic Calculation Source: https://epwpy.org/_sources/doc/notebooks/zg_anharmonicity_PbTe.ipynb.txt Imports required libraries, defines constants, system parameters (nat, ntyp, supercell dimensions), k-point grid, temperature, and CPU pool settings. Also sets folder paths, prefix, and pseudopotential directory. ```python import numpy as np import math import os import shutil import sys import subprocess import EPWpy from EPWpy import EPWpy from EPWpy.plotting import plot_bands # Constants cm_1_to_meV = 0.124 Ry_to_meV = 13605.66228 # System nat=2 # number of atoms in the unit cell ntyp=2 # number of types of atoms dim1=2 # dimensions of the supercell dim2=2 dim3=2 nmodesu=nat*3 # total number of phonon modes in the unit cell dofsuper=dim1*dim2*dim3*nat*3*2 # total number of nuclear degrees of freedom in supercell, factor of 2 for directions # k-point grid for unit-cell nk1=6 nk2=6 nk3=6 # T=300 # target temperature to obtain the anharmonic phonon dispersion # Number of CPUs and pools ncores=56*4 npoolsuper = round((nk1*nk2*nk3) / (dim1*dim2*dim3) / 2) print("k-point parallelization (npools):", npoolsuper) ncoresuper = ncores - ncores % npoolsuper # take modulo print("Number of cores to be used:", ncoresuper) # font=16 # #Define folder locations, prefix and number of cores folder='./' cores='224' #pseudo = os.getcwd() + '/pseudos' pseudo='/home1/07369/mzach/epwpypseudos' QE = '/home1/07369/mzach/codes/q-e_dev_2024/bin' ######Define the directory of installation############## # prefix='PbTe' flfrc='\''+str(prefix)+'.fc\'' # ########################################################################## # Download pseudo from Pseudo-Dojo library print("===========================================") print("Downloading pseudo from Pseudo-Dojo library") # #define elements elements = ['Pb', 'Te'] masses = [207.2, 127.6] # Download pseudos for all elements, one could also use pseudo_auto option below for i in range(0, ntyp): if os.path.exists(f'./{elements[i]}.upf'): # If upf file exists then os.remove(f'./{elements[i]}.upf') # remove it from parent directory !wget http://www.pseudo-dojo.org/pseudos/nc-sr-04_pbesol_standard/{str(elements[i])}.upf.gz # !wget http://www.pseudo-dojo.org/pseudos/nc-fr-04_pbesol_standard/{str(elements[i])}.upf.gz # for SOC calculations !gunzip {str(elements[i])}.upf.gz if os.path.exists(f'/{pseudo}/{elements[i]}.upf'): # If upf file exists in pseudo directory os.remove(f'/{pseudo}/{elements[i]}.upf') # then remove it # shutil.move(f'./{elements[i]}.upf', pseudo) # mv upf file in pseudo directory ######################################################################### # ``` -------------------------------- ### Prepare SCF calculation directory Source: https://epwpy.org/doc/api/generated/EPWpy.EPWpy_prepare.html Example of initializing an SCF calculation directory with a specific name and input file. ```python >>> prepare_scf(name="scf_run", filename="si.scf.in") ``` -------------------------------- ### Prepare Dynmat Calculation Source: https://epwpy.org/doc/api/generated/EPWpy.QE.EPWpy_QE.html Example of initializing a PyQE object for a dynmat calculation and generating the input file. ```python >>> qe = PyQE({"type": "dynmat"}, system="si") >>> dynmat_params = {"fildyn": "si.dyn", "qpoints": [[0,0,0], [0.5,0,0]]} >>> qe.dynmat(dynmat=dynmat_params, name="dynmat_si") ``` -------------------------------- ### Retrieve Total Energy Source: https://epwpy.org/doc/api/generated/EPWpy.QE.EPWpy_QE.html Example of using PW_utilities to get the total energy from a Quantum ESPRESSO calculation. ```python >>> pw_util = qe.PW_utilities() >>> pw_util.get_total_energy() ``` -------------------------------- ### Initialize Environment and Paths Source: https://epwpy.org/doc/notebooks/phasediagram.html Imports necessary libraries and sets up pseudopotential directories, working directories, and parallelization parameters. ```python import os import math import numpy as np import EPWpy from EPWpy import EPWpy from EPWpy.QE.PW_util import * from scipy.integrate import simpson from scipy.interpolate import interp1d # Set your pseudopotential dir. This tutorial use LDA # paramiterized by Pseudodojo pseudo = '/work2/08400/jsyeb/frontera/epwpy/pseudos' workdir = '/scratch/08400/jsyeb/' cores = 48 bccnk = 24 hcpnk = 12 ``` -------------------------------- ### Initialize PyAbinit and generate input Source: https://epwpy.org/_modules/EPWpy/Abinit/EPWpy_Abinit.html Demonstrates how to initialize the PyAbinit interface using a PyQE object and generate an ABINIT input file. ```python >>> from epwpy import PyQE, PyAbinit >>> qe = PyQE({"type": "scf"}, system="si") >>> ab = PyAbinit(qe, {"ecut": 40, "ngkpt": [6,6,6]}, system="si") >>> ab.write_input() # Generates ABINIT input file ``` -------------------------------- ### Install EPWpy from PyPI Source: https://epwpy.org/_sources/doc/Documentation2.rst.txt Install the stable EPWpy package from PyPI. ```bash pip install epwpy-basic ``` -------------------------------- ### Install EPWpy development version Source: https://epwpy.org/_sources/doc/Documentation2.rst.txt Install the latest development version of EPWpy from the GitLab repository. ```bash git clone https://gitlab.com/epwpy/epwpy.git cd epwpy python setup.py install ``` -------------------------------- ### Set up working environment and import EPWpy Source: https://epwpy.org/doc/notebooks/supercond_aniso_v1.2.html Imports numpy, sys, os, and EPWpy modules, adds the parent directory to the Python path, and sets the path to Quantum ESPRESSO binaries. The path is printed to verify the setup. ```python import numpy as np import sys, os sys.path.insert(0,str(os.getcwd())+'/../') from EPWpy import EPWpy from EPWpy.plotting import plot_supercond pathQE='/home/shashi-phy/codes/q-e/bin' print(pathQE) ``` -------------------------------- ### Install EPWpy from Source Source: https://epwpy.org/_sources/doc/DownloadAndInstall.rst.txt Standard installation command for the EPWpy library from the unpacked source directory. ```bash python setup.py install ``` -------------------------------- ### Initialize BandUtil Source: https://epwpy.org/_modules/EPWpy/QE/band_util.html Demonstrates how to instantiate the BandUtil class with a system name and prefix, and access its default directory and file attributes. ```python >>> bands = BandUtil(system='si', prefix='si') >>> print(bands.bs_fold) 'bs' >>> print(bands.scf_file) 'scf' ``` -------------------------------- ### ABINIT Input Dictionary Example Source: https://epwpy.org/_modules/EPWpy/Abinit/EPWpy_Abinit.html Example of the dictionary structure used for defining ABINIT input keywords and parameters. ```python {"ecut": 50, "ngkpt": [6,6,6], "nstep": 100} ``` -------------------------------- ### Install EPWpy with Quantum ESPRESSO and EPW Source: https://epwpy.org/_sources/doc/Documentation2.rst.txt Install EPWpy with Quantum ESPRESSO and EPW compilation, specifying configuration options. ```bash git clone https://gitlab.com/epwpy/epwpy.git cd epwpy python setup.py install --withQE True --configs 'with-scalapack=intel' --cores 32 --version 6.0 ``` -------------------------------- ### Run SCF calculation with PyRun Source: https://epwpy.org/doc/api/generated/EPWpy.EPWpy_run.html Example of initializing a PyRun instance and executing an SCF calculation using Quantum ESPRESSO. ```python >>> run = PyRun(procs=8, env='srun', code='/path/to/qe') >>> run.run_scf(folder='./scf', name='graphene_scf') # Executes equivalent to: # srun -n 8 /path/to/qe/pw.x -nk 4 -nt 2 -in graphene_scf.in > graphene_scf.out ``` -------------------------------- ### Install EPWpy with QE+EPW Integration Source: https://epwpy.org/_sources/doc/DownloadAndInstall.rst.txt Command to install EPWpy while automatically downloading and building QE+EPW executables. Replace and with appropriate values. ```bash python setup.py install --with-QE True --config --cores ``` -------------------------------- ### _set_epw_start: set start EPW flags Source: https://epwpy.org/_modules/EPWpy/QE/set_QE.html Sets EPW parameters for a fresh start: epwread false, epbread false, epwwrite true, wannierize true. ```python def _set_epw_start(self,epwin): """ Setting epw variables for a restart """ self.epw_params.update({'epwread':'.false.', 'epbread':'.false.', 'epwwrite':'.true.', 'wannierize':'.true.'}) ``` -------------------------------- ### Prepare an SCF calculation with PyQE Source: https://epwpy.org/doc/api/generated/EPWpy.QE.EPWpy_QE.html Demonstrates initializing a PyQE object and calling the scf method with specific control, system, and kpoints parameters. ```python >>> qe = PyQE({"type": "scf"}, system="graphene") >>> qe.scf( ... control={"calculation": "scf", "prefix": "graphene"}, ... system={"ecutwfc": 60, "occupations": "smearing"}, ... kpoints={"type": "automatic", "grid": [12, 12, 1]} ... ) ``` -------------------------------- ### Install EPWpy via pip Source: https://epwpy.org/_sources/doc/DownloadAndInstall.rst.txt Standard installation commands for EPWpy using pip. Use the bracketed options to enable additional features like visualization or Materials Project integration. ```bash pip install EPWpy-basic ``` ```bash pip install EPWpy-basic[visualization] ``` ```bash pip install EPWpy-basic[materials-project] ``` -------------------------------- ### Create ZG input file and run calculation Source: https://epwpy.org/doc/notebooks/zg_anharmonicity_PbTe.html Configures the ZG input parameters, prepares the necessary folders, and executes the ZG calculation. ```python pbte.zg(inputzg={'flfrc':flfrc, 'T':T, 'dim1':dim1, 'dim2':dim2, 'dim3':dim3, 'atm_zg(1)':f'\'{elements[0]}\'', 'atm_zg(2)':f'\'{elements[1]}\'', 'error_thresh':'0.4', 'niters':'4000', 'incl_qA':'.true.', 'ASDM':'.true.'}, inputazg={'poly':'.false.', 'poly_fd_forces':'.false.', 'iter_idx':1, 'apply_fd':'.true.'} ) ## Prepare folders and copy necessary files ## pbte.prepare(1,type_run='zg') ## Run calculation ## pbte.run(2,type_run='zg') ``` -------------------------------- ### Initialize PyAnalysis with custom folders Source: https://epwpy.org/doc/api/generated/EPWpy.EPWpy_analysis.html Demonstrates how to instantiate the PyAnalysis class by specifying custom directory names for EPW, SCF, and NSCF output files. ```python >>> from epwpy.analysis import PyAnalysis >>> analysis = PyAnalysis(epw_fold='epw_out', scf_fold='scf', nscf_fold='nscf') >>> print(analysis.epw_fold) 'epw_out' ``` -------------------------------- ### SetDefaultVals.get_default_writer Source: https://epwpy.org/doc/api/generated/EPWpy.default.set_default.html Gets the writer. ```APIDOC ## SetDefaultVals.get_default_writer ### Description Gets the writer. ### Method get_default_writer() ``` -------------------------------- ### PyAbinit.prepare() Source: https://epwpy.org/doc/api/generated/EPWpy.Abinit.EPWpy_Abinit.html Method to prepare ABINIT files. ```APIDOC ## PyAbinit.prepare(procs=1, type_run='abinit', name=None, infile=None, transfer_file=None) ### Description This function prepares Abinit files. ``` -------------------------------- ### atom_cart() Source: https://epwpy.org/doc/api/generated/EPWpy.structure.lattice.html Gets atomic positions in cartesian coordinates. ```APIDOC ## atom_cart() ### Description Gets atomic positions in cartesian coordinates. ### Method atom_cart() ### Parameters None ### Returns Atomic positions in cartesian coordinates. ``` -------------------------------- ### pw Source: https://epwpy.org/doc/api/generated/EPWpy.QE.EPWpy_QE.html PW setup and setting with a changing state. ```APIDOC ## pw ### Description PW setup and setting with a changing state. ### Method pw ### Parameters - **control** (dict) - Control parameters. - **system** (dict) - System parameters. - **electrons** (dict) - Electrons parameters. - **ions** (dict) - Ions parameters. - **cell** (dict) - Cell parameters. - **kpoints** (dict) - K-points parameters. - **cell_parameters** (dict) - Cell parameters. - **hubbard** (dict) - Hubbard parameters. - **fcp** (dict) - FCP parameters. - **solvents** (dict) - Solvent parameters. - **occupations** (dict) - Occupation parameters. - **atomic_velocities** (dict) - Atomic velocities parameters. - **constraints** (dict) - Constraints parameters. - **atomic_forces** (dict) - Atomic forces parameters. - **rism** (dict) - RISM parameters. - **cards** (dict) - Cards parameters. ``` -------------------------------- ### Prepare and run PH calculation Source: https://epwpy.org/doc/notebooks/polaron_v1.2.html Sets up the PH input file with a 3x3x3 q-point grid and runs the phonon calculation with 4 processors. ```python # Prepare ph input file lif.ph(phonons={'nq1':3, 'nq2':3, 'nq3':3}) # Run ph calculation lif.prepare(type_run='ph') lif.run(4,type_run='ph') ``` -------------------------------- ### get_mass() Source: https://epwpy.org/doc/api/generated/EPWpy.structure.lattice.html Gets mass. This method retrieves the atomic masses for the structure. ```APIDOC ## get_mass() ### Description Gets mass. This method retrieves the atomic masses for the structure. ### Returns - **object** - The mass information. ``` -------------------------------- ### Create ZG input file and run iteration 2 Source: https://epwpy.org/doc/notebooks/zg_anharmonicity_PbTe.html Configures the ZG input parameters for the second iteration, prepares the necessary folders, and executes the calculation. ```python pbte.zg(inputzg={'flfrc':f'\'{T}.00K_iter_01.fc\'', 'T':T, 'dim1':dim1, 'dim2':dim2, 'dim3':dim3, 'error_thresh':'0.4', 'niters':'4000', 'fd':'.true.', 'na_ifc':'.true.', 'ASDM':'.true.'}, inputazg={'poly':'.false.','poly_fd_forces':'.false.', 'iter_idx':2, 'apply_fd':'.true.', 'read_fd_forces':'.false.','mixing':'.false.'} ) # Note here that we add the flags 𝚏𝚍 =.πšπš›πšžπšŽ., πš—πšŠ_πš’πšπšŒ =.πšπš›πšžπšŽ. to account for long range # effects since the IFCs in 𝟹𝟢𝟢.πŸΆπŸΆπ™Ί_πš’πšπšŽπš›_𝟢𝟷.𝚏𝚌 are obtained by finite differences. ## Prepare folders and copy necessary files ## pbte.prepare(1,type_run='zg') ## Run calculation ## pbte.run(2,type_run='zg') ``` -------------------------------- ### EPW execution output Source: https://epwpy.org/doc/notebooks/quadrupole.html Example of the console output generated during the EPW calculation. ```text (4, 3) [51, 51, 51] -- -- -- -- -- -- -- -- -- -- -- Calculation: epw2 -- -- -- -- -- -- -- -- -- -- -- on 1: running: mpirun -np 1 /mnt/storage/sabya/For_video/epwpy/build/q-e-EPW-5.9s/bin/epw.x -nk 1 -in epw2.in > epw2.out Running epw2 |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| in 7.0s (0.21/s) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ``` -------------------------------- ### Prepare phonon calculation with qe.ph() Source: https://epwpy.org/doc/api/generated/EPWpy.QE.EPWpy_QE.html Prepare a phonon (PH) calculation input for Quantum ESPRESSO using the ph() method. The example sets phonon parameters and a q-point grid, then prints the generated input file name. ```python >>> qe = PyQE({"type": "ph"}, system="graphene") >>> qe.ph( ... phonons={"tr2_ph": 1.0e-14, "ldisp": True, "nq1": 4, "nq2": 4, "nq3": 1}, ... qpoints={"grid": [4, 4, 1]}, ... name="graphene_phonon" ... ) >>> print(qe.ph_file) graphene_phonon ``` -------------------------------- ### prepare_epw1(name='epw', filename='epw1.in') Source: https://epwpy.org/doc/api/generated/EPWpy.EPWpy_prepare.html Prepare EPW coarse-grid (epw1) calculation directory. Sets up the folder for the first EPW step using coarse k/q grids. Transfers necessary NSCF and phonon outputs, copies the EPW input file, and optionally performs post-processing. ```APIDOC ## prepare_epw1(name='epw', filename='epw1.in') ### Description Prepare EPW coarse-grid (epw1) calculation directory. Sets up the folder for the first EPW step using coarse k/q grids. Transfers necessary NSCF and phonon outputs, copies the EPW input file, and optionally performs post-processing. ### Parameters - **name** (str, optional) - Target directory for the EPW calculation (default: "epw"). - **filename** (str, optional) - Input file for EPW step 1 (default: "epw1.in"). ### Workflow 1. Creates the directory if it doesn't exist. 2. Transfers NSCF .save folder and phonon _ph0 directory (or links them if dolink=True). 3. Copies dynamical matrices from the PH folder. 4. Copies the EPW input file. 5. Transfers additional files and runs post-processing (pp()). ### Example ``` >>> prepare_epw1(name="epw_run", filename="si.epw1.in") ``` ``` -------------------------------- ### Execute run_epw2 calculation Source: https://epwpy.org/_modules/EPWpy/EPWpy_run.html Example of initializing PyRun and executing the run_epw2 method. ```python >>> run = PyRun(procs=8, env='mpirun', code='/path/to/qe') >>> run.proc_set = None >>> run.run_epw2(folder='./epw', name='epw2') # Executes equivalent to: # mpirun -np 8 /path/to/qe/epw.x -nk 8 -in epw2.in > epw2.out ``` -------------------------------- ### Prepare and run SCF calculation Source: https://epwpy.org/doc/notebooks/polaron_v1.2.html Sets up the SCF input file for LiF with a convergence threshold of 1.0d-12 and a 6x6x6 k-point grid, then runs the calculation with 4 processors. ```python # Prepare scf input file lif.scf(electrons={'conv_thr':'1.0d-12'}, kpoints={'kpoints':[[6, 6, 6]]}, name='scf') lif.prepare(type_run='scf') # Run scf calculation lif.run(4) ``` -------------------------------- ### get_response(atoms) Source: https://epwpy.org/doc/api/generated/EPWpy.structure.lattice.html Gets response. This method retrieves a response for the given atoms. ```APIDOC ## get_response(atoms) ### Description Gets response. This method retrieves a response for the given atoms. ### Parameters - **atoms** (object) - Required - The atoms for which to get the response. ### Returns - **object** - The response. ``` -------------------------------- ### get_valence_max(Band_scf, E_f, thr=0.1, gap=1) Source: https://epwpy.org/doc/api/generated/EPWpy.QE.PW_util.html Gets the valence band maximum. ```APIDOC ## get_valence_max(Band_scf, E_f, thr=0.1, gap=1) ### Description Gets the valence band maximum. ### Method Function ### Signature `get_valence_max(Band_scf, E_f, thr=0.1, gap=1)` ### Parameters - **Band_scf** (np.ndarray) - Required - Band structure array. - **E_f** (float) - Required - Fermi level. - **thr** (float) - Optional - Threshold. Default is 0.1. - **gap** (float) - Optional - Gap value. Default is 1. ### Returns - Valence band maximum (float). ``` -------------------------------- ### Prepare a ZG calculation with PyQE Source: https://epwpy.org/doc/api/generated/EPWpy.QE.EPWpy_QE.html Demonstrates configuring ZG and auxiliary ZG parameters and generating the input file using the zg method. ```python >>> qe = PyQE({"type": "zg"}, system="si") >>> zg_params = {"fildyn": "si.dyn", "output_format": "cube"} >>> azg_params = {"projection": True, "energy_window": [0, 10]} >>> qe.zg(zg=zg_params, azg=azg_params, name="zg_si") >>> print(qe.zg_file) zg_si ``` -------------------------------- ### get_conduction_min(Band_scf, E_f, thr=0.1, gap=10) Source: https://epwpy.org/doc/api/generated/EPWpy.QE.PW_util.html Gets the conduction band minimum. ```APIDOC ## get_conduction_min(Band_scf, E_f, thr=0.1, gap=10) ### Description Gets the conduction band minimum. ### Method Function ### Signature `get_conduction_min(Band_scf, E_f, thr=0.1, gap=10)` ### Parameters - **Band_scf** (np.ndarray) - Required - Band structure array. - **E_f** (float) - Required - Fermi level. - **thr** (float) - Optional - Threshold. Default is 0.1. - **gap** (float) - Optional - Gap value. Default is 10. ### Returns - Conduction band minimum (float). ```