@@ -70,7 +70,6 @@ To install the package, run the following command under the root of the folder:
70
70
mamba env create -f environment.yaml
71
71
mamba activate mattersim
72
72
uv pip install -e .
73
- python setup.py build_ext --inplace
74
73
```
75
74
76
75
## Pre-trained Models
@@ -96,20 +95,21 @@ and additional materials capabilities are available in
96
95
### A minimal test
97
96
``` python
98
97
import torch
98
+ from loguru import logger
99
99
from ase.build import bulk
100
100
from ase.units import GPa
101
101
from mattersim.forcefield import MatterSimCalculator
102
102
103
103
device = " cuda" if torch.cuda.is_available() else " cpu"
104
- print (f " Running MatterSim on { device} " )
104
+ logger.info (f " Running MatterSim on { device} " )
105
105
106
106
si = bulk(" Si" , " diamond" , a = 5.43 )
107
107
si.calc = MatterSimCalculator(device = device)
108
- print (f " Energy (eV) = { si.get_potential_energy()} " )
109
- print (f " Energy per atom (eV/atom) = { si.get_potential_energy()/ len (si)} " )
110
- print (f " Forces of first atom (eV/A) = { si.get_forces()[0 ]} " )
111
- print (f " Stress[0][0] (eV/A^3) = { si.get_stress(voigt = False )[0 ][0 ]} " )
112
- print (f " Stress[0][0] (GPa) = { si.get_stress(voigt = False )[0 ][0 ] / GPa} " )
108
+ logger.info (f " Energy (eV) = { si.get_potential_energy()} " )
109
+ logger.info (f " Energy per atom (eV/atom) = { si.get_potential_energy()/ len (si)} " )
110
+ logger.info (f " Forces of first atom (eV/A) = { si.get_forces()[0 ]} " )
111
+ logger.info (f " Stress[0][0] (eV/A^3) = { si.get_stress(voigt = False )[0 ][0 ]} " )
112
+ logger.info (f " Stress[0][0] (GPa) = { si.get_stress(voigt = False )[0 ][0 ] / GPa} " )
113
113
```
114
114
115
115
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.
0 commit comments