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

download error: "Unknown database type: xyz" #89

Open
eszter137 opened this issue Mar 16, 2020 · 2 comments
Open

download error: "Unknown database type: xyz" #89

eszter137 opened this issue Mar 16, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@eszter137
Copy link

eszter137 commented Mar 16, 2020

Is it possible that the xyz type is not supported for downloading a database?

$ abcd download -q "E_MP2_3b>0.01" data_MP2_3b_gt_001eV.xyz
Traceback (most recent call last):
  File "/home/es732/miniconda3/bin/abcd", line 8, in <module>
    sys.exit(main())
  File "/home/es732/miniconda3/lib/python3.7/site-packages/abcd/frontends/commandline/parser.py", line 121, in main
    callback_func(**kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/abcd/frontends/commandline/decorators.py", line 15, in wrapper
    func(*args, config=config, **kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/abcd/frontends/commandline/decorators.py", line 48, in wrapper
    func(*args, db=db, query=query, **kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/abcd/frontends/commandline/commands.py", line 41, in download
    write(filename, list(db.get_atoms(query=query)), format=fileformat)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/ase/io/formats.py", line 507, in write
    **kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/ase/parallel.py", line 233, in new_func
    return func(*args, **kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/ase/io/formats.py", line 528, in _write
    io.write(filename, images, append=append, **kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/ase/io/db.py", line 32, in write_db
    con = ase.db.connect(filename, serial=True, append=append, **kwargs)
  File "/home/es732/miniconda3/lib/python3.7/site-packages/ase/db/core.py", line 188, in connect
    raise ValueError('Unknown database type: ' + type)
ValueError: Unknown database type: xyz

When the query results in no structures, it creates an empty file:

$ abcd download -q "E_MP2_3b>0.5" data_MP2_3b_gt_05eV.xyz
$ ls -rtl 
# [...]
-rw-r--r--  1 es732 es732         0 Mar 16 09:56 data_MP2_3b_gt_05eV.xyz
@gabor1
Copy link
Contributor

gabor1 commented Mar 16, 2020 via email

@eszter137
Copy link
Author

Thank you; it worked.
(Maybe it'd be good to add this to the examples.md that contained this line:

abcd download -q formula~W128 data.xyz

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants