Related Experiment Video
Updated: May 18, 2026

Modeling an Enzyme Active Site using Molecular Visualization Freeware
Published on: December 25, 2021
mol2chemfig, a tool for rendering chemical structures from molfile or SMILES format to LATE X code
Eric K Brefo-Mensah1, Michael Palmer
1Department of Chemistry, University of Waterloo, 200 University Avenue West, Waterloo, Ontario, N2L 3G1, Canada. mpalmer@uwaterloo.ca.
This study introduces mol2chemfig, a Python program that converts chemical structures from molfile or SMILES formats into LaTeX code using the chemfig package. This tool simplifies the inclusion of chemical diagrams in scientific documents.
Area of Science:
- Computational Chemistry
- Scientific Publishing
Background:
- Including chemical structures in LaTeX documents typically involves manual coding or external graphics.
- A gap exists in software for converting standard chemical file formats (molfile, SMILES) to LaTeX code.
Purpose of the Study:
- To develop a software tool that automates the conversion of chemical structures from molfile or SMILES formats into LaTeX source code.
- To facilitate the seamless integration of chemical diagrams into LaTeX documents.
Main Methods:
- Developed a Python program named mol2chemfig.
- The program generates output compatible with the chemfig LaTeX package.
- The tool is accessible via a web interface and for local installation.
Main Results:
- mol2chemfig successfully renders chemical structures from molfile and SMILES formats into LaTeX code.
- The generated code utilizes the chemfig package syntax for flexible structure and reaction mechanism descriptions.
- The program is freely available with documentation.
Conclusions:
- mol2chemfig addresses the need for automated chemical structure rendering in LaTeX.
- The software enhances the workflow for scientists preparing documents with chemical content.
- The tool promotes wider adoption of precise chemical representations in digital publications.
Related Concept Videos
Molecular Models
Molecular Shapes
Two regions of electron density in a diatomic...
Lewis Structures of Molecular Compounds and Polyatomic Ions
Hückel's Rule Diagram of π MOs: Frost Circle
A Frost circle is constructed by drawing a polygon whose number of edges is equal to the number of carbons of the given cyclic system, with one of the vertices pointing down. Then, a circle is drawn enclosing the polygon so that...
Molecular Compounds: Formulas and Nomenclature
Chemical Formulas

