Overview
pymolsym is a Python package for molecular symmetry. It represents point groups and their irreducible representations as objects that support direct products and direct sums, the reduction of representations, and the correlation of irreducible representations when the symmetry is lowered.
Character tables are not stored. Each point group is defined by its generators; its classes, characters and Mulliken symbols are derived from them in exact arithmetic.
Features
- Point groups: C1, Cs, Ci; Cn, Cnv, Cnh, Dn, Dnh, Dnd and Sn for any n; T, Td, Th, O, Oh, I and Ih; the linear groups C∞v and D∞h.
- Character tables with classes, characters and Mulliken symbols, including irrational and complex characters.
- Algebra of irreps: direct products, direct sums and powers, written as
e1g * e2u. - Reduction of a representation into irreps.
- Lowering of symmetry: correlation tables for all orientations of a subgroup in a group.
- Symmetry operations as objects that can be applied to coordinates, composed and printed.
Example
>>> from pymolsym import PointGroup
>>> d6h = PointGroup('D6h')
>>> # direct product of two irreps
>>> print(*(d6h.e1g * d6h.e2u))
b1u b2u e1u
>>> # the six p_z orbitals of benzene
>>> p_z = (6, 0, 0, 0, -2, 0, 0, 0, 0, -6, 2, 0)
>>> print(*d6h.reduce(p_z))
b2g e1g a2u e2u
>>> # an octahedral complex distorted to D4h
>>> oh = PointGroup('Oh')
>>> print(*oh.t2g.lower(PointGroup('D4h')))
b2g eg
Installation
pymolsym requires Python 3.9 or newer and has no dependencies. It is installed from PyPI:
pip install pymolsym
The README contains examples, the conventions for axes, classes and symbols, and a reference of all classes. pymolsym is distributed under the MIT license. Questions and bug reports can be filed as issues.
Interactive demonstrations
The other tabs of this page run pymolsym itself. Python is loaded into the browser with Pyodide, so all results are computed locally; nothing is installed and no data is sent to a server.
Character tables
Each table is derived from the generators of the group on request. Select a point group, or enter
the name of any other one, such as D7h, C8v or S12.
Lowering the symmetry
The irreps of a subgroup that each irrep of a group correlates with. A subgroup can often be oriented in a group in several ways; each orientation that gives a different correlation table is listed.
Examples
The results are computed when the page is loaded, in the Python session of the console. The objects
defined in the examples, such as d6h, are therefore available there.
Python console
A Python session in which from pymolsym import * has been run. Statements such as the
following can be entered line by line, or pasted:
↑ and ↓ recall earlier lines. A block such as a for loop is ended with an
empty line. Pasted lines are run at once; a last line without a line break stays in the input line.