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

lmp run error: what(): expected scalar type Float but found Double #51

Closed
vantasyoscar opened this issue May 30, 2024 · 2 comments
Closed

Comments

@vantasyoscar
Copy link

vantasyoscar commented May 30, 2024

I've compile lammps successfully, but encountered some issues when processing the input files:

units real atom_style atomic newton off thermo 1 read_data MgS.lmp pair_style nequip pair_coeff * * model_e8.pth Mg S mass 1 24.305 # Mg mass 2 32.06 # S neighbor 1.0 bin neigh_modify delay 5 every 1 velocity all create 300.0 23456789 fix 1 all nvt temp 300.0 300.0 0.5 thermo_style custom step pe ke etotal temp press vol thermo 100 dump 1 all custom 100 MgS.dump id type x y z dump 2 all atom 100 MgS.lammpstrj run 20000 write_data nvt1

faced with:

terminate called after throwing an instance of 'c10::Error' what(): expected scalar type Float but found Double

I’m not sure how to resolve this problem.

@vantasyoscar
Copy link
Author

I solve this by setting default_dtype:float32 . Does it mean I must set float32 precision if I want to deploy it on lammps?

@Linux-cpp-lisp
Copy link
Collaborator

Linux-cpp-lisp commented Jun 5, 2024

Should be resolved by #52: you should be able to use the defaults of nequip 0.6.0 (default_dtype: float64, model_dtype: float32 with the main branch of pair_nequip). We recommend those defaults, and do not recommend setting default_dtype:float32.

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