pyrrhotite
Automatic Schoenflies point group determination, character table generation, and
3-D molecule visualization β from a plain .xyz file or from nothing at all.
Given a molecular geometry in .xyz format, pyrrhotite identifies the molecule's
Schoenflies point group symbol by numerically detecting all present symmetry
elements (rotations, reflections, inversions, and improper rotations), then builds
the full character table for that group β even for groups it has never seen before.
from pyrrhotite import Structure, Symmetry
s = Structure("molecule.xyz")
sym = Symmetry(s)
print(sym.point_group.label.name) # e.g. "C3v"
pyrrhotite molecule.xyz
pyrrhotite -v -ct ammonia.xyz # verbose + character table
New to point groups?
If "Schoenflies symbol" and "character table" don't mean much to you yet,
start with What is a point group? below β it's a
short primer on the chemistry behind what pyrrhotite computes.
What is a point group?
A point group is the complete set of symmetry operations that leave a molecule's geometry unchanged. Every molecule belongs to exactly one point group, and its label (e.g. Cβα΅₯, Dββ, T_d, O_h) encodes its full symmetry in compact notation.
Point group symmetry determines which molecular orbitals can mix, which vibrational modes are IR- or Raman-active, and how a molecule interacts with polarised light. The character table of a point group is the lookup table that encodes all of this.
A quick mental model
Think of water (HβO): it has a mirror plane through the O atom and both H atoms, another mirror plane perpendicular to it, and a 2-fold rotation axis where they meet. That combination of operations is the point group Cβα΅₯ β and the character table for Cβα΅₯ tells you, among other things, that water has three IR-active vibrational modes.
What can pyrrhotite do?
-
Detect symmetry elements
Rotation axes, mirror planes, the inversion centre, and improper rotation axes β detected directly and numerically from atomic coordinates, no pre-classification needed.
-
Generate character tables
For any of the 18 Schoenflies classes, including arbitrary-order C_n / C_nv / C_nh / S_n / D_n / D_nh / D_nd groups, with or without a structure.
-
Export to HTML or LaTeX
Turn character tables into ready-to-use HTML snippets or LaTeX tables for reports, slides, and web pages.
-
Visualize molecules in 3-D
An interactive viewer with colour-coded atoms, bonds, an orientation gizmo, and optional element labels.
-
Explore sample molecules
32 bundled
.xyzfiles covering all major point-group families β water, ammonia, benzene, ferrocene, buckminsterfullerene, and more. -
Generate idealized structures
Build a synthetic
.xyzstructure with a requested point-group symmetry β useful for testing, demos, and teaching.
Try it without .xyz files
Every code example on this site uses the bundled sample molecules, so you
can follow along the moment pyrrhotite is installed β no need to find or
write your own .xyz files first. See
Sample molecules.
Where this project came from
pyrrhotite started as a Python translation of the C++ library
schoenflies by Luuk Kempen, which
detects symmetry operations from an .xyz file and visualizes them on the
molecule. The two projects have since diverged β see About for the
full comparison and history.
Why βpyrrhotiteβ?
Pyrrhotite is an iron sulfide mineral that crystallises into a range of related but distinct structures depending on composition and temperature β a fitting namesake for a library all about classifying structures by their symmetry. Also, I found py(thon) + rhotite (sounds a bit like rotate) to be clever.
Explore the docs
The site is split into three sections (see the top navigation bar): Guide
walks you through using pyrrhotite, from installation to the full Python API;
Reference is for looking things up β the algorithm, every supported point
group, the API signatures, and a glossary of terms; Project covers history,
licensing, and how to get in touch.
-
Installation, optional extras, and a first analysis from the command line or Python.
-
The full Python API: point groups, character tables, symmetry operations, basis functions, the 3-D viewer, and more.
-
How detection works under the hood, which point groups are supported, and known limitations.
-
Project history, comparison with the original C++ tool, license, references, and contact info.
Work in progress
pyrrhotite is under active development β both the source code and these
docs change frequently. If something here looks out of date compared to the
README or the
code itself, the code is the source of truth. Found a discrepancy? See
About β Contact for how to report it.