Material Synthesis Gatekeeper — a Python library for evaluating the experimental synthesizability of inorganic crystals via hard chemical rules.
matsyngate is a strict filtering layer for theoretical and AI-generated crystal
structures. A rule earns "hard gate" status only if violating it means the
material cannot be made no matter how the temperature and dwell time are tuned.
"Difficult but precedented" is deliberately out of scope: this package answers a
binary question, not a graded one.
Documentation: https://matsyngate.readthedocs.io/ — installation, a full walkthrough, every threshold with its source, and the API reference.
Installation
uv add matsyngate # runtime
uv add 'matsyngate[mp,pandas]' # + G10 (Materials Project) and DataFrame output
Development:
git clone <this repo> && cd matsyngate
uv sync --extra dev
uv run pytest
Quick start
import matsyngate as msg
result = msg.screen(structures, config=msg.SolidStateConfig(n_max=5))
result.passed # numpy bool mask, aligned with the input
result.n_passed
result.rejection_counts() # {"G6": 412, "G5": 88, ...}
result[7].verdicts["G6"].reason
result.to_jsonl("screened.jsonl")
structures may hold pymatgen Structure objects, Composition objects, or
formula strings. Rules that need a structure report SKIPPED for the latter two,
and SKIPPED never rejects.
Screening repeatedly — inside an RL loop, say — reuse one Screener so the
process pool is built once:
with msg.Screener(config=msg.SolidStateConfig.project(), n_jobs=16) as screener:
for batch in batches:
mask = screener.screen(batch).passed
The solid-state route
Ten hard rules for conventional ceramic synthesis in an open-air box furnace — see the full documentation for every threshold, its source, and where it deviates from the reference implementation it is built from.
| id | rule | tier | rejects |
|---|---|---|---|
| G1 | structure validity | A | overlapping atoms, absurd cell volume |
| G2 | charge and electronegativity validity | A | compositions with no charge-neutral, Pauling-consistent assignment |
| G3 | element blacklist | A | radioactive, exceedingly rare and toxic elements |
| G4 | element count | A | fewer than 3 or more than n_max elements |
| G5 | target family | A | non-oxide anion sublattices, and anion groups that decompose below the firing floor |
| G6 | air-accessible oxidation states | A | cations in states that need Ar, H₂ or flowing O₂ |
| G7 | volatility floor | A | elements whose oxides are gone below 600 °C |
| G8 | precursor availability | A | targets no balanced reaction from the available inventory can reach |
| G9 | metastability ceiling | B | E_hull above 0.10 eV/atom |
| G10 | air stability | C | targets predicted to react with O₂, CO₂ or H₂O at firing conditions |
Tier A is offline and needs only composition and structure. G9 activates when you
pass e_hull=[...]; G10 when you pass mp_api_key=.... Anything not evaluated is
listed in result.skipped_rules, so a Tier A screen can never be mistaken for a
full ten-rule one.
Validation
Against A-Lab's 58 attempted targets (Szymanski et al., Nature 624, 86
(2023); 41 reported successes, 17 failures), under SolidStateConfig.alab():
41/41 experimental successes retained, 3 of 17 failures rejected (all by
G6), precision 75% versus A-Lab's own 71%. Full numbers, the element-count
sweep, and what this test does and does not measure:
Validation against A-Lab.
Known limitations
Reaction kinetics are not modelled at all — 11 of A-Lab's 17 failures were attributed to slow kinetics, and no rule here can catch that failure mode. Five more, plus the rare-earth/heavy-metal exclusion's effect on recall, are detailed in Known limitations.
Provenance
Every threshold is traceable to its source in the docstring of the rule that uses
it, and in the corresponding page under
The solid-state route.
The design and the literature basis are in
docs/superpowers/specs/2026-08-07-matsyngate-solidstate-batch-design.md;
Extending matsyngate
explains how to implement a second route.
Metadata
Release files for matsyngate 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| matsyngate-0.1.1.tar.gz | 461.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| matsyngate-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 515.2 kB
Release files / matsyngate-0.1.1.tar.gz
| Download URL | matsyngate-0.1.1.tar.gz |
|---|---|
| Size | 461.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
087cabf4e78a0334a615eb122023baa460e5c7c951712d7d4b0348abbe7812cd
|
|
BLAKE2b-256 checksum How to use checksums |
0ad998494954440b9155b30d59bf2b1002df4995ba9a4b6520bb133099aa90c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency logRelease files / matsyngate-0.1.1-py3-none-any.whl
| Download URL | matsyngate-0.1.1-py3-none-any.whl |
|---|---|
| Size | 53.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39db2e8924a38e33d704ed0f20191f19925dba4365d6f7d98f5196dd3e321696
|
|
BLAKE2b-256 checksum How to use checksums |
77628789155743b44e74c9cc289bfdf5417982dd2b5bbf04f2f2c0d7cb5f9bac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 9, 2026.
Transparency log