Welcome
This Github Pages is started by the Materials Virtual Lab as a useful collection of Jupyter notebooks that demonstrate the utilization of open-source codes for the study of materials science.
We frequently get requests (from students, postdocs, collaborators, or just general users) for example codes that demonstrate various capabilities in the open-source software we maintain and contribute to, such as the Materials Project software stack comprising Python Materials Genomics (pymatgen), Custodian, and Fireworks. This repo is a start at building a more sustainable path towards sharing of code examples.
It is not limited to the codes we develop - any use of open source software for materials analysis is welcome. Also, anyone is welcome to contribute.
BinderHub
One of the best ways to get a feel of the functionality is to run it yourself using BinderHub. Click on the icon below to start a BinderHub instance where you can explore the notebooks, make any changes to the code to see the changes in output.

Contributing
- Fork this repo and clone.
git clone git@github.com:<your_github_username>/matgenb.git
cd matgenb
- Write a new notebook in the
notebooks
folder.
cd notebooks
jupyter notebook
- Notebooks should be well-documented and simple. The idea here is to be pedagogical. A newcomer to the software (with the right materials science background) should be able to follow the logic without too much difficulty. Feel free to add authorship and contact information, as well as works to cite and acknowledge your contributions. In view that scientific codes tend to be continuously being updated, please put in a list of the key pinned dependencies so that other users can install the exact version of software to run the notebook if needed. Ideally, please update notebooks as needed to use more modern versions of the codes, and you may update the date of the notebook as needed. An example preamble can be:
This notebook demonstrates the core functionality in pymatgen for manipulating structures.
Written with:
- Notebooks should be placed in the
notebooks
folder, and the name should start with the date in YYYY-MM-DD-<intuitive title>
format. See existing examples.
- In the root folder of the repo, convert the jupyter notebooks to html.
jupyter nbconvert --to html notebooks/*.ipynb --output-dir docs/_posts
- Commit and push.
git add .
git commit -a -m "Describe your contribution"
git push
- Submit a pull request from Github.
Notebooks
-
Jul 15, 2020
How to plot a fermi surface
-
Mar 11, 2019
Interface reactions
-
Jan 11, 2019
How to plot and evaluate output files from lobster
-
Jan 4, 2019
How to use boltztra2 interface
-
Nov 6, 2018
Dopant suggestions using pymatgen
-
Sep 25, 2018
Structure prediction using pymatgen and the materials api
-
Jul 24, 2018
Adsorption on solid surfaces
-
Mar 14, 2018
Plotting cohp from lobster
-
Mar 9, 2018
Computing the reaction diagram between two compounds
-
Jan 1, 2018
Chemenv how to automatically identify coordination environments in a structure
-
Dec 15, 2017
Plotting a pourbaix diagram
-
Sep 3, 2017
Analyze and plot band structures
-
May 11, 2017
Running jupyter notebook on clusters
-
Apr 14, 2017
Inputs and analysis of vasp runs
-
Apr 3, 2017
Slab generation and wulff shape
-
Mar 2, 2017
Getting data from materials project
-
Sep 25, 2016
Plotting phonon bandstructure and dos
-
Sep 8, 2016
Data Driven first principles methods for the study and design of alkali superionic conductors part 3 diffusivity and ionic conductivity
-
Sep 8, 2016
Data Driven first principles methods for the study and design of alkali superionic conductors part 2 phase and electrochemical stability
-
Sep 8, 2016
Data Driven first principles methods for the study and design of alkali superionic conductors part 1 structure generation
-
Jan 1, 2013
Units
-
Jan 1, 2013
Plotting the electronic structure of fe
-
Jan 1, 2013
Plotting and analyzing a phase diagram using the materials api
-
Jan 1, 2013
Ordering disordered structures
-
Jan 1, 2013
Molecule
-
Jan 1, 2013
Getting crystal structures from online sources
-
Jan 1, 2013
Explanation of corrections
-
Jan 1, 2013
Calculating xrd patterns
-
Jan 1, 2013
Calculating reaction energies with the materials api
-
Jan 1, 2013
Basic functionality
-
Jan 1, 2013
Bandstructure of nio