Changelog¶
All notable changes to this project are documented in this file.
The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
While the project is pre-1.0, minor versions may contain breaking changes to the Python API. Breaking changes are always listed under Changed or Removed.
Unreleased¶
Added¶
OptimadeConnectorreads any OPTIMADE provider, closing COD and OQMD and reaching AFLOW, Materials Project, NOMAD and ~18 others through one client with no new dependency. It handles four upstream behaviours verified against the live APIs:response_fieldsis mandatory (COD's default response omits all site data),links.nextis a bare string on OQMD and a{"href": ...}object on COD,species[].nameis a site label rather than an element symbol, andcartesian_site_positionsmust be converted to the fractional coordinatesCrystalStructurestores.- OPTIMADE records carry a density derived from the cell, labelled
method="derived"— OPTIMADE standardizes no physical property, so without this the records would be unrankable. OQMD additionally suppliesband_gap,formation_energy_per_atom, andenergy_above_hull. Scorecard.report()reportsmixed_hull_conventions, so a ranking column pooling OQMD hull distances with Materials Projectenergy_above_hullis detectable rather than silently biased.-
Material.dimensionalityrecords the number of periodic dimensions. When it is not 3, no density is derived: a vacuum-padded slab's bulk density is a function of the padding, not a material property, and aScorecardwould rank it against real crystals without complaint. -
A connector contract in
mattergraph_connectors.base: theConnectorprotocol, aConnectorQuerymodel coveringelements/source_ids/properties/max_records/page_size, and sharedconnector_provenance()andapply_property_filter()helpers. Every connector previously had its ownfetchsignature — four had already diverged — with nothing able to enforce or even enumerate the contract. - Every ingested
Materialnow carries aProvenanceRecord. Materials Project, JARVIS, and NOMAD all leftMaterial.provenanceempty and put lineage in the untypedmetadatadict, so nothing reasoning about provenance could see it. ProvenanceRecord.parametersrecords the settings behind a value (functional, dataset, calculator). Without it the schema could not express what produced a number, only that something had.PropertyMethod.DERIVEDdistinguishes a value MatterGraph computed from other fields on the same record from one whose method is genuinely unknown.-
mattergraph-connectorsdeclares[mp],[jarvis], and[all]extras. -
mattergraph.derived.elasticderives Young's modulus, Poisson's ratio, Pugh's ratio, a ductility indicator, and specific stiffness from bulk and shear moduli.elastic_frame()returns a DataFrame shaped likeScorecard.rankoutput;with_derived_properties()returns a copy carrying the results as canonical properties so aScorecardcan rank on them. Nonphysical input (a non-positive modulus violates Born stability) is rejected rather than returned, since the negative Young's modulus it produces would rank as a legitimate candidate. - The Materials Project connector now emits
bulk_modulusandshear_modulus, and carrieshomogeneous_poissonanduniversal_anisotropyintoMaterial.metadata. All four were already arriving on every fetch — the connector requests the full summary document — and were being discarded. - The JARVIS connector now emits
bulk_modulus_kv/shear_modulus_gvas canonical moduli, skipping the non-positive values it reports for unconverged tensors. - Elastic averaging schemes are recorded in
MaterialProperty.extra: Materials Project reports Voigt–Reuss–Hill, JARVIS reports Voigt, and Voigt is an upper bound.Scorecard.report()now flags any objective mixing the two undermixed_averaging_schemes. - Three canonical property names —
youngs_modulus,poisson_ratio, andspecific_stiffness— plusbulk_modulus_kv/shear_modulus_gvas aliases.
Fixed¶
- The JARVIS connector returned nothing at all.
jarvis-toolsrenamedAtoms.to_pymatgentopymatgen_converter, and ahasattrguard turned the missing method into a silentNone— so every row failed to convert andfetch()returned an empty list for every query, with no error raised. The conversion now tries both names and raises if neither exists. -
The JARVIS connector no longer crashes on missing values. dft_3d marks them with the string
"na", which the previous NaN-only guard did not catch and whichfloat()cannot parse. -
Material.get_propertynow canonicalizes the lookup name, so documented aliases resolve. Previously the write path canonicalized and the read path did not, soget_numeric("k_vrh"),get_numeric("formation_energy"), andget_numeric("e_above_hull")all returnedNone— and aScorecardwhose objectives used those names returned an empty shortlist with no error. Scorecardno longer lets an uninformative objective move scores. A column with no spread previously normalized to all-ones underminimizeand all-zeros undermaximize, so a direction label alone could change the winner on identical data; its weight also still entered the denominator, deflating every score. Columns that cannot separate candidates are now excluded from both.- Every demo structure was a conventional cell written with an incomplete basis —
all three
materials_sample.jsonlrecords were effectively simple cubic, with stated densities 1.85×–3.97× what their own cells implied, and twolemat_bulk_sample.jsonrecords had the same defect. Bases are restored and every density is now consistent with its cell. - Demo properties were stamped
method: "dft"while holding room-temperature experimental handbook values, and elemental formation energies were nonzero, which is definitionally impossible. Measured values are now markedexperimental, and formation energies are0.0with the original cohesive energies preserved underextra. examples/underwater-drone-screening/shortlist_example.csvnamed a winner its ownconstraints.yamldoes not produce and ranked a candidate that config excludes. It is now generated byscorecard.pyrather than hand-maintained.
Added¶
py.typedmarkers in all five distributed packages, so downstream consumers get the type information the codebase already carries.mattergraph.graphnow has an explicit__init__.pyre-exportingCrystalGraph,CrystalGraphBuilder, and the atom/edge feature helpers, matching every sibling subpackage.- Per-package READMEs, keywords, classifiers, and project URLs so each distribution has a usable PyPI landing page.
Releaseworkflow: tag-triggered build and publish to PyPI via Trusted Publishing (OIDC), with a TestPyPI rehearsal path viaworkflow_dispatch, a tag/version consistency check, andtwine checkmetadata validation.- CI now runs the test suite on Python 3.10, 3.11, and 3.12 — the range
requires-pythonhas always claimed — and builds wheels on every push so packaging breakage surfaces before tag time. - Coverage reporting is enabled with a 70% floor (current coverage is ~74%).
Changed¶
scripts/ingest_oqmd.pyfetches real OQMD records through OPTIMADE. It previously printed "OQMD stub returned 0 materials." and exited 0.Scorecard.report()'smixed_averaging_schemesnow counts a property with noaveraging_schememarker as"unspecified"rather than skipping it. It previously looked only at non-null markers, so the most common dangerous case — one source labelling its convention and another not — left a single distinct value and was reported as unmixed. A pool where nothing is marked is still not flagged.- Breaking:
OQMDStubConnector.fetch()raisesNotImplementedErrorinstead of returning[]. An unimplemented connector answering every query with an empty list is indistinguishable from a real one whose filter matched nothing — the precise failure mode that left the JARVIS connector silently dead for an unknown period. Query OQMD through its OPTIMADE endpoint instead. - Breaking:
mp-apiandjarvis-toolsmoved from hard dependencies ofmattergraph-connectorsto the[mp]and[jarvis]extras. The package already told users these were optional while requiring them at install time. Themattergraphmetapackage is lightweight by default and exposes matching[mp],[jarvis], and[all]extras. - Internal MatterGraph dependencies use the compatible
~=0.1.0release family, preventing an installation from mixing incompatible pre-1.0 minor versions. - Release builds pin their backends, require Core Metadata 2.4, audit all twelve
wheel/sdist artifacts, and block publication until clean Python 3.10 and 3.12
installs pass for both the lightweight and
[all]surfaces. - Connector
fetch()takes aConnectorQuery. The previous keyword form still works and warns;material_idsandchunk_sizemap tosource_idsandpage_size. MaterialsProjectConnector.fetch()honorspropertiesby filtering the result, and raises for a property it cannot supply. It previously accepted the argument and discarded it, so callers had no way to tell the filter did nothing.mattergraph-simno longer depends onh5py, andmattergraph-connectorsno longer depends ontqdmoraioitertools; none were imported anywhere.- Breaking: the API package's importable module was renamed from
apptomattergraph_api. A top-levelappmodule is far too generic to publish to PyPI, where it would collide with unrelated projects. Updateuvicorn app.main:apptouvicorn mattergraph_api.main:app, andfrom app.services import ...tofrom mattergraph_api.services import .... - CI workflows consolidated:
tests.ymlandlint.ymlwere removed because they re-ran the same checks already inci.yml.ci.ymlnow triggers on all branches, so branch pushes keep getting feedback. SECURITY.mdnow names an actual reporting channel.
0.1.1 - 2026-09-07¶
Added¶
- Packaged, credential-free demo resources for
mattergraph-core,mattergraph-connectors, andmattergraph-api. LeMatBulk.example("spc-tialn-24")loads the checksummed 24-record public snapshot with its upstream revisions, CC-BY-4.0 license, DOI, field provenance, and manifest.- Installed-package release smoke coverage for the bundled store, 24 valid periodic graphs, API preflight, graph summary, and cached CHGNet reference.
- Constraint-to-Crystal Navigator demo with deterministic request interpretation, confirmed constraint execution, source-backed crystal inspection, and index-relative recovery paths.
- Packaged navigator model contract and release smoke coverage for
/navigator/model-contract, so installed wheels do not depend on repository-root config files.
Changed¶
MaterialStore.from_demo()and the demo API now use package resources instead of locating repository-relative fixture paths.- The README quickstart now runs directly from PyPI without a repository checkout.
0.1.0 - 2026-08-24¶
Initial public surface.
Added¶
- Schema —
Material,MaterialProperty,ProvenanceRecord,CrystalStructure, andSimulationJobRefas strict Pydantic v2 models, with matching JSON Schemas underdata/schemas/. - Normalization — unit conversion for energy, length, pressure, density, and temperature; formula standardization; canonical property names across six properties (density, formation energy per atom, energy above hull, bulk modulus, shear modulus, band gap).
- Connectors — Materials Project, JARVIS-DFT, NOMAD public metadata, LeMat-Bulk companion adapter, and local CSV. OQMD ships as a stub that preserves the API surface.
- Workflow layer —
MatterGraphDatasetwith chainable, audited filters andCandidateSlicewith content-hashed, reproducible slice IDs. Guardrails block mixed XC functionals and duplicate records unless explicitly overridden. - Crystal graphs —
CrystalGraphBuilderproducing periodic neighbor graphs with 103-column atom features, emitted as plain NumPy. - Scoring — a transparent
Scorecardbaseline (min–max normalized objectives plus hard constraints), explicitly documented as a toy rather than a production decision engine. - Benchmarks — discovery ranking metrics, uncertainty coverage, stratified validation splits, and an optional Matbench adapter.
- Simulation — validated ASE job specs with a working EMT relaxation runner; LAMMPS and Quantum ESPRESSO entry points ship as structured-failure stubs.
- API — FastAPI demo exposing
/materials,/search,/scores/rank,/simulations/ase/relax, and/workflows/lematerial/demo. - Web — a React workbench with material table, comparison view, constraint panel, and simulation queue.
- Docs and examples — nine documentation pages, ten LeMaterial SQL cookbook recipes, seven numbered example scripts, and an underwater-drone screening template.