Skip to content

Commit

Permalink
Merge branch 'main' of github.com:materialsvirtuallab/matgl
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Nov 6, 2024
2 parents 3688d61 + 16e9447 commit 203ffa3
Show file tree
Hide file tree
Showing 21 changed files with 440 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
max-parallel: 20
matrix:
python-version: ["3.9", "3.11"]
python-version: ["3.10", "3.12"]
os: [ "ubuntu-latest", "macos-latest" ]

runs-on: ${{ matrix.os }}
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Nassar, Carmelo Gonzales).

Major milestones are summarized below. Please refer to the [changelog] for details.

- v1.1.0 (May 7 2024): Implementation of [CHGNet] + pre-trained models.
- v1.0.0 (Feb 14 2024): Implementation of [TensorNet] and [SO3Net].
- v0.5.1 (Jun 9 2023): Model versioning implemented.
- v0.5.0 (Jun 8 2023): Simplified saving and loading of models. Now models can be loaded with one line of code!
Expand Down Expand Up @@ -87,6 +88,8 @@ We have implemented other models in matgl as well. A non-exhaustive list is give
- [TensorNet], an O(3)-equivariant message-passing neural network architecture that
leverages Cartesian tensor representations.
- [SO3Net], a minimalist SO(3)-equivariant neural network.
- [CHGNet], an invariant message-passing neural network architecture that can predict
PES properties and magmoms.

## Installation

Expand Down Expand Up @@ -226,6 +229,21 @@ information. If you are using any of the pretrained models, please cite the rele
> Chen, C., Ong, S.P. *A universal graph deep learning interatomic potential for the periodic table.* Nature
> Computational Science, 2023, 2, 718–728. DOI: [10.1038/s43588-022-00349-3][m3gnet].

>**CHGNet**
>
> Deng, B., Zhong, P., Jun, K. et al. *CHGNet: as a pretrained universal neural network potential for charge-informed atomistic modelling.*
> Nat Mach Intell 5, 1031–1041 (2023). DOI:[10.1038/s42256-023-00716-3][chgnet]

>**TensorNet**
>
> Simeon, G. De Fabritiis, G. *Tensornet: Cartesian tensor representations for efficient learning of molecular potentials.*
> Adv. Neural Info. Process. Syst. 36, (2024). DOI: [10.48550/arXiv.2306.06482][tensornet]

>**SO3Net**
>
> Schütt, K. T., Hessmann, S. S. P., Gebauer, N. W. A., Lederer, J., Gastegger, M. *SchNetPack 2.0: A neural network toolbox for atomistic machine learning.*
> J. Chem. Phys. 158, 144801 (2023). DOI: [10.1063/5.0138367][so3net]

## FAQs

1. **The `M3GNet-MP-2021.2.8-PES` differs from the original TensorFlow (TF) implementation!**
Expand Down Expand Up @@ -296,3 +314,4 @@ ACI-1548562.
[tutorials]: https://matgl.ai/tutorials "Tutorials"
[tensornet]: https://arxiv.org/abs/2306.06482 "TensorNet"
[so3net]: https://pubs.aip.org/aip/jcp/article-abstract/158/14/144801/2877924/SchNetPack-2-0-A-neural-network-toolbox-for "SO3Net"
[chgnet]: https://www.nature.com/articles/s42256-023-00716-3 "CHGNet"
6 changes: 2 additions & 4 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.3.3)
strscan
rexml (3.3.9)
rouge (3.26.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
Expand All @@ -240,7 +239,6 @@ GEM
faraday (>= 0.17.3, < 3)
simpleidn (0.2.1)
unf (~> 0.1.4)
strscan (3.1.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
Expand All @@ -251,7 +249,7 @@ GEM
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
webrick (1.8.1)
webrick (1.8.2)

PLATFORMS
arm64-darwin-22
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,4 @@ ACI-1548562.
[tutorials]: https://matgl.ai/tutorials "Tutorials"
[tensornet]: https://arxiv.org/abs/2306.06482 "TensorNet"
[so3net]: https://pubs.aip.org/aip/jcp/article-abstract/158/14/144801/2877924/SchNetPack-2-0-A-neural-network-toolbox-for "SO3Net"
[chgnet]: https://www.nature.com/articles/s42256-023-00716-3 "CHGNet"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Introduction\n",
"\n",
"This notebook demonstrates the use of the pre-trained M3GNet model to perform structural relaxations, molecular dynamics simulations and single-point calculations.\n",
"This notebook demonstrates the use of the pre-trained universal potentials to perform structural relaxations, molecular dynamics simulations and single-point calculations.\n",
"\n",
"Author: Tsz Wai Ko (Kenko)\n",
"Email: [email protected]"
Expand Down Expand Up @@ -42,7 +42,7 @@
"source": [
"# Loading the pre-trained M3GNet PES model\n",
"\n",
"We will first load the M3GNet PES model, which is trained on the MP-2021.2.8 dataset. This can be done with a single line of code."
"We will first load the M3GNet PES model, which is trained on the MP-2021.2.8 dataset. This can be done with a single line of code. Here we only use M3GNet for demonstration and users can choose other available models."
]
},
{
Expand All @@ -52,7 +52,9 @@
"metadata": {},
"outputs": [],
"source": [
"pot = matgl.load_model(\"M3GNet-MP-2021.2.8-PES\")"
"# You can load any pretrained potentials such as CHGNet ('CHGNet-MPtrj-2023.12.1-PES-2.7M', 'CHGNet-MPtrj-2024.2.13-PES-11M')\n",
"# To see available models, use get_available_pretrained_models()\n",
"pot = matgl.load_model(\"M3GNet-MP-2021.2.8-PES\") "
]
},
{
Expand Down Expand Up @@ -120,7 +122,7 @@
"source": [
"# Single point energy calculation\n",
"\n",
"Perform a single-point calculation for final structure using M3GNetCalculator."
"Perform a single-point calculation for final structure using PESCalculator."
]
},
{
Expand Down Expand Up @@ -154,7 +156,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.14"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ classifiers = [
]
dependencies = [
"ase",
"dgl<=2.1.0",
"dgl<=2.2.1",
"pymatgen",
"lightning<=2.4.0",
"torch<=2.2.1",
"pydantic",
"torchdata<=0.7.1",
"boto3",
"numpy<2.0.0"
"numpy<3.0.0"
]
version = "1.1.3"

Expand All @@ -71,6 +71,7 @@ mgl = "matgl.cli:main"
where = ["src"]

[tool.setuptools.package-data]
matgl = ["py.typed"]
"matgl.utils" = ["sb_roots.npy"]


Expand Down
17 changes: 9 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
dgl==2.1.0
torch==2.4.0
dgl==2.2.1
torch==2.2.1
lightning==2.4.0
pymatgen==2024.8.9
pymatgen==2024.10.29
ase==3.23.0
pydantic==2.8.2
torchdata==0.8.0
boto3==1.34.160
numpy==1.26.4
sympy==1.13.2
pydantic==2.9.2
numpy==2.1.3
torchdata==0.7.1
boto3==1.35.54
sympy==1.13.3

Loading

0 comments on commit 203ffa3

Please sign in to comment.