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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matsyngate-0.1.0.tar.gz.
File metadata
- Download URL: matsyngate-0.1.0.tar.gz
- Upload date:
- Size: 461.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca4aec77d258854c23ac795070d616541ec772392aae1d655bfb3c826bed138d
|
|
| MD5 |
625f16cd1ed62ef6db6cb254ffa0969f
|
|
| BLAKE2b-256 |
fbf75da444a58fb3216f7268cc396570b1e146a0154e9caea23b5816d56bbb67
|
Provenance
The following attestation bundles were made for matsyngate-0.1.0.tar.gz:
Publisher:
publish.yml on jwchen25/matsyngate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matsyngate-0.1.0.tar.gz -
Subject digest:
ca4aec77d258854c23ac795070d616541ec772392aae1d655bfb3c826bed138d - Sigstore transparency entry: 2400997117
- Sigstore integration time:
-
Permalink:
jwchen25/matsyngate@c8772e66e4bc665005cd5d01c00398fa9e3b1412 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jwchen25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c8772e66e4bc665005cd5d01c00398fa9e3b1412 -
Trigger Event:
release
-
Statement type:
File details
Details for the file matsyngate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: matsyngate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 53.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b385974b22e2cf89e2aa1cbf077993282aa429d04531706b1b1a2348df32f0d
|
|
| MD5 |
89c16729a5820475fd3afb275869a710
|
|
| BLAKE2b-256 |
49044582dd7fc4010fe0c28f1a2892947e1d86f9addcde69773fed4bdda53abb
|
Provenance
The following attestation bundles were made for matsyngate-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on jwchen25/matsyngate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matsyngate-0.1.0-py3-none-any.whl -
Subject digest:
6b385974b22e2cf89e2aa1cbf077993282aa429d04531706b1b1a2348df32f0d - Sigstore transparency entry: 2400997278
- Sigstore integration time:
-
Permalink:
jwchen25/matsyngate@c8772e66e4bc665005cd5d01c00398fa9e3b1412 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jwchen25
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c8772e66e4bc665005cd5d01c00398fa9e3b1412 -
Trigger Event:
release
-
Statement type: