adaptyv
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
Analyze, validate, convert, and transform materials structures and computed materials data with current pymatgen APIs, including local phase diagrams, symmetry sensitivity, electronic-structure I/O, and explicitly bounded Materials Project queries.
$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill pymatgen --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pymatgenContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyze, validate, convert, and transform materials structures and computed materials data with current pymatgen APIs, including local phase diagrams, symmetry sensitivity, electronic-structure I/O, and explicitly bounded Materials Project queries.
name: pymatgen description: Analyze, validate, convert, and transform materials structures and computed materials data with current pymatgen APIs, including local phase diagrams, symmetry sensitivity, electronic-structure I/O, and explicitly bounded Materials Project queries. license: MIT compatibility: Python 3.11+ with uv. The verified snapshot uses pymatgen 2026.5.4, pymatgen-core 2026.7.16, and mp-api 0.46.4. Bundled help and planning CLIs use only the standard library; local scientific execution lazily requires the pinned pymatgen packages. Materials Project access additionally requires explicit network approval and the single named secret MP_API_KEY. allowed-tools: Read Write Bash Glob Python metadata: version: "1.3" skill-author: "K-Dense Inc." last-reviewed: "2026-07-23"
Use pymatgen for explicit, provenance-preserving work with compositions, molecules, periodic structures, computed entries, symmetry, phase diagrams, electronic structures, and electronic-structure-code files. Treat every parse, conversion, symmetry assignment, transformation, and database result as method- and parameter-dependent.
The MIT frontmatter license covers this skill. `pymatgen` and `pymatgen-core` are MIT; `mp-api` declares BSD-3-Clause-LBNL. Materials Project data is generally CC BY 4.0, while contributed data remains owned by its contributors. Check the exact artifact and data terms before redistribution.
Package metadata requires Python 3.11+ and directly requires `pymatgen-core>=2026.4.16`.
It now contains core objects, symmetry/lattice operations, and the I/O layer, all under the existing `pymatgen.*` namespace.
(2026-06-15), requires Python 3.11+, and depends on `pymatgen>2024.2.20`.
distributions prevents `pymatgen==2026.5.4` from silently resolving to a different future core.
infer semantic-version compatibility from the numbers.
Create a project lock for reproducibility:
uv init --python 3.11 uv add "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4" uv lock uv sync --frozen
For a disposable reviewed environment:
uv venv --python 3.11 .venv-pymatgen uv pip install --python .venv-pymatgen/bin/python \ "pymatgen==2026.5.4" "pymatgen-core==2026.7.16" "mp-api==0.46.4"
Direct pins do not freeze all transitive wheels. Preserve `uv.lock`, platform, Python version, package versions, and artifact hashes.
1. State whether the object is a non-periodic `Molecule` or periodic `Structure`; record lattice and periodic boundary conditions. 2. State units. Pymatgen commonly uses Å, degrees, eV, eV/atom, amu, and g/cm³, but each API's documented contract is authoritative. 3. State coordinate mode. `Structure` coordinates are fractional unless `coords_are_cartesian=True`; `Molecule` coordinates are Cartesian. 4. Inspect every parser warning. For CIF, preserve occupancy, site-merging, stoichiometry, and correction warnings; do not silently accept fixes. 5. Report disorder/partial occupancies and oxidation-state decoration. Never guess oxidation states implicitly. 6. Run validation before symmetry, neighbor, transformation, conversion, or thermodynamic analysis. 7. Sweep symmetry tolerances and report `symprec` in Å and `angle_tolerance` in degrees with every assignment. 8. Treat transformations as new artifacts. Preserve the input, parameters, software versions, warnings, and parent/child checksums. 9. Before conversion, identify representation loss. Write only to a new path and round-trip-check scientifically relevant properties. 10. Build phase diagrams only from compatible total energies and correction schemes. A computed hull is conditional on the supplied entry set. 11. Keep all database access off by default. Disclose endpoint, filters, fields, result limit, cache behavior, output, license, and citation before an explicit execution step. 12. Preserve an artifact manifest. Never use pickle or load an untrusted general object graph; use schema-validated JSON and explicit constructors.
Use the public convenience imports:
from pymatgen.core import Composition, Element, Lattice, Molecule, Structure
composition = Composition("LiFePO4", strict=True)
iron = Element("Fe")
lattice = Lattice.cubic(5.64) # Å
structure = Structure(
lattice,
["Na", "Cl"],
[[0, 0, 0], [0.5, 0.5, 0.5]],
coords_are_cartesian=False,
validate_proximity=True,
)
molecule = Molecule(
["O", "H", "H"],
[[0.0, 0.0, 0.0], [0.758, 0.0, 0.504], [-0.758, 0.0, 0.504]],
charge=0,
spin_multiplicity=1,
)`Structure` and `Molecule` are mutable; use `IStructure`/`IMolecule` or an explicit copy when mutation would compromise provenance. See [core classes](references/core_classes.md).
Prefer the bundled validator, which captures CIF and Python warnings and reports units, occupancy, disorder, oxidation states, periodicity, coordinate mode, and minimum distances:
python scripts/composition_structure_validator.py composition "Fe2O3" python scripts/composition_structure_validator.py structure structure.cif python scripts/structure_analyzer.py structure.cif --symmetry
For direct CIF work, use the current parser method and inspect both warning channels:
import warnings
from pymatgen.io.cif import CifParser
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
parser = CifParser("input.cif", check_cif=True)
structures = parser.parse_structur🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.
How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user…
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection,…
Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP…
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data…
Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree…
Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk…