Python Macromolecular Library (mmLib)


The Python Macromolecular Library (mmLib) is a software toolkit and library of routines for the analysis and manipulation of macromolecular structural models, implemented in the Python programming language. It is accessed via a layered, object-oriented application programming interface, and provides a range of useful software components for parsing mmCIF, and PDB files, a library of atomic elements and monomers, an object-oriented data structure describing biological macromolecules, and an OpenGL molecular viewer. The mmLib data model is designed to provide easy access to the various levels of detail needed to implement high-level application programs for macromolecular crystallography, NMR, modeling, and visualization. This includes specialized classes for proteins, DNA, amino acids, and nucleic acids. Also included is a extensive monomer library, element library, and specialized classes for performing unit cell calculations combined with a full space group library.


Version 1.1.0 was released in September 2010, but was not distributed as a tarball. Version 1.2.0 was released (with tarball) in June 2011.


Two applications are distributed with mmLib. One is a GUI mmCIF editor which utilizes the GTK toolkit. The other is a OpenGL molecular viewer.

TLS Molecular Viewer (
A OpenGL molecular viewer using the mmLib.GLViewer rendering module and the GTK-2.0 toolkit. Features include(links to screenshots):

mmCIF GUI File Editor
A GUI editor for mmCIF files using the GTK-2.0 toolkit. Screenshot.


J. Painter and E.A. Merritt (2004) "mmLib Python toolkit for manipulating annotated structural models of biological macromolecules". J. Appl. Cryst. 37, 174-178 (Copyright © International Union of Crystallography). reprint (PDF document)

J. Painter and E.A. Merritt (2005) "mmLib A molecular viewer for the analysis of TLS rigid-body motion in macromolecules." Acta Cryst. D61, 465-471 (Copyright © International Union of Crystallography). reprint (PDF document)

F. Zucker, P.C. Champ, and E.A. Merritt (2010) "Validation of crystallographic models containing TLS or other descriptions o f anisotropy". Acta Cryst. D66, 889-900. (Copyright © International Union of Crystallography). reprint (PDF document)



Last Modified 27 Jun 2011 by Ethan Merritt Logo