Replies: 1 comment
-
Please check documentation and reshape input arrays. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have trained a DeepDOS neural network and now I would like to perform inference for predicting atomic DOS. I am following this script as example:
https://github.com/CSIprinceton/workshop-july-2023/blob/main/hands-on-sessions/day-3/7-deep-wannier/dipole_distribution.py
This is part of the script I am trying to use:
`
from deepmd.infer import DeepDOS
import numpy as np
import ase
import ase.io
model_path = './frozen_model.pb'
dp = DeepDOS(model_path)
traj_path = './dump.lammpstrj'
configs = ase.io.read(traj_path,format = 'lammps-dump-text',index=':')
for atoms in configs:
atypes = np.array(atoms.get_atomic_numbers()) - 1
ados_predicted = dp.eval(atoms.get_positions(),atoms.get_cell(),atom_types=atypes,atomic=True)
`
The following error is occurring:
ValueError: cannot reshape array of size 3 into shape (288)
My system contains 96 atoms and the only array of size 3 is atoms.get_cell(). I don't understand why it should be reshaped to (288).
How can I solve this error? Furthermore, I am interested only in atomic DOS quantities. Is there any way to obtain only this information from the model inference?
Thanks,
Axel
Beta Was this translation helpful? Give feedback.
All reactions