Skip to content

CarrierCapture.py

Modern Python package for computing carrier capture rates and non-radiative recombination in semiconductors using multiphonon theory.

Tests Python Version License: MIT Code style: black


โœจ 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

pip install carriercapture

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!

User Guide

Learn how to use CarrierCapture effectively.

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

  1. Alkauskas et al. (2014) - Phys. Rev. B 90, 075202
  2. 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