rosenbrockc / aflow Goto Github PK
View Code? Open in Web Editor NEWPython API wrapping the AFLUX API language for AFLOW library.
License: MIT License
Python API wrapping the AFLUX API language for AFLOW library.
License: MIT License
Hi,
I recently build the conda-forge package for aflow, you can now install it using:
conda install -c conda-forge aflow
Best,
Jan
Add to https://github.com/rosenbrockc/aflow/blob/master/aflow/entries.py#L11
if value is None:
return
so that keywords with None
values don't cause exceptions.
Dear @rosenbrockc and @wsmorgan,
I want to search for structures that only contains Cu. I tried to use the code below. But, it returns me compound, i.e. Cu4Mg1Y1.
results = search(batch_size = 100
).filter(K.species == 'Cu')
I really appreciate for your help!
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.
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.
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.