Skip to content

Commit

Permalink
Merge pull request #67 from microsoft/hanyang/update-deps
Browse files Browse the repository at this point in the history
dep: update deps
  • Loading branch information
ZeroKnighting authored Dec 25, 2024
2 parents b340f4f + 88cf9a3 commit 8b7ffb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ To install the package, run the following command under the root of the folder:
mamba env create -f environment.yaml
mamba activate mattersim
uv pip install -e .
python setup.py build_ext --inplace
```

## Pre-trained Models
Expand All @@ -96,20 +95,21 @@ and additional materials capabilities are available in
### A minimal test
```python
import torch
from loguru import logger
from ase.build import bulk
from ase.units import GPa
from mattersim.forcefield import MatterSimCalculator

device = "cuda" if torch.cuda.is_available() else "cpu"
print(f"Running MatterSim on {device}")
logger.info(f"Running MatterSim on {device}")

si = bulk("Si", "diamond", a=5.43)
si.calc = MatterSimCalculator(device=device)
print(f"Energy (eV) = {si.get_potential_energy()}")
print(f"Energy per atom (eV/atom) = {si.get_potential_energy()/len(si)}")
print(f"Forces of first atom (eV/A) = {si.get_forces()[0]}")
print(f"Stress[0][0] (eV/A^3) = {si.get_stress(voigt=False)[0][0]}")
print(f"Stress[0][0] (GPa) = {si.get_stress(voigt=False)[0][0] / GPa}")
logger.info(f"Energy (eV) = {si.get_potential_energy()}")
logger.info(f"Energy per atom (eV/atom) = {si.get_potential_energy()/len(si)}")
logger.info(f"Forces of first atom (eV/A) = {si.get_forces()[0]}")
logger.info(f"Stress[0][0] (eV/A^3) = {si.get_stress(voigt=False)[0][0]}")
logger.info(f"Stress[0][0] (GPa) = {si.get_stress(voigt=False)[0][0] / GPa}")
```

In this release, we provide two checkpoints: `MatterSim-v1.0.0-1M.pth` and `MatterSim-v1.0.0-5M.pth`. By default, the `1M` version is loaded.
Expand Down
4 changes: 2 additions & 2 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ dependencies:
- ca-certificates
- openssl
- numpy<2
- phonopy==2.14.0
- phono3py==2.3.0
- phonopy
- phono3py
- cython>=0.29.32
- setuptools>=45
- wheel
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ dependencies = [
"ase>=3.23.0",
"azure-identity",
"azure-storage-blob",
"scikit-learn",
"deprecated",
"e3nn>=0.5.0",
"emmet-core>=0.84",
"atomate2",
"emmet-core>=0.84; python_version >= '3.10'",
"emmet-core<0.84; python_version < '3.10'",
"loguru",
"mp-api",
"numpy<2",
Expand Down

0 comments on commit 8b7ffb6

Please sign in to comment.