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

Can't use models from AIS Square #154

Open
rschireman opened this issue Aug 6, 2023 · 1 comment
Open

Can't use models from AIS Square #154

rschireman opened this issue Aug 6, 2023 · 1 comment

Comments

@rschireman
Copy link

Bug summary

After attempting to use the H2O-DPLR-model in the ASE and LAMMPS (w/ ASE interface), I receive the following error:

RuntimeError: model in graph (version 0.0) is incompatible with the model (version 1.1) supported by the current code.See https://deepmd.rtfd.io/compatability/ for details.

Input Files, Running Commands, Error Log, etc.

ASE input:

from ase import Atoms
from deepmd.calculator import DP

water = Atoms(
    "H2O",
    positions=[(0.7601, 1.9270, 1), (1.9575, 1, 1), (1.0, 1.0, 1.0)],
    cell=[100, 100, 100],
    calculator=DP(model="H2O-SCAN0-model.pb"),
)
print(water.get_potential_energy())
print(water.get_forces())

LAMMPS ASE input:


from ase.calculators.lammpsrun import LAMMPS
from ase import Atoms
water = Atoms(
    "H2O",
    positions=[(0.7601, 1.9270, 1), (1.9575, 1, 1), (1.0, 1.0, 1.0)],
    cell=[100, 100, 100],
)

parameters = {'pair_style': 'deepmd H2O-DPLR-model.pb',
             'pair_coeff':   '* * O H'}                   
files = ['H2O-DPLR-model.pb']
lammps = LAMMPS(parameters=parameters, files=files, keep_tmp_files=True, tmp_dir='./debug')
water.calc = lammps
print(water.get_potential_energy())
@wanghan-iapcm
Copy link

wanghan-iapcm commented Aug 7, 2023

As the message explained, the code used to train the model is not compatible to the code you are using to inference the model
You may retrain the model with your code to solve the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants