Skip to content

Commit

Permalink
add link to github release
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyes319 committed Jan 11, 2024
1 parent 9490653 commit 4dc1061
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions mace/calculators/foundations_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ def mace_mp(
) -> MACECalculator:
"""
Constructs a MACECalculator with a pretrained model based on the Materials Project (89 elements).
The model is released under the MIT license.
The model is released under the MIT license. See https://github.com/ACEsuit/mace-mp for all models.
Note:
If you are using this function, please cite the relevant paper for the Materials Project,
any paper associated with the MACE model, and also the following:
- MACE-MP by Ilyes Batatia, Philipp Benner, Yuan Chiang, Alin M. Elena,
Dávid P. Kovács, Janosh Riebesell, et al., 2023, arXiv:2401.00096
- MACE-Universal by Yuan Chiang, 2023, Hugging Face, Revision e5ebd9b,
DOI: 10.57967/hf/1202, URL: https://huggingface.co/cyrusyc/mace-universal
- Matbench Discovery by Janosh Riebesell, Rhys EA Goodall, Philipp Benner, Yuan Chiang,
Expand Down Expand Up @@ -57,9 +59,9 @@ def mace_mp(
elif model in (None, "small", "medium", "large") or str(model).startswith("https:"):
try:
urls = dict(
small="https://tinyurl.com/2jmmb8b7?confirm=yTib", # 2023-12-10-mace-128-L0_energy_epoch-249.model
medium="https://tinyurl.com/y7uhwpje?confirm=yTib", # 2023-12-03-mace-128-L1_epoch-199.model
large="https://figshare.com/ndownloader/files/43117273",
small="http://tinyurl.com/46jrkm3v", # 2023-12-10-mace-128-L0_energy_epoch-249.model
medium="http://tinyurl.com/5yyxdm76", # 2023-12-03-mace-128-L1_epoch-199.model
large="http://tinyurl.com/5f5yavf3", # MACE_MPtrj_2022.9.model
)
checkpoint_url = (
urls.get(model, urls["medium"])
Expand All @@ -78,10 +80,9 @@ def mace_mp(
_, http_msg = urllib.request.urlretrieve(
checkpoint_url, cached_model_path
)
# make sure download was successful
if "Content-Type: application/octet-stream" not in http_msg:
if "Content-Type: text/html" in http_msg:
raise RuntimeError(
f"Model download failed, please check {checkpoint_url}"
f"Model download failed, please check the URL {checkpoint_url}"
)
print(f"Cached MACE model to {cached_model_path}")
model = cached_model_path
Expand Down

0 comments on commit 4dc1061

Please sign in to comment.