-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Shyue Ping Ong
committed
Nov 27, 2023
1 parent
51496ed
commit 3b107f7
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Entrypoints for Pytorch Hub.""" | ||
from __future__ import annotations | ||
|
||
dependencies = ["torch", "matgl"] | ||
|
||
import matgl # noqa | ||
|
||
|
||
# resnet18 is the name of entrypoint | ||
def m3gnet_universal_potential(version="MP-2021.2.8-DIRECT", **kwargs): | ||
"""M3GNet Universal Potential model. | ||
Args: | ||
version (str): Defaults to "MP-2021.2.8-DIRECT". Other versions available. | ||
**kwargs: Pass through to matgl.load_model. | ||
""" | ||
# Call the model, load pretrained weights | ||
return matgl.load_model(f"M3GNet-{version}", **kwargs) |