PyNCband
Python NanoCrystal Bandgap calculator. A very simple, minimalist calculation of bandgaps for core-shell quantum dots in the first-order approximation
Install / Use
/learn @Chronum94/PyNCbandREADME
PyNCband
PyNCband (pronounced pink-band) is a software suite in its very early stages of development to predict the bandgaps and photoluminescence energies of core-shell (for now) quantum dots.
For users:
Clone the repo:
git clone https://github.com/Chronum94/PyNCband.git
Run the setup:
python setup.py install
For developers:
I've tried to make the code as self-explanatory and lucid as possible. Nevertheless, I will be adding a contribution readme soon.
Features:
- [x] Energy calculation of S1 exciton state.
- [x] Coulomb screening energy calculation.
- [x] Polarization interaction energy calculation.
- [x] Internal units consistency.
- [x] Wavenumbers for Type 1 NQDs.
- [x] Verification against experimental data.
- Agreement to ~0.05 eV with Table 1 results in Nano Lett., 2012, 12 (11), pp 5545–5551
Minimal example:
import numpy as np
from scipy.constants import e
from pyncband import Material, CoreShellParticle
# Declare a material with a bandgap of 1.34 eV, conduction band edge offset of 0,
# electron(hole) effective mass of 0.07(0.64), and dielectric constant of 9.6. Optionally,
# give it a name.
InP = Material(1.34, 0, 0.07, 0.64, 9.6, 'InP')
# The conduction band edge is different here. For a core-shell nanocrystal, only the
# relative offset matters.
CdS = Material(2.20, -0.39, 0.21, 0.68, 5.3, 'CdS')
# Create a CoreShellParticle with the two materials, the core and shell thicknesses in nm.
# Optionally, supply a permittivity for the environment of the nanocrystal, if it isn't 1.
csnc = CoreShellParticle(InP, CdS, 1.23, 3.84, 1.5)
# This is a type two, h/e structure. Both of these should be true.
print("Is CSNC type two? h/e?", csnc.type_two, csnc.h_e)
# Calculate energies, in eV
energies = np.array(csnc.calculate_s1_energies())
# Print them out, because why not.
# Should be [0.09009009 0.27527528]
print(energies)
# Calculate the Coulomb screening energy, this is in eV already.
# These methods return both the energy and the uncertainty in the calculation.
col_energy = csnc.coulomb_screening_energy()
# The polarization interaction energy, also in eV already.
pol_energy = csnc.interface_polarization_energy()
# Col: [-1.50293370e-03 5.56435081e-07] Pol: [-1.98701001e-03 4.79341560e-07]
print('Col:', col_energy, 'Pol:', pol_energy)
# The bandgap of the QD.
print("NC bandgap:", csnc.bandgap)
# The excitation energy of the 1S exciton.
print("Net 1S energy:", csnc.bandgap + np.sum(energies) + col_energy[0] + pol_energy[0])
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
