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 reading 'extended' xyz format files #415

Open
venkatkapil24 opened this issue May 12, 2024 · 6 comments
Open

Error reading 'extended' xyz format files #415

venkatkapil24 opened this issue May 12, 2024 · 6 comments

Comments

@venkatkapil24
Copy link

Describe the bug
MACE returns error for an ".extxyz" file.

Traceback (most recent call last):
File "/home/ucapvka/source/mace/scripts/run_train.py", line 6, in
main()
File "/lustre/home/ucapvka/mace-venv/lib/python3.9/site-packages/mace/cli/run_train.py", line 157, in main
assert args.train_file.endswith(".xyz"), "Must specify atomic_numbers when using .h5 train_file input"
AssertionError: Must specify atomic_numbers when using .h5 train_file input

Typically XYZ files do not include anything other than positions/velovities. On the other hand, the extended XYZ in ASE/libatoms '.extxyz' is the standard format. I think MACE should include it and not assume .h5. Again, happy to open a quick PR.

@ilyes319
Copy link
Contributor

Hey @venkatkapil24, MACE can read extended xyz, but you need to rename the extension just .xyz.

@bernstei
Copy link
Collaborator

bernstei commented May 13, 2024 via email

@gabor1
Copy link
Collaborator

gabor1 commented May 13, 2024

I agree it should accept both .xyz and .extxyz

@bernstei
Copy link
Collaborator

I'm not even convinced it should check anything except, I guess, special-casing .h5. Anything else it could just pass to ase.io.read and let it deal with it automatically.

@venkatkapil24
Copy link
Author

I'm not even convinced it should check anything except, I guess, special-casing .h5. Anything else it could just pass to ase.io.read and let it deal with it automatically.

I agree. This will also help read directly from json.

@bernstei
Copy link
Collaborator

I agree. This will also help read directly from json.

iff it's json that ase.io.read can parse

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

4 participants