def __init__(self, T = 200): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = InGaAs(T = self.TL) barrier = AlInAs(T = self.TL) self.addLayerWM(5.1, well) # <----- # 0 uniformly doped to 4*10^17 cm^-3 self.addLayerWM(7.5, barrier) self.addLayerWM(1.25, well) self.addLayerWM(6.5, barrier) self.addLayerWM(1.45, well) self.addLayerWM(6.4, barrier) self.addLayerWM(1.7, well) self.addLayerWM(7.9, barrier) self.addLayerWM(2.0, well) self.addLayerWM(7.7, barrier) self.addLayerWM(2.4, well) self.addLayerWM(7.5, barrier) self.addLayerWM(2.9, well) self.addLayerWM(7.1, barrier) self.addLayerWM(3.5, well) self.addLayerWM(6.8, barrier) idop= 0 vdop = 4e17 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 300): Structure.__init__(self, T = T) self.setIFR(0.1, 10) alinas_s = AlInAs(x = 0.665, T = self.TL) gainas_s = InGaAs(x = 0.635, T = self.TL) self.addLayerWM(3.5, alinas_s) self.addLayerWM(1.31, gainas_s) self.addLayerWM(1.48, alinas_s) self.addLayerWM(3.76, gainas_s) self.addLayerWM(1.03, alinas_s) self.addLayerWM(3.29, gainas_s) self.addLayerWM(1.99, alinas_s) self.addLayerWM(2.76, gainas_s) self.addLayerWM(1.4, alinas_s) self.addLayerWM(2.41, gainas_s) self.addLayerWM(1.48, alinas_s) self.addLayerWM(2.46, gainas_s) self.addLayerWM(1.33, alinas_s) self.addLayerWM(2.19, gainas_s) #13 <---- Doped self.addLayerWM(1.58, alinas_s) # self.addLayerWM(1.85, gainas_s) # self.addLayerWM(1.97, alinas_s) # self.addLayerWM(1.74, gainas_s) #17 <-- until here self.addLayerWM(2.06, alinas_s) self.addLayerWM(1.47, gainas_s) self.addLayerWM(2.17, alinas_s) self.addLayerWM(1.56, gainas_s) dop = 0.1554e18 idop = [13,14,15,16,17] [self.addDoping(0, self.layers[i].width, dop, i) for i in idop]
def loadStructures(self, origs, path): ''' Load structures from directory tree. Assumes the following structure: path/sid/wannier8.inp/, where sid is the structure id (integer). Parameters origs: model structure, where layer widths will be replaced by read widths, for each structure path: path to root directory of tree. ''' structures = [] dirs = su.listdirs(path) for folder in dirs: s = Structure(origs) with open(path + "/" + folder + "/wannier8.inp", 'r') as wannier: s.sid = int(folder) s.dirname = str(s.sid) Nl = int(wannier.readline()) Ncomm = 5 for _ in range(Ncomm): wannier.readline() for i in range(Nl): lw = float(wannier.readline().split()[0]) s.layers[i].width = lw structures.append(s) return structures
def __init__(self, T = 300): Structure.__init__(self, T = T) self.setIFR(0.1, 10) alinas_s = AlInAs(x = 0.64, T = self.TL) gainas_s = InGaAs(x = 0.58, T = self.TL) alinas_s.calcStrain() gainas_s.calcStrain() self.addLayerWM(3.1, alinas_s) self.addLayerWM(2.52, gainas_s) self.addLayerWM(1.23, alinas_s) self.addLayerWM(5.77, gainas_s) self.addLayerWM(0.74, alinas_s) self.addLayerWM(5.0, gainas_s) self.addLayerWM(1.01, alinas_s) self.addLayerWM(4.49, gainas_s) self.addLayerWM(1.27, alinas_s) self.addLayerWM(3.79, gainas_s) # <----- #9 Doped to 0.120276*10^18 cm^-3 self.addLayerWM(1.29, alinas_s) # <----- #10 Doped to 0.120276*10^18 cm^-3 self.addLayerWM(3.23, gainas_s) # <----- #11 Doped to 0.120276*10^18 cm^-3 self.addLayerWM(1.60, alinas_s) self.addLayerWM(2.89, gainas_s) self.addLayerWM(1.89, alinas_s) self.addLayerWM(3.01, gainas_s) dop = 0.120276e18 self.addDoping(0, 3.79, dop, 9) self.addDoping(0, 1.29, dop, 10) self.addDoping(0, 3.23, dop, 11)
def __init__(self, T = 300): Structure.__init__(self, T = T) self.setIFR(0.1, 10) alinas = AlInAs(T = self.TL) gainas = InGaAs(T = self.TL) self.addLayerWM(4.0,alinas) self.addLayerWM(1.67, gainas) self.addLayerWM(0.86,alinas) self.addLayerWM(5.06, gainas) self.addLayerWM(0.92,alinas) self.addLayerWM(4.66, gainas) self.addLayerWM(1.04,alinas) self.addLayerWM(3.93, gainas) self.addLayerWM(1.76,alinas) self.addLayerWM(3.2, gainas) self.addLayerWM(1.71,alinas) self.addLayerWM(2.84, gainas) self.addLayerWM(1.91,alinas) self.addLayerWM(2.74, gainas) #13 <---- Doped self.addLayerWM(2.78,alinas) #14 <---- Doped self.addLayerWM(2.55, gainas) dop = 0.181e18 idop = [13, 14] [self.addDoping(0, self.layers[i].width, dop, i) for i in idop]
def __init__(self, T = 300): Structure.__init__(self, T = T) self.setIFR(0.1, 10) alinas = AlInAs(T = self.TL) gainas = InGaAs(T = self.TL) self.addLayerWM(4.0,alinas) self.addLayerWM(1.8, gainas) self.addLayerWM(0.8,alinas) self.addLayerWM(5.3, gainas) self.addLayerWM(1.0,alinas) self.addLayerWM(4.8, gainas) self.addLayerWM(1.1,alinas) self.addLayerWM(4.3, gainas) self.addLayerWM(1.4,alinas) self.addLayerWM(3.6, gainas) self.addLayerWM(1.7,alinas) self.addLayerWM(3.3, gainas) self.addLayerWM(2.4,alinas) self.addLayerWM(3.1, gainas) #13 <---- Doped self.addLayerWM(3.4,alinas) #14 <---- Doped self.addLayerWM(2.9, gainas) dop = 0.12e18 idop = [13, 14] [self.addDoping(0, self.layers[i].width, dop, i) for i in idop]
def __init__(self, T = 150): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.15, T = self.TL) self.addLayerWM(3.8, barrier) self.addLayerWM(11.8, well) self.addLayerWM(0.5, barrier) self.addLayerWM(11.8, well) self.addLayerWM(1.0, barrier) self.addLayerWM(12.4, well) self.addLayerWM(1.9, barrier) self.addLayerWM(11.3, well) self.addLayerWM(2.9, barrier) self.addLayerWM(9.1, well) self.addLayerWM(2.9, barrier) self.addLayerWM(8.2, well) self.addLayerWM(2.9, barrier) self.addLayerWM(6.8, well) self.addLayerWM(2.9, barrier) self.addLayerWM(16.3, well) # 15 <--- doped to 4.1e16 cm-3 self.addLayerWM(2.9, barrier) self.addLayerWM(13.9, well) idop= 15 vdop = 3e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 150): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.15, T = self.TL) self.addLayerWM(4.2, barrier) self.addLayerWM(10.0, well) self.addLayerWM(0.7, barrier) self.addLayerWM(18.3, well) self.addLayerWM(1.0, barrier) self.addLayerWM(15.2, well) self.addLayerWM(1.3, barrier) self.addLayerWM(12.7, well) self.addLayerWM(1.7, barrier) self.addLayerWM(10.5, well) self.addLayerWM(2.7, barrier) self.addLayerWM(21.1, well) # 11 <--- doped to 3.8e16 cm-3 self.addLayerWM(2.4, barrier) self.addLayerWM(16.5, well) idop= 11 vdop = 3.8e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def loadAllStructures(cls, resultpath, origs): Nl = len(origs.layers) Ndop = len(origs.dopings) Structure.sid = 0 structures = [] with open(resultpath + "/results.log") as resfile: for line in resfile: line = line.split() try: sid = int(line[0]) except (ValueError, IndexError): continue # comment or empty line, skip s = Structure(origs) for il in range(Nl): w = float(line[il + 2]) x = line[il + 2 + Ndop * 3 + Nl] try: x = float(x) s.layers[il].material.updateAlloy(x) except (ValueError): pass # x = 'None' s.layers[il].width = w for idop in range(Ndop): for i in range(3): s.dopings[idop][i] = float(line[Nl + 2 + idop * 3 + i]) structures.append(s) return structures
def __init__(self, T = 300): Structure.__init__(self, T = T) self.setIFR(0.1, 10) alinas_s = AlInAs(x = 0.64, T = self.TL) gainas_s = InGaAs(x = 0.58, T = self.TL) self.addLayerWM(3.1, alinas_s) self.addLayerWM(2.5, gainas_s) self.addLayerWM(0.6, alinas_s) self.addLayerWM(5.7, gainas_s) self.addLayerWM(0.7, alinas_s) self.addLayerWM(5.5, gainas_s) self.addLayerWM(1.2, alinas_s) self.addLayerWM(4.6, gainas_s) self.addLayerWM(1.1, alinas_s) self.addLayerWM(4.5, gainas_s) # <----- #9 Doped to 0.101*10^18 cm^-3 self.addLayerWM(1.4, alinas_s) # <----- #10 Doped to 0.101*10^18 cm^-3 self.addLayerWM(4.0, gainas_s) # <----- #11 Doped to 0.101*10^18 cm^-3 self.addLayerWM(1.5, alinas_s) self.addLayerWM(3.4, gainas_s) self.addLayerWM(1.7, alinas_s) self.addLayerWM(3.5, gainas_s) dop = 0.120276e18 self.addDoping(0, 4.5, dop, 9) self.addDoping(0, 1.4, dop, 10) self.addDoping(0, 4.0, dop, 11)
def __init__(self, T=300): Structure.__init__(self, T=T) self.setIFR(0.1, 10) alinas_s = AlInAs(x=0.665, T=self.TL) gainas_s = InGaAs(x=0.635, T=self.TL) self.addLayerWM(3.5, alinas_s) self.addLayerWM(1.1, gainas_s) self.addLayerWM(1.3, alinas_s) self.addLayerWM(3.8, gainas_s) self.addLayerWM(1.0, alinas_s) self.addLayerWM(3.5, gainas_s) self.addLayerWM(1.8, alinas_s) self.addLayerWM(2.7, gainas_s) self.addLayerWM(1.9, alinas_s) self.addLayerWM(2.6, gainas_s) self.addLayerWM(1.5, alinas_s) self.addLayerWM(2.3, gainas_s) self.addLayerWM(1.4, alinas_s) self.addLayerWM(2.1, gainas_s) #13 <---- Doped self.addLayerWM(2.2, alinas_s) # self.addLayerWM(1.9, gainas_s) # self.addLayerWM(2.0, alinas_s) # self.addLayerWM(1.9, gainas_s) #17 <-- until here self.addLayerWM(1.9, alinas_s) self.addLayerWM(1.7, gainas_s) self.addLayerWM(2.4, alinas_s) self.addLayerWM(1.7, gainas_s) dop = 0.099e18 idop = [13, 14, 15, 16, 17] [self.addDoping(0, self.layers[i].width, dop, i) for i in idop]
def __init__(self, T = 100): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = InGaAs(T = self.TL) barrier = AlInAs(T=self.TL) self.addLayerWM(4, barrier) self.addLayerWM(3.4, well) self.addLayerWM(2.7, barrier) self.addLayerWM(9.1, well) # <----- # 3 uniformly doped to 1*10^18 cm^-3 self.addLayerWM(4, barrier) idop= 3 vdop = 1e18 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 100): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier43 = AlGaAs(name="AlGaAs43", x = 0.43, T=self.TL) barrier16 = AlGaAs(name = "AlGaAs16", x = 0.16, T=self.TL) self.addLayerWM(7.4, barrier43) self.addLayerWM(3.3, well) self.addLayerWM(0.5, well) # <----- # 2 delta-doped to 1.345*10^12 cm^-2 self.addLayerWM(3.3, well) self.addLayerWM(12.0, barrier16) self.addLayerWM(7.4, barrier43) idop= 2 vdop = 2.69e19 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 300): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.25, T = self.TL) self.addLayerWM(3.245, barrier) self.addLayerWM(7.728, well) self.addLayerWM(1.786, barrier) self.addLayerWM(8.352, well) self.addLayerWM(3.0, well) # <----- # 4 doped to 1.5*10^17 cm^-3 (4.5*10^10 cm^-2) self.addLayerWM(4.565, well) idop= 4 vdop = 1.5e17 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 150): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.15, T = self.TL) self.addLayerWM(4.5, barrier) self.addLayerWM(8.3, well) self.addLayerWM(3.8, barrier) self.addLayerWM(8.2, well) self.addLayerWM(3.1, well) # 4 <--- doped to 1.5e10 cm-2 => 4.84e16 cm-3 self.addLayerWM(6.6, well) idop= 4 vdop = 4.84e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T=155): Structure.__init__(self, T=T) self.setIFR(0.1,10) alinas = AlInAs(T = self.TL) gainas = InGaAs(T = self.TL) self.addLayerWM(1.8,alinas) self.addLayerWM(13.3, gainas) self.addLayerWM(0.6,alinas) self.addLayerWM(13.3, gainas) self.addLayerWM(1.5,alinas) self.addLayerWM(24, gainas) # <-- first 6nm doped idop= 5 vdop = 3.3e16 # cm^-3 # 1.8 + 13.3 + 0.6 + 13.3 + 1.5 = 30.5 self.addDoping(0, 6, vdop,idop)
def loadStructure(cls, resultpath, origs, sid): """ Loads and returns the structure with id "sid" based on the "origs" Structure, from the results file at "resultpath/results.log". Returns None if no structure with the given id was found. """ s = Structure(origs) Nl = len(origs.layers) Ndop = len(origs.dopings) found = False with open(resultpath + "/results.log") as resfile: try: for line in resfile: line = line.split() if line[0] == str(sid): found = True break except (IndexError): pass if not found: return None for il in range(Nl): w = float(line[il + 2]) x = line[il + 2 + Ndop * 3 + Nl] try: x = float(x) s.layers[il].material.updateAlloy(x) except (ValueError): pass # x = 'None' s.layers[il].width = w for idop in range(Ndop): for i in range(3): s.dopings[idop][i] = float(line[Nl + 2 + idop * 3 + i]) return s
def __init__(self, T = 150): Structure.__init__(self, name="EV1157", T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.15, T = self.TL) self.addLayerWM(5.5, barrier) self.addLayerWM(11.0, well) self.addLayerWM(1.8, barrier) self.addLayerWM(11.5, well) self.addLayerWM(3.8, barrier) self.addLayerWM(9.4, well) self.addLayerWM(4.2, barrier) self.addLayerWM(18.4, well) # <----- # 7 doped to 2*10^16 cm^-3 idop= 7 vdop = 2e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 200): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.15, T = self.TL) self.addLayerWM(4.3, barrier) self.addLayerWM(8.9, well) self.addLayerWM(2.46, barrier) self.addLayerWM(8.15, well) self.addLayerWM(4.1, barrier) self.addLayerWM(5.5, well) self.addLayerWM(5.0, well) # <----- # 6 doped to 6*10^16 cm^-3 (4.5*10^10 cm^-2) self.addLayerWM(5.5, well) idop= 6 vdop = 6e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T=155): Structure.__init__(self, T=T) self.setIFR(0.1,10) alinas = AlInAs(T = self.TL) gainas = InGaAs(T = self.TL) self.addLayerWM(2.2,alinas) self.addLayerWM(15.8, gainas) self.addLayerWM(0.9,alinas) self.addLayerWM(16.6, gainas) self.addLayerWM(1.5,alinas) self.addLayerWM(13.8, gainas) self.addLayerWM(1.6,alinas) self.addLayerWM(25.5, gainas) # <-- middle 5.7nm doped idop= 7 vdop = 8e16 # cm^-3 # 1.8 + 13.3 + 0.6 + 13.3 + 1.5 = 30.5 self.addDoping(9.9, 15.6, vdop,idop)
def __init__(self, T = 150): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.15, T = self.TL) self.addLayerWM(4.7, barrier) self.addLayerWM(28, well) self.addLayerWM(2.3, barrier) self.addLayerWM(18, well) self.addLayerWM(2.3, barrier) self.addLayerWM(16.5, well) self.addLayerWM(2.3, barrier) self.addLayerWM(16.0, well) # <----- # 7 doped to 2.4*10^16 cm^-3 (3.84*10^10 cm^-2) self.addLayerWM(2.3, barrier) self.addLayerWM(15.5, well) idop= 7 vdop = 2.4e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 150): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.25, T = self.TL) self.addLayerWM(2.08, barrier) self.addLayerWM(0.24, barrier) # <------ 3.25e10 cm-2 => 13.542e17 cm-3 self.addLayerWM(2.08, barrier) self.addLayerWM(6.25, well) self.addLayerWM(1.09, barrier) self.addLayerWM(6.65, well) self.addLayerWM(2.28, barrier) self.addLayerWM(8.48, well) self.addLayerWM(0.91, barrier) self.addLayerWM(6.1, well) idop= 1 vdop = 1.35417e18 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def __init__(self, T = 150): Structure.__init__(self, T = T) self.setIFR(0.1, 10) well = GaAs(T = self.TL) barrier = AlGaAs(x = 0.10, T = self.TL) self.addLayerWM(5.9, barrier) self.addLayerWM(15.3, well) self.addLayerWM(1.0, barrier) self.addLayerWM(17.7, well) self.addLayerWM(1.3, barrier) self.addLayerWM(16.6, well) self.addLayerWM(1.7, barrier) self.addLayerWM(13.9, well) self.addLayerWM(3.9, barrier) self.addLayerWM(26.8, well) # 9 <------ 1e16 cm-3 self.addLayerWM(3.5, barrier) self.addLayerWM(21.4, well) idop= 9 vdop = 1.0e16 # cm^-3 self.addDoping(0, self.layers[idop].width, vdop, idop)
def generateStructure(self, params): # generate strucure: news = Structure(self.orig) pindex = 0 # Layer widths: for i in range(0,len(self.windex)): news.layers[self.windex[i]].width = params[pindex] pindex+=1 news.dopings = [] dop_start = 0 dop_step = int(len(self.dopindex)/len(self.orig.dopings)) for d in self.orig.dopings: # Doping layers: z0 = d[0] zend = d[1] doping = d[2] center = (z0 + zend)/2 width = (zend - z0) sheet = width*doping zizfdens = [center, width, doping] dop_end = dop_start + dop_step for i in range(dop_start,dop_end): zizfdens[self.dopindex[i]] = params[pindex] pindex +=1 dop_start = dop_end if (self.doping_mode == doping_modes.get("FOLLOW LAYER SHEET") or self.doping_mode == doping_modes.get("FOLLOW LAYER VOLUME")): layerindex = self.orig.layerIndex(center) z0 = news.layerPos(layerindex) zend = z0 + news.layers[layerindex].width if (self.doping_mode == doping_modes.get("FOLLOW LAYER SHEET") ): doping = zizfdens[2]*width/(zend-z0) else: doping = zizfdens[2] else: z0 = zizfdens[0] zend = zizfdens[1] if (self.doping_mode == doping_modes.get("FIXED POSITION SHEET") ): doping = zizfdens[2]/width*(zend-z0) else: doping = zizfdens[2] doping = zizfdens[2] news.addDoping(z0,zend,doping) # Alloy composition: tags = [] ptag = [] for i in range(0,len(self.xindex)): if self.comp_mode == comp_modes.get("UNLINKED"): news.layers[self.xindex[i]].material.updateAlloy(params[pindex]) pindex +=1 elif self.comp_mode == comp_modes.get("LINKED ALL"): news.layers[self.xindex[i]].material.updateAlloy(params[pindex]) pass elif self.comp_mode == comp_modes.get("LINKED LAYERS"): print("Layers are linked:") tag = self.tagindex[i] print("tag = ", tag) if tag not in tags: tags.append(tag) ptag.append(pindex) else: pindex = ptag[tags.index(tag)] print("pindex = ", pindex) news.layers[self.xindex[i]].material.updateAlloy(params[pindex]) news.layers[self.xindex[i]].material.name += str(tag) if len(ptag) > 0: pindex = np.max(ptag) + 1 else: pindex += 1 if self.width_mode == width_modes.get("MONOLAYER"): news.convert_to_ML() if self.strain_mode == strain_modes.get("COMPENSATE X"): news.compensate_strain() return news
def gen_struct_from_hilbert_curve(self, newd): ''' Generates new structures at the points along the Hilbert curve given in newd, and returns their scaled coordinates. ''' dpar = np.array(self.dparams) parmin = np.array(self.params) - dpar ranges = [] [ ranges.append([self.params[i] - dpar[i], self.params[i] + dpar[i]]) for i in range(len(self.params)) ] coordinates = [] for i in range(0, len(newd)): # interpolate to get the coordingates: p_ipl = self.hutil.interp_coords_from_dist(newd[i]) # un-scale it and create structure parnew = np.array(p_ipl) #par_unscaled = parnew*2*dpar/self.hutil.pmax + parmin par_unscaled = np.squeeze( self.hutil.scale_coordinates(parnew, dpar, parmin)) # generate strucure: news = Structure(self.orig) pindex = 0 # Layer widths: for i in range(0, len(self.windex)): news.layers[self.windex[i]].width = par_unscaled[pindex] pindex += 1 news.dopings = [] dop_start = 0 dop_step = int(len(self.dopindex) / len(self.orig.dopings)) for d in self.orig.dopings: # Doping layers: z0 = d[0] zend = d[1] doping = d[2] center = (z0 + zend) / 2 width = (zend - z0) sheet = width * doping zizfdens = [center, width, doping] dop_end = dop_start + dop_step for i in range(dop_start, dop_end): zizfdens[self.dopindex[i]] = par_unscaled[pindex] pindex += 1 dop_start = dop_end if (self.doping_mode == doping_modes.get("FOLLOW LAYER SHEET") or self.doping_mode == doping_modes.get("FOLLOW LAYER VOLUME")): layerindex = self.orig.layerIndex(center) z0 = news.layerPos(layerindex) zend = z0 + news.layers[layerindex].width if (self.doping_mode == doping_modes.get( "FOLLOW LAYER SHEET")): doping = zizfdens[2] * width / (zend - z0) else: doping = zizfdens[2] else: z0 = zizfdens[0] zend = zizfdens[1] if (self.doping_mode == doping_modes.get( "FIXED POSITION SHEET")): doping = zizfdens[2] / width * (zend - z0) else: doping = zizfdens[2] doping = zizfdens[2] news.addDoping(z0, zend, doping) # Alloy composition: tags = [] ptag = [] for i in range(0, len(self.xindex)): if self.comp_mode == comp_modes.get("UNLINKED"): news.layers[self.xindex[i]].material.updateAlloy( par_unscaled[pindex]) pindex += 1 elif self.comp_mode == comp_modes.get("LINKED ALL"): news.layers[self.xindex[i]].material.updateAlloy( par_unscaled[pindex]) pass elif self.comp_mode == comp_modes.get("LINKED LAYERS"): print("Layers are linked:") tag = self.tagindex[i] print("tag = ", tag) if tag not in tags: tags.append(tag) ptag.append(pindex) else: pindex = ptag[tags.index(tag)] print("pindex = ", pindex) news.layers[self.xindex[i]].material.updateAlloy( par_unscaled[pindex]) news.layers[self.xindex[i]].material.name += str(tag) if len(ptag) > 0: pindex = np.max(ptag) + 1 else: pindex += 1 if self.width_mode == width_modes.get("MONOLAYER"): news.convert_to_ML() if self.strain_mode == strain_modes.get("COMPENSATE X"): news.compensate_strain() self.structures.append(news) coordinates.append(parnew) return coordinates
def genRanStructs(self, N): """ Generate N structures with random variations in layer widths. Doping modes "FOLLOW LAYER SHEET/VOLUME" assume that doping covers entire layer width. Doping modes "FIXED WIDTH SHEET/VOLUME" changes doping pos. independently of layer widths. TODO: Change compositions! """ for _ in range(0, N): news = Structure(self.orig) for il in range(len(self.dw)): w0 = self.orig.layers[il].width width = w0 + 2 * (random.random() - 0.5) * self.dw[il] news.layers[il].width = width news.dopings = [] for dl in self.orig.dopings: zc = (dl[0] + dl[1]) / 2 layerindex = self.orig.layerIndex(zc) sheet = self.orig.layers[layerindex].width * dl[2] if (self.doping_mode == doping_modes.get("FOLLOW LAYER SHEET") or self.doping_mode == doping_modes.get("FOLLOW LAYER VOLUME")): zi = 0 zf = news.layers[layerindex].width if self.doping_mode == doping_modes.get( "FOLLOW LAYER SHEET"): dopdens = sheet / news.layers[layerindex].width else: dopdens = dl[2] dopdens = dopdens + 2 * (random.random() - 0.5) * self.ddop[2] else: dzc = zc - self.orig.layerPos(layerindex) # define new offset from layer start dzc = dzc + 2 * (random.random() - 0.5) * self.ddop[0] dopw = (dl[1] - dl[0]) + 2 * (random.random() - 0.5) * self.ddop[1] # add new doping layer zi = dzc - dopw / 2 zf = dzc + dopw / 2 if self.doping_mode == doping_modes.get( "FIXED POSITION SHEET"): dopdens = sheet / (zf - zi) else: dopdens = dl[2] dopdens = dopdens + 2 * (random.random() - 0.5) * self.ddop[2] news.addDoping(zi, zf, dopdens, layerindex) if self.strain_mode == strain_modes.get("COMPENSATE X"): news.compensate_strain() self.structures.append(news) del news
print('Creating semiconductor materials and alloys:\n') print(' ( All CBO relative to GaAs )\n') # create materials GaAs and two AlGaAs: gaas = GaAs() alas = AlAs() algaas1 = AlGaAs(name="AlGaAs1", x=0.22) algaas2 = AlGaAs(name="AlGaAs2", x=0.43) print(sep) print('Creating a structure from generated materials:\n') print('[width, material, eta, lambda]') # creating a two quantum-well structure s = Structure() # set interface roughness parameters for all interfaces: eta = 0.1 lam = 2.0 s.setIFR(eta, lam) # Add layers: s.addLayerWM(7.4, algaas2) s.addLayerWM(2.5, gaas) s.addLayerWM(0.5, gaas) # <-- doped layer 2 s.addLayerWM(2.5, gaas) s.addLayerWM(8.7, algaas1) s.addLayerWM(7.4, algaas2) # define doping layer
for val in mp.valdict: print(val + " = " + str(inalasLM.params[mp.valdict[val]])) print("\n" + str(algaas) + ":\n") for val in mp.valdict: print(val + " = " + str(algaas.params[mp.valdict[val]])) print("\n" + str(alingaas) + ":\n") for val in mp.valdict: print(val + " = " + str(alingaas.params[mp.valdict[val]])) print(sep) print('Creating a structure from generated materials:\n') # creating a quantum-cascade structure: s = Structure() # set interface roughness parameters for all interfaces: s.setIFR(eta=0.1, lam=2.0) # Add layers: s.addLayerWM(8.4, gaas) s.addLayerWM(3.1, algaas) s.addLayerWM(18.0, gaas) # <--- this is layer 2! s.addLayerWM(1.8, algaas) s.addLayerWM(8.4, gaas) s.addLayerWM(3.1, algaas) s.addLayerWM(18.0, gaas) s.addLayerWM(1.8, algaas) # add a doping layer
z.append(float(i) / float(N)) x.append(z[i] * 0.48) alingaas.updateAlloy(z[i]) ec.append(alingaas.params["Ec"] - ingaas.params["Ec"]) m.append(alingaas.params["meff"]) va.append(alingaas.params["Valloy"]) # reproducing plot from Ohtani APL 2013: pl.plot(x, m) ax1 = pl.gca() ax2 = ax1.twinx() ax2.plot(x, ec, 'r') pl.figure(2) pl.plot(x, va) s = Structure() s.setIFR(0.1, 2) x = 0.23 / 0.48 alingaas.updateAlloy(x) print("Using x = " + str(x) + " yields a CBO of " + str(alingaas.params["Ec"] - ingaas.params["Ec"])) for key in alingaas.params: print(key + " = " + str(alingaas.params[key])) s.addLayerWM(17.7, ingaas) s.addLayerWM(3.1, alingaas) s.addLayerWM(8.5, ingaas)
alas = AlAs() inas = InAs() # create Al_0.20Ga_0.80As x = 0.2 algaas = AlGaAs(x=x) print("\n" + str(algaas) + ":\n") for key in algaas.params: print(key + " = " + str(algaas.params[key])) print(sep) print('Creating a structure from generated materials:\n') print('[width, material, eta, lambda]') # creating a two quantum-well structure s = Structure() # set interface roughness parameters for all interfaces: eta = 0.1 lam = 2.0 s.setIFR(eta, lam) # Add layers: # Add layers: s.addLayerWM(3.0, algaas) s.addLayerWM(20.0, algaas) s.addLayerWM(7.0, gaas) s.addLayerWM(2.0, algaas) # <-- doped layer 3 s.addLayerWM(7.0, gaas) s.addLayerWM(20, algaas)