Giter Site home page Giter Site logo

aflow's People

Contributors

clegaspi avatar jan-janssen avatar rosenbrockc avatar wsmorgan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aflow's Issues

Install aflow via conda-forge

Hi,

I recently build the conda-forge package for aflow, you can now install it using:

conda install -c conda-forge aflow

Best,

Jan

Failed Query

result = search(batch_size=50
               ).select(K.species=="Al,Co,W"
               ).select(K.stoichiometry % "0.75")

is evidently not a valid query because there is not JSON response:

ValueError: No JSON object could be decoded

But, instead of failing gracefully, it chokes.

Downloadable Non-string filetypes

Compressed file formats and image files were throwing decoding errors.
A fix has been implemented by Wiley Morgan and the files are downloading properly and as expected. Wiley has the new code, and will shortly submit a push request.

Error in querying data from aflowlib

After installing the aflow package and trying to use the standard query example given in the documentation, I am encountering following error. Is there a bug in the code?

In [2]: from aflow import *
   ...: 
   ...: result = search(batch_size=20
   ...:         ).select(K.agl_thermal_conductivity_300K
   ...:         ).filter(K.Egap > 6).orderby(K.agl_thermal_conductivity_300K, True)
   ...: 
   ...: # Now, you can just iterate over the results.
   ...: for entry in result:
   ...:     print(entry.Egap)
   ...: 
ERROR: http://aflowlib.duke.edu/search/API/?agl_thermal_conductivity_300K,Egap(6*),paging(-1,20)

DB Fail!null
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[2], line 8
      3 result = search(batch_size=20
      4         ).select(K.agl_thermal_conductivity_300K
      5         ).filter(K.Egap > 6).orderby(K.agl_thermal_conductivity_300K, True)
      7 # Now, you can just iterate over the results.
----> 8 for entry in result:
      9     print(entry.Egap)

File ~/anaconda3/envs/ml/lib/python3.9/site-packages/aflow/control.py:236, in Query.__next__(self)
    233 if self.reverse:
    234     n *= -1
--> 236 if n not in self.responses and self._iter < self.max_N:
    237     self._n = abs(n)
    238     self._request(self.n, self.k)

TypeError: '<' not supported between instances of 'int' and 'NoneType'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.