Skip to main content

A Python package to analyze magnetic molecular orbitals (SOMOs) from Gaussian outputs

Project description

HMObanner

Hückel Molecular Orbital (HMO) Viewer & Drawer

HMO.py is an interactive application that allows you to draw simple organic molecules, build the corresponding Hückel matrix, calculate π molecular orbitals, and visualize the numerical results as tables and graphics.

Main Features

  • ✏️ Interactive drawing of molecules (adding atoms and bonds),
  • ⚙️ Automatic calculation of π molecular orbitals using the Hückel method,
  • 📊 Display of molecular orbital coefficients, energies, bond indices, and π atomic charges,
  • 🔬 Calculation of molecular descriptors:
    • Total π-electron energy,
    • HOMO-LUMO gap,
    • Electronic potential (μ),
    • Chemical hardness (η),
    • Chemical softness (S),
    • Electrophilicity index (ω),
  • 💾 Save/load molecules in .hmo format,
  • 📈 Export of data to Excel (.xlsx) files,
  • 🖼️ Graphical display of the molecule in the results window.

Installation

The required dependencies are listed in the pyproject.toml file. If you install the project via pip install hmo, all dependencies will be handled automatically.

Launch

python HMO.py

Usage

1️⃣ Drawing:

  • Click to add atoms on the canvas,
  • Click and drag between two atoms to create a bond,
  • Delete or modify atoms/bonds as needed.

2️⃣ Run Hückel:

  • Once the molecule is built, click the Run Hückel button to perform the calculations.

3️⃣ Results:

  • Click Show Numerical Results to open the detailed window:
    • Molecule displayed with atom numbering,
    • Full table of molecular orbitals and descriptors,
    • Scrollbars are available for larger molecules.

4️⃣ Saving:

  • Save the molecule using the menu or the dedicated button (in .hmo format),
  • Export Excel results after running the calculation.

.hmo File Format

A simple text file structured as follows:

Nodes:
C· 330.0 180.0
C· 480.0 210.0
...
Bonds:
0 1
1 2
...
  • Each atom: Type x y
  • Each bond: index_atom1 index_atom2

Known Limitations

  • The method is limited to planar π-conjugated systems,
  • Atom names must be recognized by the library (e.g., C·, O:, etc.),
  • No graphical export into the Excel file yet (planned for a future version).

Roadmap

  • Improved color and style management,
  • Support for user-defined Hückel parameters,
  • Optional integration of molecule snapshots in the Excel file.

Useful Links

Credits

This project was developed by Romuald Poteau (LPCNO, University of Toulouse, CNRS & INSA), with strong contributions of ChatGPT for documentation, the graphical interface, and calculation features.

Thanks to users and testers for their feedback and improvement suggestions.

Bibliography

  • Erich Hückel, Quantentheoretische Beiträge zum Benzolproblem. I. Die Elektronenkonfiguration des Benzols und verwandter Verbindungen (1931), Z. Phys. 70: 204–286. DOI: 10.1007/BF01339530

  • Andrew Streitwieser, Molecular Orbital Theory for Organic Chemists (1961), Wiley International Edition, 4th Edition, Wiley.

  • Robert Burns Woodward & Roald Hoffmann, The Conservation of Orbital Symmetry (1969) Angew. Chem., Int. ed. Eng. 8: 781-853. DOI: 10.1002/anie.196907811

  • Frederic A. Van-Catledge, A Pariser-Parr-Pople-based set of Hückel molecular orbital parameters (1980), J. Org. Chem. 45: 4801–4802. DOI: 10.1021/jo01311a060

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hmo-0.6.1.tar.gz (27.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hmo-0.6.1-py3-none-any.whl (4.8 MB view details)

Uploaded Python 3

File details

Details for the file hmo-0.6.1.tar.gz.

File metadata

  • Download URL: hmo-0.6.1.tar.gz
  • Upload date:
  • Size: 27.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for hmo-0.6.1.tar.gz
Algorithm Hash digest
SHA256 03f1e173bee114158c90d8ca5dcd6a0ca76bb71e1d5ac4b221940987fda1a30b
MD5 411cb96aa4fcd7e7de9adca4fd4d6041
BLAKE2b-256 68d4018808cdedf1f486c0de27c93ed1e21f54ee9e47957d1be38eaaf8c8dbcf

See more details on using hashes here.

File details

Details for the file hmo-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: hmo-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for hmo-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9e0db023d34b686648b3188688aae1dcd21224d52da185ede9e8cc26969dc1e
MD5 6354dcfb197dda1baeeac4dc7f6112ae
BLAKE2b-256 0e15ddeddfb9474d5e6de911745b3d38e0e73a36e9703a01e258cb5104250193

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page