mattergraph-core 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mattergraph_core-0.1.0/.gitignore +48 -0
- mattergraph_core-0.1.0/PKG-INFO +61 -0
- mattergraph_core-0.1.0/README.md +34 -0
- mattergraph_core-0.1.0/mattergraph/__init__.py +31 -0
- mattergraph_core-0.1.0/mattergraph/datasets.py +716 -0
- mattergraph_core-0.1.0/mattergraph/derived/__init__.py +21 -0
- mattergraph_core-0.1.0/mattergraph/derived/elastic.py +286 -0
- mattergraph_core-0.1.0/mattergraph/graph/__init__.py +20 -0
- mattergraph_core-0.1.0/mattergraph/graph/atom_features.py +53 -0
- mattergraph_core-0.1.0/mattergraph/graph/crystal_graph.py +187 -0
- mattergraph_core-0.1.0/mattergraph/graph/edge_features.py +8 -0
- mattergraph_core-0.1.0/mattergraph/normalization/__init__.py +29 -0
- mattergraph_core-0.1.0/mattergraph/normalization/formulas.py +12 -0
- mattergraph_core-0.1.0/mattergraph/normalization/properties.py +62 -0
- mattergraph_core-0.1.0/mattergraph/normalization/structures.py +65 -0
- mattergraph_core-0.1.0/mattergraph/normalization/units.py +86 -0
- mattergraph_core-0.1.0/mattergraph/py.typed +0 -0
- mattergraph_core-0.1.0/mattergraph/schema/__init__.py +24 -0
- mattergraph_core-0.1.0/mattergraph/schema/context.py +110 -0
- mattergraph_core-0.1.0/mattergraph/schema/dataset.py +45 -0
- mattergraph_core-0.1.0/mattergraph/schema/generation.py +43 -0
- mattergraph_core-0.1.0/mattergraph/schema/material.py +119 -0
- mattergraph_core-0.1.0/mattergraph/schema/property.py +96 -0
- mattergraph_core-0.1.0/mattergraph/schema/provenance.py +63 -0
- mattergraph_core-0.1.0/mattergraph/schema/result.py +58 -0
- mattergraph_core-0.1.0/mattergraph/schema/simulation.py +32 -0
- mattergraph_core-0.1.0/mattergraph/schema/structure.py +117 -0
- mattergraph_core-0.1.0/mattergraph/scoring/__init__.py +3 -0
- mattergraph_core-0.1.0/mattergraph/scoring/scorecard.py +285 -0
- mattergraph_core-0.1.0/mattergraph/store.py +145 -0
- mattergraph_core-0.1.0/mattergraph/utils/__init__.py +1 -0
- mattergraph_core-0.1.0/pyproject.toml +48 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
dist/
|
|
7
|
+
build/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.hypothesis/
|
|
14
|
+
.coverage
|
|
15
|
+
coverage.xml
|
|
16
|
+
htmlcov/
|
|
17
|
+
|
|
18
|
+
# Docs build output
|
|
19
|
+
site/
|
|
20
|
+
|
|
21
|
+
# Env
|
|
22
|
+
.env
|
|
23
|
+
.env.local
|
|
24
|
+
*.local
|
|
25
|
+
|
|
26
|
+
# Node
|
|
27
|
+
node_modules/
|
|
28
|
+
apps/web/dist/
|
|
29
|
+
apps/web/playwright-report/
|
|
30
|
+
apps/web/test-results/
|
|
31
|
+
*.tsbuildinfo
|
|
32
|
+
.next/
|
|
33
|
+
out/
|
|
34
|
+
|
|
35
|
+
# IDE
|
|
36
|
+
.idea/
|
|
37
|
+
.vscode/
|
|
38
|
+
*.swp
|
|
39
|
+
|
|
40
|
+
# OS
|
|
41
|
+
.DS_Store
|
|
42
|
+
|
|
43
|
+
# Data artifacts (keep demo/ tracked)
|
|
44
|
+
data/cache/
|
|
45
|
+
*.sqlite3
|
|
46
|
+
|
|
47
|
+
.claude
|
|
48
|
+
apps/private-platform-ui/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mattergraph-core
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Core schema, normalization, and crystal graphs for MatterGraph.
|
|
5
|
+
Project-URL: Homepage, https://github.com/cyrusmo/MatterGraph
|
|
6
|
+
Project-URL: Repository, https://github.com/cyrusmo/MatterGraph
|
|
7
|
+
Project-URL: Issues, https://github.com/cyrusmo/MatterGraph/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/cyrusmo/MatterGraph/blob/main/CHANGELOG.md
|
|
9
|
+
Author: MatterGraph contributors
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
Keywords: crystal-structure,dft,materials-informatics,materials-science,pymatgen
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: numpy>=1.24
|
|
23
|
+
Requires-Dist: pandas>=2.0
|
|
24
|
+
Requires-Dist: pydantic>=2.5
|
|
25
|
+
Requires-Dist: pymatgen>=2024.1.1
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# mattergraph-core
|
|
29
|
+
|
|
30
|
+
Core schema, normalization, and crystal graphs for [MatterGraph](https://github.com/cyrusmo/MatterGraph) — an open-source SDK for physics-aware, provenance-aware materials workflows.
|
|
31
|
+
|
|
32
|
+
## What's in here
|
|
33
|
+
|
|
34
|
+
- **Schema** — `Material`, `MaterialProperty`, `ProvenanceRecord`, `CrystalStructure`, `SimulationJobRef`. Pydantic v2 models with strict validation (`extra="forbid"`), designed so multiple sources can report the same property without collapsing provenance.
|
|
35
|
+
- **Normalization** — unit conversion (energy, length, pressure, density, temperature), formula standardization, and canonical property names.
|
|
36
|
+
- **Crystal graphs** — `CrystalGraphBuilder` turns a pymatgen `Structure` into a periodic neighbor graph with atom and edge features. Emits plain NumPy, so there is no PyG/DGL dependency.
|
|
37
|
+
- **Workflow layer** — `MatterGraphDataset` and `CandidateSlice`: chainable, audited filters that produce reproducible, content-hashed candidate slices.
|
|
38
|
+
- **Scoring** — a deliberately transparent `Scorecard` baseline (min–max normalized objectives plus hard constraints). Not a production decision engine.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install mattergraph-core
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Example
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from mattergraph import MaterialStore, Scorecard
|
|
50
|
+
|
|
51
|
+
store = MaterialStore.from_demo()
|
|
52
|
+
scorecard = Scorecard(
|
|
53
|
+
objectives={"density": "minimize", "bulk_modulus": "maximize"},
|
|
54
|
+
constraints={"energy_above_hull": {"max": 0.05}},
|
|
55
|
+
)
|
|
56
|
+
print(scorecard.rank(store.materials).head())
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## License
|
|
60
|
+
|
|
61
|
+
Apache-2.0
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# mattergraph-core
|
|
2
|
+
|
|
3
|
+
Core schema, normalization, and crystal graphs for [MatterGraph](https://github.com/cyrusmo/MatterGraph) — an open-source SDK for physics-aware, provenance-aware materials workflows.
|
|
4
|
+
|
|
5
|
+
## What's in here
|
|
6
|
+
|
|
7
|
+
- **Schema** — `Material`, `MaterialProperty`, `ProvenanceRecord`, `CrystalStructure`, `SimulationJobRef`. Pydantic v2 models with strict validation (`extra="forbid"`), designed so multiple sources can report the same property without collapsing provenance.
|
|
8
|
+
- **Normalization** — unit conversion (energy, length, pressure, density, temperature), formula standardization, and canonical property names.
|
|
9
|
+
- **Crystal graphs** — `CrystalGraphBuilder` turns a pymatgen `Structure` into a periodic neighbor graph with atom and edge features. Emits plain NumPy, so there is no PyG/DGL dependency.
|
|
10
|
+
- **Workflow layer** — `MatterGraphDataset` and `CandidateSlice`: chainable, audited filters that produce reproducible, content-hashed candidate slices.
|
|
11
|
+
- **Scoring** — a deliberately transparent `Scorecard` baseline (min–max normalized objectives plus hard constraints). Not a production decision engine.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install mattergraph-core
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```python
|
|
22
|
+
from mattergraph import MaterialStore, Scorecard
|
|
23
|
+
|
|
24
|
+
store = MaterialStore.from_demo()
|
|
25
|
+
scorecard = Scorecard(
|
|
26
|
+
objectives={"density": "minimize", "bulk_modulus": "maximize"},
|
|
27
|
+
constraints={"energy_above_hull": {"max": 0.05}},
|
|
28
|
+
)
|
|
29
|
+
print(scorecard.rank(store.materials).head())
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
Apache-2.0
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""MatterGraph core: materials schema, crystal graphs, and basic scoring."""
|
|
2
|
+
|
|
3
|
+
from importlib import metadata
|
|
4
|
+
|
|
5
|
+
from mattergraph.schema.context import PropertyContext, Quantity, SourceArtifact
|
|
6
|
+
from mattergraph.schema.dataset import DatasetManifest
|
|
7
|
+
from mattergraph.schema.material import Material
|
|
8
|
+
from mattergraph.schema.property import MaterialProperty
|
|
9
|
+
from mattergraph.schema.provenance import ProvenanceRecord
|
|
10
|
+
from mattergraph.schema.result import SimulationResultEnvelope
|
|
11
|
+
from mattergraph.scoring.scorecard import Scorecard
|
|
12
|
+
from mattergraph.store import MaterialStore
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"DatasetManifest",
|
|
16
|
+
"Material",
|
|
17
|
+
"MaterialProperty",
|
|
18
|
+
"PropertyContext",
|
|
19
|
+
"ProvenanceRecord",
|
|
20
|
+
"Quantity",
|
|
21
|
+
"SimulationResultEnvelope",
|
|
22
|
+
"SourceArtifact",
|
|
23
|
+
"MaterialStore",
|
|
24
|
+
"Scorecard",
|
|
25
|
+
"__version__",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
try:
|
|
29
|
+
__version__ = metadata.version("mattergraph-core")
|
|
30
|
+
except metadata.PackageNotFoundError:
|
|
31
|
+
__version__ = "0.0.0"
|