Getting Started#

moldenViz lets you inspect Molden outputs either from the command line or directly in Python. This page covers the essentials so you can install the package and render your first molecule quickly.

What is a Molden file?#

A Molden file stores the atomic structure and molecular orbital information produced by many quantum-chemistry codes (GAUSSIAN, ORCA, Molpro, and others). Each file contains [Atoms] coordinates, contracted Gaussian shells in [GTO], and orbital coefficients under [MO]. moldenViz currently reads Molden files that use spherical Gaussian functions; Cartesian variants (sometimes labelled 5D/9G) raise an error during parsing. For the full format specification, refer to the official Molden format description.

Installation#

Install the package from PyPI:

pip install moldenViz

Prerequisites#

The interactive plotting window relies on tkinter. Verify that your Python install can import it:

python3 -m tkinter

If that check fails, install tkinter manually:

  • macOS:

    brew install python-tk
    
  • Ubuntu:

    sudo apt-get install python3-tk
    

Quick CLI Preview#

Render a provided example molecule directly from the command line:

moldenViz -e benzene
Screenshot of the moldenViz CLI window showing benzene with orbital controls

Use your own Molden file instead:

moldenViz my-calculation.molden

Quick Python Preview#

Create plots programmatically by importing the high-level API:

from moldenViz import Plotter
from moldenViz.examples import benzene

Plotter(benzene)
Screenshot of the moldenViz Python plotter rendering an isosurface next to molecule controls

Next Steps#

Once you can run the basics, move on to the topic-focused guides: