https://github.com/exabyte-io/api-examples

Example usage of Exabyte.io platform through its RESTful API: programmatically create materials and modeling workflows, execute simulations on the cloud, analyze data and build machine learning models

https://github.com/exabyte-io/api-examples

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.8%) to scientific vocabulary

Keywords

exabyte-io jupyter jupyter-notebook machine-learning materials materials-design materials-genome materials-informatics materials-science python
Last synced: 6 months ago · JSON representation

Repository

Example usage of Exabyte.io platform through its RESTful API: programmatically create materials and modeling workflows, execute simulations on the cloud, analyze data and build machine learning models

Basic Info
Statistics
  • Stars: 6
  • Watchers: 9
  • Forks: 4
  • Open Issues: 14
  • Releases: 114
Topics
exabyte-io jupyter jupyter-notebook machine-learning materials materials-design materials-genome materials-informatics materials-science python
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme

README.ipynb

{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "0",
   "metadata": {},
   "source": [
    "# Mat3ra API Examples\n",
    "\n",
    "## Contents of this Repository\n",
    "\n",
    "Below, we list the contents of this repository, in roughly the order that a user might want to go through it in order to learn how our API works.\n",
    "\n",
    "| Folder            | Notebook                                | Description |\n",
    "| ------------------|-----------------------------------------| ----------- |\n",
    "| [Examples/System](examples/system/)     | [Get Authentication Params](examples/system/get_authentication_params.ipynb)               | Demonstrates how to programatically find your user ID and access token.\n",
    "| [Examples/Workflow](examples/workflow/) | [Get Workflows](examples/workflow/get_workflows.ipynb)                           | Walks through how to [query](https://docs.mat3ra.com/rest-api/query-structure/) the Mat3ra API to programatically search for workflows. In this example, we search for workflows that calculate the total energy of a material.\n",
    "| [Examples/Workflow](examples/workflow/) | [Quantum Espresso Workflow and Job](examples/workflow/qe_scf_calculation.ipynb)  | Create Quantum Espresso workflow starting from QE input file; create and submit job; after the job is finished, download output file, and finally perform postprocessing analysis.\n",
    "| [Examples/Material](examples/material/) | [Get Materials by Formula](examples/material/get_materials_by_formula.ipynb)                | Shows how [queries](https://docs.mat3ra.com/rest-api/query-structure/) can be made to search for materials stored on your account by their formula. In this example, we search for a system containing Si.\n",
    "| [Examples/Material](examples/material/) | [Create Material](examples/material/create_material.ipynb)                         | Gives an overview of how materials can be generated in [JSON format](https://docs.mat3ra.com/materials/data/) and uploaded to your user account. In this example, we create an FCC Si crystal and upload it.\n",
    "| [Examples/Material](examples/material/) | [Import Materials from Poscar](examples/material/upload_materials_from_file_poscar.ipynb)            | Provides an example of how materials can be imported directly from Poscar files (a common chemical file format best-known [for its use in VASP](https://www.vasp.at/wiki/index.php/Input)). In this example, we import the unit cell of SiGe.\n",
    "| [Examples/Job](examples/job/)            | [Create and Submit Job](examples/job/create_and_submit_job.ipynb)                   | Shows how to use the Mat3ra API to [create jobs](https://docs.mat3ra.com/jobs/data/) and run them on our cluster. In this example, we run a DFT calculation to get the total energy of an FCC Si unit cell using Quantum Espresso.\n",
    "| [Examples/Job](examples/job/)            | [Get File from Job](examples/job/get-file-from-job.ipynb) | Uses the Mat3ra API to query for a list of files produced by a job, describes the metadata assigned to each file, and ends by demonstrating how to download any remote file generated by a job to the local disk.\n",
    "| [Examples/Job](examples/job/)            | [Run Simulations and Extract Properties](examples/job/run-simulations-and-extract-properties.ipynb)  | Demonstrates copying a [bank workflow](https://docs.mat3ra.com/workflows/bank/) to an account and using it to calculate the [properties](https://docs.mat3ra.com/properties/overview/) of multiple materials. In this example, we determine the [band gap](https://docs.mat3ra.com/properties-directory/non-scalar/band-gaps/) of Si and Ge.\n",
    "| [Examples/Job](examples/job/)            | [ML - Train Model Predict Properties](examples/job/ml-train-model-predict-properties.ipynb)     | Demonstrates the  generation of a training dataset and subsequent training of a [machine learning](https://docs.mat3ra.com/software-directory/overview/#machine-learning) model. In this example, we calculate the band gaps of Si and SiGe, and using various materials properties as descriptors, train a model to predict their band gaps. Finally, we use this trained model to predict the band gap of Ge.\n",
    "\n",
    "\n",
    "\n",
    "## Setup\n",
    "\n",
    "NOTE: tested with Python version 3.8 and 3.10, please assert that the virtual environment is created with it. Use [`pyenv`](https://github.com/pyenv/pyenv#installation) to manage Python versions.\n",
    "\n",
    "Follow the steps below in order to setup and view the Jupyter notebooks:\n",
    "\n",
    "0. [Install git-lfs](https://help.github.com/articles/installing-git-large-file-storage/) [[3](#links)] in order to get access to the source code and notebook files.\n",
    "\n",
    "1. Clone repository:\n",
    "\n",
    "    ```bash\n",
    "    git clone https://github.com/Exabyte-io/api-examples.git\n",
    "    ```\n",
    "\n",
    "    Or, if you have set up SSH keys\n",
    "\n",
    "    ```bash\n",
    "    git clone git@github.com:Exabyte-io/api-examples.git\n",
    "    ```\n",
    "\n",
    "    In case for some reason git-lfs was not installed at the time of cloning, the files can be pulled after installing git-lfs, through `git lfs pull`.\n",
    "\n",
    "    Related to this, please be aware that as the `.ipynb` and `.poscar` files are stored on git-lfs, they are not part of the zip archive downloaded through GitHub's web interface.\n",
    "\n",
    "3. Install [virtualenv](https://virtualenv.pypa.io/en/stable/) using [pip](https://pip.pypa.io/en/stable/) if not already present:\n",
    "\n",
    "    ```bash\n",
    "    pip install virtualenv\n",
    "    ```\n",
    "\n",
    "4. Create virtual environment and install required packages:\n",
    "\n",
    "    ```bash\n",
    "    cd api-examples\n",
    "    virtualenv .env\n",
    "    source .env/bin/activate\n",
    "    pip install -e .\"[localhost]\"\n",
    "    ```\n",
    "\n",
    "5. Run Jupyter and open a notebook in a browser. In order for the post-save hook feature to work properly, one must launch their Jupyter Notebook environment in the folder that contains the file `config.py`, which is the `examples` folder shown below:\n",
    "\n",
    "    ```bash\n",
    "    cd examples\n",
    "    jupyter lab --config=config.py\n",
    "    ```\n",
    "\n",
    "## Usage\n",
    "\n",
    "In order to run or edit the examples:\n",
    "\n",
    "1. Assert an existing Mat3ra.com account. Examples require an account to run. New users can register [here](https://platform.mat3ra.com/register) to obtain one.\n",
    "\n",
    "2. Open [settings](utils/settings.json) and adjust it to provide the API authentication parameters. See the [corresponding example](examples/system/get_authentication_params.ipynb) to learn how to obtain the authentication parameters. It is also possible to generate an API token by logging in to [Mat3ra platform](https://platform.mat3ra.com/), navigating to the Account Preferences, and clicking the 'Generate new token' button under API Tokens. More details can be found [here](https://docs.mat3ra.com/accounts/ui/preferences/api/).\n",
    "\n",
    "3. Open the desired example notebook, adjust it as necessary and run. One can speed up the notebooks execution after running the [Get Authentication Params](examples/system/get_authentication_params.ipynb) one by reusing the kernel from the first notebook.\n",
    "\n",
    "  \n",
    "\n",
    "NOTE: The Materials Project API key should be obtained from [https://legacy.materialsproject.org/open](https://legacy.materialsproject.org/open).\n",
    "\n",
    "\n",
    "## Contribute\n",
    "\n",
    "This is an open-source repository and we welcome contributions for other use cases. The original set of examples is only meant to demonstrate the capabilities and can be extended.\n",
    "\n",
    "We suggest forking this repository and introducing the adjustments there. The changes in the fork can further be considered for merging into this repository as it is commonly used on GitHub. This process is explained in more details elsewhere online [[4](#links)].\n",
    "\n",
    "If you would like to add new examples or adjust existing ones, please consider the following:\n",
    "\n",
    "1. Put examples into the corresponding directories by domain.\n",
    "\n",
    "2. Walk the readers through the examples by providing step-by-step explanation similar to [this](examples/material/get_materials_by_formula.ipynb) example.\n",
    "\n",
    "3. We use post-save hooks to automatically convert notebooks to python scripts. See [config](examples/config.py) file for more information. In order to facilitate code review, we exclude notebook sources in the `other/` directory from version control and store them in Git LFS [[3](#links)]. Please follow this convention.\n",
    "\n",
    "4. Apply code formatting by installing development requirements as follows:\n",
    "\n",
    "    ```bash\n",
    "    pip install -e .\"[dev]\"\n",
    "    pre-commit install\n",
    "    pre-commit run --all-files\n",
    "    ```\n",
    "\n",
    "    Check more details about `pre-commit` [here](https://pre-commit.com/).\n",
    "\n",
    "## Links\n",
    "\n",
    "1. Mat3ra.com RESTful API, description in the online documentation: [link](https://docs.mat3ra.com/rest-api/overview/)\n",
    "2. Jupyter.org, official website: [link](https://jupyter.org/)\n",
    "3. Git Large File Storage, official website: [link](https://git-lfs.github.com/)\n",
    "4. GitHub Standard Fork & Pull Request Workflow, online explanation: [link](https://gist.github.com/Chaser324/ce0505fbed06b947d962)\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}

Owner

  • Name: Mat3ra.com
  • Login: Exabyte-io
  • Kind: organization
  • Email: info@mat3ra.com
  • Location: San Francisco, CA, USA

Materials R&D Cloud

GitHub Events

Total
  • Release event: 78
  • Watch event: 1
  • Delete event: 83
  • Issue comment event: 78
  • Push event: 387
  • Pull request event: 165
  • Pull request review comment event: 144
  • Pull request review event: 195
  • Fork event: 1
  • Create event: 158
Last Year
  • Release event: 78
  • Watch event: 1
  • Delete event: 83
  • Issue comment event: 78
  • Push event: 387
  • Pull request event: 165
  • Pull request review comment event: 144
  • Pull request review event: 195
  • Fork event: 1
  • Create event: 158

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 257
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 28 days
  • Total issue authors: 2
  • Total pull request authors: 10
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.91
  • Merged pull requests: 195
  • Bot issues: 0
  • Bot pull requests: 18
Past Year
  • Issues: 0
  • Pull requests: 120
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.95
  • Merged pull requests: 101
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • knc6 (1)
  • bsmith24 (1)
  • VsevolodX (1)
  • akulpillai (1)
Pull Request Authors
  • VsevolodX (252)
  • AcylSilane (31)
  • timurbazhirov (19)
  • dependabot[bot] (18)
  • bsmith24 (8)
  • mrakitin (7)
  • mohammadidinani (5)
  • knc6 (3)
  • pranabdas (2)
  • CompRhys (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (18) enhancement (4) prototyping (3) priority (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 2,481 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 108
  • Total maintainers: 1
pypi.org: mat3ra-api-examples

Mat3ra API Examples

  • Versions: 108
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 2,481 Last month
Rankings
Dependent packages count: 9.6%
Average: 36.6%
Dependent repos count: 63.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements-colab.txt pypi
  • appnope ==0.1.2
  • ase ==3.21.1
  • async-generator ==1.10
  • backcall ==0.2.0
  • cycler ==0.10.0
  • exabyte-api-client ==2021.1.18
  • jedi ==0.18.0
  • kiwisolver ==1.3.1
  • monty ==2021.3.3
  • mpmath ==1.2.1
  • nest-asyncio ==1.5.1
  • networkx ==2.5.1
  • palettable ==3.3.0
  • pymatgen ==2021.2.16
  • retrying ==1.3.3
  • ruamel.yaml ==0.17.4
  • ruamel.yaml.clib ==0.2.2
  • spglib ==1.16.1
  • uncertainties ==3.1.5
requirements.txt pypi
  • Babel ==2.9.1
  • Jinja2 ==2.11.3
  • MarkupSafe ==1.1.1
  • Pillow ==8.3.2
  • Pygments ==2.8.0
  • Send2Trash ==1.5.0
  • anyio ==2.1.0
  • appnope ==0.1.2
  • argon2-cffi ==20.1.0
  • ase ==3.21.1
  • async-generator ==1.10
  • attrs ==20.3.0
  • backcall ==0.2.0
  • bleach ==3.3.0
  • certifi ==2020.12.5
  • cffi ==1.14.5
  • chardet ==3.0.4
  • cycler ==0.10.0
  • decorator ==4.4.2
  • defusedxml ==0.6.0
  • entrypoints ==0.3
  • exabyte-api-client ==2021.1.18
  • future ==0.18.2
  • idna ==2.7
  • ipykernel ==5.4.3
  • ipython ==7.20.0
  • ipython-genutils ==0.2.0
  • jedi ==0.18.0
  • json5 ==0.9.5
  • jsonschema ==3.2.0
  • jupyter-client ==6.1.11
  • jupyter-core ==4.7.1
  • jupyter-server ==1.3.0
  • jupyterlab ==3.0.17
  • jupyterlab-pygments ==0.1.2
  • jupyterlab-server ==2.2.0
  • kiwisolver ==1.3.1
  • matplotlib ==3.4.1
  • mistune ==0.8.4
  • monty ==2021.3.3
  • mpmath ==1.2.1
  • nbclassic ==0.2.6
  • nbclient ==0.5.2
  • nbconvert ==6.0.7
  • nbformat ==5.1.2
  • nest-asyncio ==1.5.1
  • networkx ==2.5.1
  • notebook ==6.4.1
  • numpy ==1.20.1
  • packaging ==20.9
  • palettable ==3.3.0
  • pandas ==1.1.4
  • pandocfilters ==1.4.3
  • parso ==0.8.1
  • pexpect ==4.8.0
  • pickleshare ==0.7.5
  • plotly ==4.14.3
  • prometheus-client ==0.9.0
  • prompt-toolkit ==3.0.16
  • ptyprocess ==0.7.0
  • pycparser ==2.20
  • pymatgen ==2021.2.16
  • pyparsing ==2.4.7
  • pyrsistent ==0.17.3
  • python-dateutil ==2.8.1
  • pytz ==2021.1
  • pyzmq ==22.0.3
  • requests ==2.20.1
  • retrying ==1.3.3
  • ruamel.yaml ==0.17.4
  • ruamel.yaml.clib ==0.2.2
  • scipy ==1.6.2
  • six ==1.15.0
  • sniffio ==1.2.0
  • spglib ==1.16.1
  • sympy ==1.8
  • tabulate ==0.8.2
  • terminado ==0.9.2
  • testpath ==0.4.4
  • tornado ==6.1
  • traitlets ==5.0.5
  • uncertainties ==3.1.5
  • urllib3 ==1.26.5
  • wcwidth ==0.2.5
  • webencodings ==0.5.1
.github/workflows/check_links.yml actions
  • actions/checkout v1 composite
  • peter-evans/link-checker v1 composite
.github/workflows/zip_release.yml actions
  • actions/checkout v2 composite
  • actions/create-release v1 composite
  • actions/upload-release-asset v1 composite