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

-f is not really optional for download -- no file type inference despite ase already doing this #96

Closed
stenczelt opened this issue Apr 19, 2020 · 3 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@stenczelt
Copy link
Member

if you are trying to download something without the file type specified, the command line interface breaks, even if the filename would make it obvious for ASE:

this works:

abcd download fn.xyz -f xyz  -q="filename='proc_gap5_minima_135.xyz'"

but this does not:

abcd download fn.xyz  -q="filename='proc_gap5_minima_135.xyz'"
Traceback (most recent call last):
  File "/home/tks32/programs/miniconda3/envs/quip_env/bin/abcd", line 8, in <module>
    sys.exit(main())
  File "/home/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/abcd/frontends/commandline/parser.py", line 121, in main
    callback_func(**kwargs)
  File "/home/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/abcd/frontends/commandline/decorators.py", line 15, in wrapper
    func(*args, config=config, **kwargs)
  File "/home/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/abcd/frontends/commandline/decorators.py", line 48, in wrapper
    func(*args, db=db, query=query, **kwargs)
  File "/home/tks32/programs/miniconda3/envs/quip_env/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/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/ase/io/formats.py", line 507, in write
    **kwargs)
  File "/home/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/ase/parallel.py", line 233, in new_func
    return func(*args, **kwargs)
  File "/home/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/ase/io/formats.py", line 528, in _write
    io.write(filename, images, append=append, **kwargs)
  File "/home/tks32/programs/miniconda3/envs/quip_env/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/tks32/programs/miniconda3/envs/quip_env/lib/python3.7/site-packages/ase/db/core.py", line 188, in connect
    raise ValueError('Unknown database type: ' + type)
ValueError: Unknown database type: xyz

Where from the trace I would infer that something is passed to ase incorrectly in the absence of the -f argument.

@stenczelt stenczelt added the bug Something isn't working label Apr 19, 2020
@gabor1
Copy link
Contributor

gabor1 commented Apr 19, 2020

I think is the same as #89

@stenczelt stenczelt added duplicate This issue or pull request already exists annoy enhancement New feature or request and removed bug Something isn't working labels Jan 13, 2021
@gabor1 gabor1 removed the annoy label Jan 13, 2021
@stenczelt
Copy link
Member Author

simply "extxyz" could be the default format to use

@stenczelt
Copy link
Member Author

especially because in ASE, format="xyz" refers to plain xyz, but file.xyz with format not given will result in extended 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 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants