Demos and tutorials for API access to Citrination.
Documentation for the Python Citrination Client (PyCC) can be found here.
The examples are grouped based on the functionality and tools they aim to teach. Examples include:
- Guides to the Citrination API with Python notebooks.
- Guides to the Citrination web UI with screenshots in Markdown files.
- The matminer package and how it interfaces with Citrination.
- Synthetic data to demonstrate data summary statistics on Citrination.
Most of these tutorials are Jupyter notebooks backed by a Python 3 kernel. You'll need:
- Python 3 with Jupyter. Anaconda/Miniconda is highly recommended.
- Additional packages, which can be installed using
pip
:
pip install -U -r requirements.txt
or conda
:
while read requirement; do conda install --yes $requirement; done < requirements.txt
Most of the IPython notebooks are tested using continuous integration and Python versions 2.7, 3.5, and 3.6. While other Python versions (e.g. 3.4) may still work, we cannot guarantee full support.
You will need a valid Citrination Client API key set in your environment variables:
-
Create an account on Citrination (if you don't already have one).
-
Go to your account page and look for "API Key."
-
Add the key to your environment.
- On MacOS, open your
.bash_profile
and add the line
export CITRINATION_API_KEY="your_key_copied_from_the_website"
Each new Terminal window you open will have the key loaded automatically.
- On Windows, open your Command Prompt / Anaconda Prompt and enter the line
setx CITRINATION_API_KEY "your_key_copied_from_the_website"
Each new Prompt you open will have the key loaded automatically.
- On MacOS, open your
The API key functions as the password for the client, so it's important to keep it private. Therefore, we put it in your system environment instead of in the source code to help avoid unintentional sharing or publication of your API key.
-
The example data used in these tutorials are drawn from: Alloy Database by Mihalkovic, Widom, and coworkers.
-
The band gap data used in these tutorials are from Strehlow and Cook, J Phys Chem Ref Data, 2 (1973).
-
More programmatic tools have also been developed by the Citrine Community team.