Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/hdbscan-0.8.29
Browse files Browse the repository at this point in the history
  • Loading branch information
sgbaird authored Jul 8, 2023
2 parents f1b7802 + 9dafd51 commit b22d11f
Show file tree
Hide file tree
Showing 21 changed files with 1,482 additions and 563 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/flit-install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- "**"
tags-ignore:
- "*.*.*"
pull_request: # Run in every PR
workflow_dispatch: # Allow manually triggering the workflow

jobs:
pytest:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ repos:
# - id: end-of-file-fixer
# - id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 19.3b0
rev: 23.3.0
hooks:
- id: black
13 changes: 12 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,18 @@

html_extra_path = ["googlea441f484329a8f75.html"]

autodoc_mock_imports = ["numba", "torch", "pymatgen", "hdbscan"]
autodoc_mock_imports = [
"numba",
"torch",
"pymatgen",
"hdbscan",
"matbench_genmetrics",
"matminer",
"tensorflow",
"megnet",
"m3gnet",
"umap",
]

# https://github.com/sphinx-doc/sphinx/issues/7000#issuecomment-677916705
source_suffix = [".rst", ".md"]
2 changes: 2 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Contributing
============
```{include} ../../CONTRIBUTING.md
:relative-images:
```
9 changes: 5 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
Welcome to Chemically Novel Materials Discovery!
================================================

This is the documentation for `mat_discover <https://github.com/sparks-baird/mat_discover>`_. Descending from Stochastic Clustering Variance Regression (DiSCoVeR) is a
composition-based materials
discovery algorithm. DiSCoVeR emphasizes exploring high-performance candidates in new chemical
This is the documentation for `mat_discover <https://github.com/sparks-baird/mat_discover>`_. Descending from Stochastic Clustering Variance Regression (DiSCoVeR) is a materials
discovery algorithm for composition- or structure-based materials. DiSCoVeR emphasizes exploring high-performance candidates in new chemical
spaces as originally proposed by Baird, Diep, and Sparks (`Digital Discovery <https://dx.doi.org/10.1039/D1DD00028D>`_, `ChemRxiv <https://dx.doi.org/10.33774/chemrxiv-2021-5l2f8-v3>`_). The
library :code:`mat_discover` provides a GPU-accelerated (and CPU-compatible) Python
implementation and tools for analyzing the outputs. :code:`mat_discover` will "suggest your next experiment" using a custom training dataset of chemical formula and target
implementation and tools for analyzing the outputs. :code:`mat_discover` will "suggest
your next experiment" using a custom training dataset of chemical formula or structure and target
properties and a custom validation set of potential candidates. All in just a few lines of code! `Get started learning about DiSCoVeR <https://mat-discover.readthedocs.io/en/latest/readme.html>`_.

.. raw:: html
Expand All @@ -37,6 +37,7 @@ properties and a custom validation set of potential candidates. All in just a fe
figures
contributing
modules
GitHub Source <https://github.com/sparks-baird/mat_discover>

Indices and tables
==================
Expand Down
2 changes: 1 addition & 1 deletion docs/source/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ working on an [implementation of composition-based Bayesian optimization
using Ax](https://github.com/facebook/Ax/issues/727) (2021-12-10).

For alternative "suggest next experiment" materials discovery tools,
see the [Citrine Platform](https://citrination.com/) (free for non-commercial use), [CAMD](https://github.com/TRI-AMDD/CAMD) ([trihackathon2020 tutorial notebooks](https://github.com/TRI-AMDD/tri-hackathon-2020)), [PyChemia](https://github.com/MaterialsDiscovery/PyChemia),
see the [Citrine Platform](https://citrination.com/) (proprietary), [ChemOS](https://chemos.io/) (proprietary), [Olympus](https://aspuru-guzik-group.github.io/olympus/), [CAMD](https://github.com/TRI-AMDD/CAMD) ([trihackathon2020 tutorial notebooks](https://github.com/TRI-AMDD/tri-hackathon-2020)), [PyChemia](https://github.com/MaterialsDiscovery/PyChemia),
[Heteroscedastic-BO](https://github.com/Ryan-Rhys/Heteroscedastic-BO), and
[thermo](https://github.com/janosh/thermo).

Expand Down
4 changes: 3 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- pandas
- pytorch >=1.9.0
- plotly
- python >=3.7,<3.10
- python >=3.7
- scipy
- cudatoolkit <11.4
- numba >=0.53.1
Expand All @@ -34,6 +34,8 @@ dependencies:
- pip:
# core:
- ElM2D ==0.4.1
- matbench_genmetrics
- matbench
# optional:
- ipykernel
- nbformat >=4.2.0
Expand Down
3 changes: 2 additions & 1 deletion examples/crabnet_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# TODO: incorporate CrabNet uncertainty into search
"""
from crabnet.crabnet_ import CrabNet
import pandas as pd

# %% imports
from tqdm import tqdm
Expand Down Expand Up @@ -82,7 +83,7 @@
idx = perf_val_df.pred.idxmax()
# idx = np.where(val_pred == max(val_pred))[0][0]
move_row = perf_val_df.loc[idx]
perf_train_df.append(move_row)
perf_train_df = pd.concat((perf_train_df, move_row))
perf_val_df = perf_val_df.drop(index=idx)
next_experiments.append(move_row.to_dict())
experiment = ad_experiments_metrics(
Expand Down
15 changes: 14 additions & 1 deletion examples/structurally-aware-mat-discover-bare-bones.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"colab_type": "text",
Expand All @@ -11,6 +12,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "MMu_LzmX3LpF"
Expand All @@ -22,6 +24,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "L33XMjHe4QRS"
Expand Down Expand Up @@ -55,6 +58,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "e0mvzmq43JxT"
Expand Down Expand Up @@ -83,6 +87,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "WdMXy0Xe3U4L"
Expand Down Expand Up @@ -116,10 +121,11 @@
"from m3gnet.models import M3GNet\n",
"from m3gnet.trainers import Trainer\n",
"from matbench.bench import MatbenchBenchmark\n",
"from matbench_genmetrics.utils.featurize import cdvae_cov_struct_fingerprints"
"from matbench_genmetrics.core.utils.featurize import cdvae_cov_struct_fingerprints"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "FJxouWga4x0o"
Expand Down Expand Up @@ -322,6 +328,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "S-MXvBpO3GTc"
Expand Down Expand Up @@ -378,6 +385,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "G0MkF2vC5ux7"
Expand Down Expand Up @@ -470,6 +478,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "GRY0BlXP3EUj"
Expand Down Expand Up @@ -577,6 +586,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "adO7u1h93CnD"
Expand Down Expand Up @@ -643,6 +653,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "JXcjLXuy2_m7"
Expand Down Expand Up @@ -794,6 +805,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "qQiTahYJ5-kC"
Expand Down Expand Up @@ -829,6 +841,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "92FfjLOt6AY5"
Expand Down
Loading

0 comments on commit b22d11f

Please sign in to comment.