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

Error dp test #165

Closed
wjinjin opened this issue Jan 29, 2020 · 5 comments · Fixed by #166
Closed

Error dp test #165

wjinjin opened this issue Jan 29, 2020 · 5 comments · Fixed by #166
Labels

Comments

@wjinjin
Copy link

wjinjin commented Jan 29, 2020

The erros shows as follow:
Traceback (most recent call last):
File "/soft/anaconda3/bin/dp", line 10, in
sys.exit(main())
File "/soft/anaconda3/lib/python3.7/site-packages/deepmd/main.py", line 69, in main
test(args)
File "/soft/anaconda3/lib/python3.7/site-packages/deepmd/test.py", line 20, in test
test_ener(args)
File "/soft/anaconda3/lib/python3.7/site-packages/deepmd/test.py", line 64, in test_ener
l2e = (l2err (energy - test_data["energy"][:numb_test].reshape([-1,1])))
KeyError: 'energy'

@njzjz
Copy link
Member

njzjz commented Jan 29, 2020

Hi, what is your test data like? Does it contain energy.npy?

@wjinjin
Copy link
Author

wjinjin commented Jan 29, 2020

I checked and energy.npy file exists.

@njzjz njzjz added the bug label Jan 30, 2020
@njzjz
Copy link
Member

njzjz commented Jan 30, 2020

It is confirmed as a bug caused by 5f77019.

@wjinjin
Copy link
Author

wjinjin commented Jan 30, 2020

Now is there any way I can fix it? I already tried installing it again, but it still doesn't work.

amcadmus pushed a commit to amcadmus/deepmd-kit that referenced this issue Jan 31, 2020
amcadmus added a commit that referenced this issue Jan 31, 2020
amcadmus pushed a commit to amcadmus/deepmd-kit that referenced this issue Jan 31, 2020
@njzjz
Copy link
Member

njzjz commented Jan 31, 2020

Now is there any way I can fix it? I already tried installing it again, but it still doesn't work.

It has been already fixed by #166 and #167. You can git pull to the newest version and reinstall it. (Or just replace /soft/anaconda3/lib/python3.7/site-packages/deepmd/test.py with the newest test.py file)

dp = DeepPot(args.model)
data = DeepmdData(args.system, args.set_prefix, shuffle_test = args.shuffle_test, type_map = dp.get_type_map())
data.add('energy', 1, atomic=False, must=False, high_prec=True)
data.add('force', 3, atomic=True, must=False, high_prec=False)
data.add('virial', 9, atomic=False, must=False, high_prec=False)
if dp.get_dim_fparam() > 0:
data.add('fparam', dp.get_dim_fparam(), atomic=False, must=True, high_prec=False)
if dp.get_dim_aparam() > 0:
data.add('aparam', dp.get_dim_aparam(), atomic=True, must=True, high_prec=False)
test_data = data.get_test ()

@njzjz njzjz linked a pull request Dec 24, 2020 that will close this issue
njzjz referenced this issue in njzjz/deepmd-kit Sep 21, 2023
add a machine file example for gaussian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants