Open, runnable Jupyter notebooks for teaching and learning materials science, chemistry, and physics.
Materials science sits at the meeting point of thermodynamics, quantum mechanics, and statistical mechanics — and most of it is far easier to understand when you can change a parameter and watch what happens. Every notebook in this organization is written to be run, not just read: the equations are there, but so is the code that turns them into a plot you can play with.
The notebooks are free to use, adapt, and redistribute, in your own courses or on your own.
Foundations
| Repository | What it covers |
|---|---|
| Materials-Science | Core materials science — crystal structure and symmetry, bonding, defects, microstructure, and the structure–property relationships that connect them. |
| Chemistry | Python tools for core chemistry concepts and skills: bonding, structure, reaction energetics, and the numerical methods behind them. |
| Physics | Fundamental physics concepts, including how modern AI methods connect to them. |
Going deeper
| Repository | What it covers |
|---|---|
| Thermodynamics | Classical and statistical thermodynamics of materials — free energies, phase equilibria, phase diagrams, and the statistical-mechanical origin of the thermodynamic potentials. |
| Machine-Learning | Machine learning applied to materials problems — representations, regression and classification, model validation, and the pitfalls specific to small scientific datasets. |
Browse all repositories → github.com/orgs/MatSciEd/repositories
- Students working through a course, or teaching themselves a topic from scratch.
- Instructors who want ready-made, editable material for a lecture, lab, or homework set.
- Researchers who need a quick, honest refresher on a concept adjacent to their own work.
No prior Python experience is assumed. Notebooks introduce the code they need as they go.
Run in the browser (nothing to install). Open any repository in Google Colab by prefixing its URL:
https://colab.research.google.com/github/MatSciEd/Thermodynamics
Run locally. Clone the repository and install the dependencies listed in it:
git clone https://github.com/MatSciEd/Thermodynamics.git
cd Thermodynamics
pip install -r requirements.txt
jupyter labMost notebooks rely only on the standard scientific Python stack: NumPy, SciPy, Matplotlib, and pandas.
You are welcome to fork a repository, cut it down to the topics you need, and assign it directly to your students. That is what this material is for. Two suggestions:
- Fork rather than clone, so improvements you make can flow back if you want them to.
- Open an issue telling us what you used and how it went. Knowing which notebooks get real classroom use tells us where to put effort next.
Contributions are welcome and actively wanted — from a one-line typo fix to an entire new notebook on a topic we don't cover yet.
Ways to help, smallest first:
- Report a problem. A notebook that no longer runs, a confusing explanation, a wrong sign in an equation — open an issue. This is genuinely useful and takes two minutes.
- Improve an existing notebook. Better explanatory text, a clearer figure, an added exercise.
- Contribute a new notebook. Open an issue describing what you have in mind before you write it, so we can point you at the right repository and avoid duplicated effort.
What makes a good notebook here:
- One idea per notebook. Depth on a single concept beats a survey of five.
- It runs top to bottom. Restart the kernel, run all cells, confirm no errors before you open the pull request.
- The science is explained in prose, not just in code. A reader should understand why the calculation is set up the way it is.
- Learning objectives at the top. Two or three lines stating what a reader will be able to do afterward.
- Plain dependencies. Stick to the standard scientific Python stack where possible, and list anything extra.
- Outputs cleared before committing. This keeps diffs readable.
How to submit:
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR-USERNAME/REPOSITORY.git
git checkout -b my-contribution
# make your changes, then commit and push
git push origin my-contribution
# open a pull request on GitHubWe review pull requests as time allows and will give you concrete feedback rather than a silent rejection.
Notebooks are released under permissive open-source licenses (MIT for most repositories, Apache-2.0 for Machine-Learning). Check the LICENSE file in each repository for specifics. You may use, modify, and redistribute the material, including for teaching — attribution is appreciated but the license governs.
Maintained by @rhennig. For questions about the material, open an issue in the relevant repository — that way the answer is visible to everyone who has the same question.