Skip to content

Add material database and Ashby maps#71

Draft
chemiskyy wants to merge 4 commits intomasterfrom
feature/ashby
Draft

Add material database and Ashby maps#71
chemiskyy wants to merge 4 commits intomasterfrom
feature/ashby

Conversation

@chemiskyy
Copy link
Member

This pull request introduces comprehensive documentation and example scripts for the new simcoon.ashby subpackage, which provides tools for material property exploration, Ashby diagram plotting, database integration, and bridging material data to simulation tensors. It also adds optional dependencies for plotting and database features, and integrates the Ashby module into the main documentation navigation.

Documentation additions:

  • Added a suite of documentation files (docs/ashby/index.rst, material.rst, data.rst, plotting.rst, bridge.rst, database.rst) covering the Ashby module's data model, dataset loaders, plotting functions, bridge to simulation tensors, and Materials Project database integration. [1] [2] [3] [4] [5] [6]
  • Integrated the Ashby module documentation into the main docs navigation by adding ashby/index to the docs/index.rst table of contents.

Example scripts and gallery:

  • Added an example script (examples/ashby/ashby_diagram.py) demonstrating the full Ashby workflow: loading datasets, plotting diagrams, converting materials for simulation, and fetching from online databases.
  • Created a README for the Ashby example gallery outlining the types of examples included.

Dependency and setup changes:

  • Added an ashby optional dependency group in pyproject.toml for plotting and database features (mp-api, scipy, matplotlib).

Legacy code removal:

  • Removed the legacy plotting helper functions from python-setup/simcoon/ashby.py, as they are now documented and maintained elsewhere.

Replace the old monolithic ashby.py script with a new simcoon.ashby package. Adds datamodel (Material, MaterialCollection, SymmetryType), data loaders (load_builtin, load_csv), a Materials Project database fetcher (mp-api optional), and a bridge to simcoon for stiffness/compliance/solver props. Plotting helpers are re-exported for backward compatibility and a bundled materials.json (~60 curated materials) is included. Includes sensible unit conversions (GPa→MPa, density units) and explicit NotImplemented/validation for more complex symmetries (transverse-isotropic, orthotropic) where full tensors or extra inputs are required.
Add documentation for the new simcoon.ashby subpackage (index, material, data, plotting, bridge, database), documenting the data model, built-in dataset and CSV loader, plotting utilities, Simcoon bridge (stiffness/compliance conversion), and Materials Project integration. Update docs/index.rst to include the ashby docs. Also add examples/ashby/README.rst and an ashby_diagram.py example that demonstrates loading the dataset, plotting an Ashby diagram, adding guide lines/envelopes, and converting a material to a simcoon stiffness tensor. Notes in docs mention optional extras (simcoon[ashby]) and MP API usage.
@github-project-automation github-project-automation bot moved this to Backlog in simcoon 2.0 Feb 9, 2026
@chemiskyy chemiskyy marked this pull request as draft February 9, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant

Comments