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

plot_errorvsdistance.py ValueError #14

Open
MES-physics opened this issue Dec 11, 2022 · 6 comments
Open

plot_errorvsdistance.py ValueError #14

MES-physics opened this issue Dec 11, 2022 · 6 comments

Comments

@MES-physics
Copy link

I also tried this code, plot_errorvsdistance.py, and got this error:
Please help. I expect the line with 'forces' will fail next too.

Traceback (most recent call last):
File "/home/m/GPUMDcalc/NEPdata/./errorvsdistance.sh", line 26, in
train_data = load_nep('train.xyz')
File "/home/m/NEP-env/lib/python3.9/site-packages/pynep-0.0.1-py3.9-linux-x86_64.egg/pynep/io.py", line 131, in load_nep
n_atoms.append(int(line.split()[0]))
ValueError: invalid literal for int() with base 10: 'Lattice="20.0'

@bigd4
Copy link
Owner

bigd4 commented Dec 12, 2022

Can you give the first 10 rows of your train.xyz

@MES-physics
Copy link
Author

Here are the first rows.

xxx.txt

@bigd4
Copy link
Owner

bigd4 commented Dec 15, 2022

I am not familiar with the xyz format, maybe @Kick-H can help you.

@MES-physics
Copy link
Author

Please also show me your regular exyz format used for this?
Thanks

@bigd4
Copy link
Owner

bigd4 commented Dec 19, 2022

@brucefan1983
Copy link
Contributor

Try this

train_data = load_nep("train.xyz", ftype="exyz")

to tell PyNEP that you are loading extended XYZ file instead of our old trian.in (deprecated for GPUMD) file.

@bigd4 Perhaps it is time to completely change to use extended XYZ file, or at least make it as the default?

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

3 participants