Skip to main content Switch to mobile version xkcd-matchem 0.1.0 An xkcd-Style Visualization Suite for Chemistry and Materials Science Communication
pip install xkcd-matchem Copy PIP instructions
A clean, approachable xkcd-style Python suite for visualizing molecules, crystals, electronic structure, spectra, reactions, and trajectories — with 29 zero-dependency file readers and an offline Interactive 3D Studio.
Documentation · Live 3D Studio · Visual Gallery · Tutorials (01–15) · Capabilities & Scope · API Reference
Scope: Built for posters, talks, lectures, and science communication (scicomm) — see the Capability & Validation Matrix for exact numerical guarantees vs. approximate models. Because intentional xkcd stroke wiggle can soften subtle curve shoulders, use standard straight-line Matplotlib for archival quantitative peak fitting.
Requires Python 3.10+, NumPy, SciPy, and Matplotlib (18 bundled sample datasets and comic-style fonts included; pip install xkcd-matchem will be enabled on the first PyPI release):
pip install git+https://github.com/vzordillo/xkcd-matchem.git # Optional ecosystem extras (ase, pymatgen, rdkit, qm, md, animation): pip install "xkcd-matchem[ase,pymatgen,rdkit,animation] @ git+https://github.com/vzordillo/xkcd-matchem.git" 1. Plot a Crystal & Annotate with a Stick Scientist
All filenames below resolve automatically to bundled samples — swap in any path to your own simulation files:
import xkcd_matchem as xm with xm.xkcd_style(): ax = xm.plot_crystal("si_diamond.cif", miller_planes=[(1, 1, 1)], crystal_axes="corner", title="Si (111)") xm.draw_stick_scientist(ax, xy=(0.12, 0.72), scale=0.20, character="ponytail", facing="right", pose="point", speech="Check (111)!") xm.save_figure(ax.figure, "si_111.png") 2. Spin a 3D Orbital in the Offline Interactive 3D Studio
import xkcd_matchem as xm xm.view_structure("water_homo.cube", iso_shade="crosshatch", output="water_studio.html", backend="browser") Command-Line Quickstart
xkcd-matchem render tio2_slab.poscar -o tio2.png xkcd-matchem view mos2_2h.poscar -o mos2_studio.html Custom Themes, Commercial-Safe Default Font & Opt-In xkcd Script Out of the box, xkcd-matchem defaults to the bundled Patrick Hand font (SIL OFL 1.1, commercial-safe and pairing cleanly with Apache-2.0 source code) alongside Comic Neue (SIL OFL 1.1). For non-commercial/academic talks, xkcd Script (CC BY-NC 3.0) is bundled as an explicit opt-in via xm.use_xkcd_script() (and blocked with a StyleError when XM_COMMERCIAL_SAFE=1 is set). The front-facing showcase figures and GIFs in this README and the Visual Gallery are rendered with xm.use_xkcd_script() to demonstrate the classic xkcd aesthetic:
import xkcd_matchem as xm xm.set_default_font("Comic Neue") # or "Patrick Hand" (default), or a local .ttf path xm.register_preset("my_talk", base="dark_chalk", sketch_scale=1.1) ax = xm.plot_crystal("mos2_2h.poscar", preset="my_talk", palette={"Mo": "#2A9D8F", "S": "#E9C46A"}) xm.save_figure(ax.figure, "mos2_dark.png") xm.set_default_font(None) # reset to commercial-safe bundled Patrick Hand default # Non-commercial/academic opt-in: xm.use_xkcd_script() In Motion & Flagship Highlights
Explore all 21 figures & 5 animations in the Visual Gallery.
Supported Formats & Contributing
All 29 built-in readers work with zero extra dependencies beyond NumPy, SciPy, and Matplotlib:
Optional lazy adapters bridge ASE, pymatgen, RDKit, cclib, MDAnalysis, and MDTraj — see Supported Formats & Contracts. Want to contribute code, tutorials, or report an issue? Read CONTRIBUTING.md and SECURITY.md.
Citation, Acknowledgements & Licenses
If xkcd-matchem helps with your poster, talk, or tutorial, please cite it via CITATION.cff:
@software{ordillo2026xkcdmatchem, author = {Ordillo, Viejay}, institution = {Nara Institute of Science and Technology}, title = {{xkcd-matchem}: An xkcd-Style Visualization Suite for Chemistry and Materials Science Communication}, year = {2026}, version = {0.1.0}, url = {https://github.com/vzordillo/xkcd-matchem} } Acknowledgements: Developed semi-autonomously with Google DeepMind's Gemini frontier models inside Google Antigravity, supported by Google's Antigravity for Science academic researcher access program. Many thanks to the Google Antigravity, Google Research, and Google DeepMind teams for supporting open scientific communication tooling.
Source Code: Apache License, Version 2.0 (NOTICE) · Documentation & Tutorials: CC BY 4.0
Bundled Commercial-Safe Fonts (Code Default): Patrick Hand (default across all presets and the 3D Studio) and Comic Neue under SIL OFL 1.1 (THIRD_PARTY_LICENSES.md)
Optional Non-Commercial Font (Opt-In & Showcase Gallery): xkcd Script under CC BY-NC 3.0 via xm.use_xkcd_script() (xkcd-script-LICENSE.txt; used to render the showcase figures in book/_static/gallery/ and blocked when XM_COMMERCIAL_SAFE=1)
Scientific Scope & Attributions: CODATA 2022, IUPAC 2021 / CIAAW 2024, BODR, Alvarez/Mantina vdW radii, Cromer-Mann (LA-3816), Okabe-Ito, and Jmol colors — see Capabilities & Validation and Citation & Attributions.
Both files in this release have provenance metadata.
Apache-2.0 View SPDX License List
ase pymatgen qm rdkit md animation docs dev all
chemistry materials-science crystal-structure molecular-visualization xkcd matplotlib spectroscopy
Development Status 4 - Beta
Intended Audience Science/Research
Operating System OS Independent
Programming Language Python :: 3
Topic Scientific/Engineering :: Chemistry
Scientific/Engineering :: Visualization
Release files for xkcd-matchem 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 1.6 MB
Release files / xkcd_matchem-0.1.0.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Release files / xkcd_matchem-0.1.0-py3-none-any.whl
Security for xkcd-matchem 0.1.0
Both files in this release have been uploaded with provenance metadata.
With provenance xkcd_matchem-0.1.0.tar.gz Nov 22, 2026
With provenance xkcd_matchem-0.1.0-py3-none-any.whl Nov 22, 2026
Attestation for xkcd_matchem-0.1.0.tar.gz
Attestation for xkcd_matchem-0.1.0-py3-none-any.whl
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 22, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




