Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update grappa_interface.py to make it comatible with grappa-1.0.0 #9

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/grappa_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from grappa.data import Molecule
from grappa.data import Parameters

from grappa.utils.loading_utils import model_from_url
from grappa.utils.loading_utils import model_from_tag
from grappa.grappa import Grappa

from openmm import unit as openmm_unit
Expand Down Expand Up @@ -90,6 +90,7 @@ def build_molecule(top: Topology) -> Molecule:
for k, v in atom_info.items()
if k not in ["nr", "atomic_number", "partial_charges"]
},
charge_model="classical",
)
return mol

Expand Down Expand Up @@ -243,8 +244,8 @@ def load_model():
"""Loads grappa model"""
# load model, tag will be changed to be more permanent
# model_tag = "https://github.com/LeifSeute/test_torchhub/releases/download/test_release_radicals/radical_model_12142023.pth" # older model
model_tag = "https://github.com/LeifSeute/test_torchhub/releases/download/model_release/grappa-1.0-01-26-2024.pth"
model = model_from_url(model_tag)
model_tag = "grappa-1.0"
model = model_from_tag(model_tag)
return model


Expand Down
Loading