Giter VIP home page Giter VIP logo

aflow's Introduction

Build Status Coverage Status

AFLOW Python API - Patched

This repo is a forked version of rosenbrockc/aflow for bug fix

The patched Python API intends to have (almost) identical behavior with the original aflow, while several functionalities are fixed:

  1. Allow dynamic schema loading and keyword class creation. Can work with further versions of aflow without major modifications
  2. More robust keyword casting for both string-type or converted inputs.
  3. Improved filter conditions, powered by boolean operations in sympy.
  4. Better handling of aurl with multiple colons (e.g. GGA+U calculations)

For a list of examples in the patched API, please check the notebook in notebooks/demo_patched_api.ipynb.

To install:

pip install git+https://github.com/ulissigroup/aflow.git

Descriptions for original aflow python API

Python API wrapping the AFLUX API language for AFLOW library. Note: This is not an official repo of the AFLOW consortium and is not maintained by them. API Documentation.

If you use this package, please cite it:

@ARTICLE{2017arXiv171000813R,
   author = {{Rosenbrock}, C.~W.},
    title = "{A Practical Python API for Querying AFLOWLIB}",
  journal = {ArXiv e-prints},
archivePrefix = "arXiv",
   eprint = {1710.00813},
 primaryClass = "cs.DB",
 keywords = {Computer Science - Databases},
     year = 2017,
    month = sep,
   adsurl = {http://adsabs.harvard.edu/abs/2017arXiv171000813R},
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

Quickstart

Install aflow from the python package index:

pip install aflow

Or alternatively install aflow from conda using:

conda install -c conda-forge aflow

Open an ipython notebook or terminal and execute the query from the paper:

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)

aflow supports lazy evaluation. This means that if you didn't ask for a particular property during the initial query, you can just ask for it later and the request will happen transparently in the background.

Python 2 Support

Although the package was originally designed to be compatible with both python 2 and python 3, python 2 has reached the end of its life. As such, we don't guarantee anymore that it will work.

aflow's People

Contributors

rosenbrockc avatar alchem0x2a avatar clegaspi avatar jan-janssen avatar wsmorgan avatar

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.