Skip to content

Repository files navigation

Matter Lab — computational bench

Local bench for molecules, inventory bookkeeping, deposited protein structures, and filed drug-label text.

Not a wet lab. Not a prescriber. Not a diagnosis engine. Not clinical decision support.

It does not predict reactions, products, PK/PD, docking, or whether medications are safe together.

HTTP binds loopback only (127.0.0.1:8772).

Honesty v1

Frozen contract: git tag honesty-v1. The interesting property is the boundary between retrieval, computation, inference, and evidence. Empty capability is part of the product, not a gap to fill.

Later work (ambiguous-name picker with a recorded human CID choice; Orange Book / Swiss-Prot as claimed retrieval) is built on top of this tag. It does not silently redefine v1.

Run on a new workstation

Python 3.12+ and RDKit:

py -3.12 -m pip install -r requirements.txt
py -3.12 server.py

Then open http://127.0.0.1:8772/

Windows: open.bat starts the same server (kills any stale listener on 8772 first).

Tests:

py -3.12 _test_lab.py

Optional local data (the bench works without them; missing data is explicit, not faked):

Env var What it is
MATTER_LAB_PUBCHEM_DB NCBI PubChem SQLite dump (name → SMILES). Without it, names fall through to live PubChem PUG, or fail offline.
MATTER_LAB_LAB_DATA Folder with checksums-pubchem.txt if you freeze dump hashes on saved records.
MATTER_LAB_LABEL_DIR Directory of local openFDA label .txt extracts. Without it, the Labels tab has nothing to search.

A handful of RCSB PDB files ship under data/cache/pdb/ so the Protein tab works offline for those IDs.

What it actually does

Bench Engine
Molecule RDKit: SMILES sanitize, formula, MW, logP, TPSA, Lipinski, 2D SVG. Name resolve: local teaching set → user SMILES → local PubChem dump → web PubChem. Ambiguous names are refused.
Inventory Mole-weighted atom inventory (conservation). Not reaction prediction.
Labels Local openFDA extract full-text search. Filed text, not advice.
Protein RCSB PDB (cached) + SEQRES / non-water HETATM residues as deposited. Not docking.
Records JSON computational records (inputs + engine versions + dump identity). Not a wet-lab notebook.

Honesty rules (do not quietly undo)

  • No invented SMILES. Ambiguous PubChem names are refused (no lowest-CID pick). RDKit sanitization is parseability, not identity.
  • No invented protein sequences: PDB file or fail.
  • Label text is retrieval, not an interaction engine (label_mentions).
  • Mix results are inventory bookkeeping, not synthesis. atom_count_sketch is not a product formula.
  • SMARTS flags are structural motifs with categories (structural / duplicate / co-occurrence / label-text), not hazard ratings. No flag is not safety.
  • PDB non-water HETATM residues are deposited, not computed binders, and not every HETATM is a ligand.
  • Saved records freeze dump identity when a checksums file provides SHA-256. A missing digest stays None; the 29 GB database is not hashed on every save.
  • Loopback bind is the network claim. A missing Origin header is allowed; that is not an authentication boundary.

Ports (this app)

Port App
8772 Matter Lab

On the original machine, Vera clinic (:8771) and a periodic-table combinatorics page are separate programs. They are not required to run Matter Lab.

About

Local computational chemistry bench. Not a wet lab, not a prescriber, not clinical decision support.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages