CarrierCapture.py¶
Modern Python package for computing carrier capture rates and non-radiative recombination in semiconductors using multiphonon theory.
โจ Features¶
๐งฎ Complete Multiphonon Theory Implementation¶
- 1D Schrรถdinger equation solver (ARPACK-based)
- Harmonic, Morse, and spline potential fitting
- Configuration coordinate diagrams
- Capture coefficient calculations
โก High-Performance Computing¶
- Parallel parameter scanning with
joblib - Optimized with NumPy/SciPy (within 10-20% of Julia speed)
- Support for HDF5 and NPZ result storage
๐จ Rich Visualization¶
- Publication-quality plots with Plotly
- Interactive Dash dashboard (web-based)
- Real-time parameter exploration
- Arrhenius plots, CC diagrams, 2D heatmaps
๐ Integration with doped¶
- Direct compatibility with doped defect calculation workflows
- Load configuration coordinate data from doped outputs
- Automated mass-weighted displacement calculations
- Seamless end-to-end: DFT โ defect analysis โ capture rates
๐ Quick Start¶
Installation¶
For development or from source:
git clone https://github.com/WMD-group/CarrierCapture.py.git
cd CarrierCapture.py
pip install -e ".[dev]"
Python API¶
import numpy as np
from carriercapture.core.potential import Potential
from carriercapture.core.config_coord import ConfigCoordinate
# Create harmonic potentials
pot_initial = Potential.from_harmonic(hw=0.008, Q0=0.0, E0=0.5)
pot_final = Potential.from_harmonic(hw=0.008, Q0=10.5, E0=0.0)
# Solve Schrรถdinger equation
pot_initial.solve(nev=180)
pot_final.solve(nev=60)
# Calculate capture coefficient
cc = ConfigCoordinate(pot_i=pot_initial, pot_f=pot_final, W=0.068)
cc.calculate_overlap(Q0=5.0)
cc.calculate_capture_coefficient(
volume=1e-21,
temperature=np.linspace(100, 500, 50)
)
print(f"Capture coefficient at 300K: {cc.capture_coefficient[20]:.3e} cmยณ/s")
Command-Line Interface¶
# Fit potential from DFT data
carriercapture fit data/excited.dat -f spline -o 4 -s 0.001 -O excited.json
# Solve Schrรถdinger equation
carriercapture solve excited.json -n 180 -O excited_solved.json
# Calculate capture coefficient
carriercapture capture config.yaml -V 1e-21 --temp-range 100 500 50
# High-throughput parameter scan
carriercapture scan --dQ-min 0 --dQ-max 25 --dQ-points 25 \
--dE-min 0 --dE-max 2.5 --dE-points 10 \
-j -1 -o scan_results.npz
# Launch interactive dashboard
carriercapture viz --port 8050
๐ Documentation Sections¶
Getting Started¶
New to CarrierCapture? Start here!
- Installation - Setup instructions
- Quick Start - 5-minute introduction
- Basic Concepts - Key concepts explained
- First Calculation - Step-by-step tutorial
User Guide¶
Learn how to use CarrierCapture effectively.
- Potentials - Creating and fitting potentials
- Capture Coefficients - Calculating capture rates
- Parameter Scanning - High-throughput screening
- Visualization - Plots and dashboards
- doped Integration - Using with doped
- CLI Usage - Command-line interface
- Configuration - YAML configuration files
API Reference¶
Complete API documentation.
- Core - Potential, ConfigCoordinate, Schrรถdinger solver
- Analysis - Parameter scanning
- I/O - File I/O and doped interface
- Visualization - Plotting functions
- CLI - Command-line interface
๐ฌ Scientific Background¶
CarrierCapture implements the static coupling approximation for non-radiative carrier capture via multiphonon emission (Huang-Rhys theory).
Key Equation¶
The capture coefficient is calculated as:
\[C(T) = \frac{V \cdot 2\pi}{\hbar} \cdot g \cdot W^2 \cdot \sum_{i,j} p_i |\langle\chi_i|Q-Q_0|\chi_j\rangle|^2 \delta(\varepsilon_i - \varepsilon_j)\]
Where:
- \(V\): supercell volume
- \(g\): degeneracy factor
- \(W\): electron-phonon coupling matrix element
- \(p_i\): thermal occupation of initial state \(i\)
- \(\chi_i, \chi_j\): vibrational wavefunctions
- \(\delta\): energy-conserving delta function (Gaussian broadened)
References¶
- Alkauskas et al. (2014) - Phys. Rev. B 90, 075202
- Huang & Rhys (1950) - Proc. R. Soc. Lond. A 204, 406
๐ฏ Project Status¶
| Component | Status |
|---|---|
| Core Engine | โ Complete |
| CLI | โ Complete |
| Visualization | โ Complete |
| Parameter Scanning | โ Complete |
| doped Integration | โ Complete |
| Documentation | โ Complete |
| Test Coverage | โ 88 tests |
| PyPI Release | ๐ Planned |
๐ค Contributing¶
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License¶
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments¶
- Original Julia implementation: WMD-group/CarrierCapture.jl
- Built with: NumPy, SciPy, Plotly, Dash, Click
- Compatible with: doped (defect calculations)