Skip to content

zero-binary-0/solar-hunt

Repository files navigation

solar-hunt

An ML screening pipeline that mines the Materials Project for overlooked solar absorber materials — stable, non-toxic, earth-abundant compounds with a direct bandgap near the Shockley–Queisser optimum that nobody has seriously tested as a PV absorber.

Headline result: the pipeline surfaced Ba3Nb2Se9 — ML-predicted gap 1.35 eV vs 1.30 eV measured by diffuse reflectance (Inorg. Chem. 2013, doi:10.1021/ic4013763), a published synthesis route, and zero PV-absorber literature. See SHORTLIST.md for the full tiered shortlist and WRITEUP.md for the method and honest failure cases.

The core idea

Materials Project bandgaps are PBE-computed and underestimate reality by ~30–50%. A naive screen for "PBE gap 1.2–1.8 eV" therefore looks at compounds whose real gaps are ~1.6–2.4 eV — the wrong window. The candidates that actually matter have PBE gaps of ~0.8–1.2 eV, and most high-throughput PV screens threw them away. This pipeline pulls that overlooked window and corrects the gaps with a model trained on experimental data.

Pipeline

Stage Script What it does
1 stage1_pull.py Pull candidates from MP: bandgap window, energy above hull ≤ 0.05 eV/atom, no toxic/expensive/radioactive elements
2 stage2_score.py Score crustal abundance, feedstock cost, synthesis difficulty; composite ranking
3 stage3_refine.py Empirical gap correction, re-pull of the low-PBE window, flat-band transport heuristic, curated novelty list
4 stage4_ml.py Gradient-boosted gap model trained on matbench_expt_gap (CV MAE ~0.4 eV), air/moisture-stability heuristic, re-rank
5 stage5_shortlist.py Chemical-family novelty rules, polymorph dedup, hard vetoes (TM-oxide d-band gaps, high-valent metal halides), manual literature verdicts, tiered SHORTLIST.md

Quickstart

python -m venv .venv
.venv\Scripts\activate          # Windows; source .venv/bin/activate elsewhere
pip install -r requirements.txt

Get a free API key at https://materialsproject.org/api, then:

setx MP_API_KEY your_key        # Windows (persists; open a new terminal)
export MP_API_KEY=your_key      # Mac/Linux

python stage1_pull.py           # creates materials.db (SQLite)
python stage2_score.py
python stage3_refine.py         # needs the API key (re-pulls low-PBE window)
python stage4_ml.py             # downloads matbench_expt_gap on first run
python stage5_shortlist.py      # writes SHORTLIST.md

Everything is Python + SQLite; the only external service is the Materials Project API (plus a one-time dataset download via matminer).

Honest limitations

  • Gap predictions carry ~0.4 eV MAE — window membership is fuzzy for any single compound; only Ba3Nb2Se9 has a measured in-window gap.
  • The composition-only model overtrusts localized d-electron systems (predicted YFeO3 at 1.43 eV; measured ~2.45 eV). Stage 5 hard-excludes TM-oxide/fluoride flat-band chemistry for exactly this reason.
  • Transport and air-stability scores are composition heuristics, not calculations. Novelty = "not matched by family rules or a curated list," which is a hypothesis until a human checks the literature.

License

MIT — see LICENSE.

Author

Suhile (zero-binary-0@users.noreply.github.com) — https://github.com/zero-binary-0/solar-hunt

About

ML pipeline that screens the Materials Project for overlooked solar absorbers — surfaced a validated 1.3 eV candidate with zero PV literature

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages