Skip to main content

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

Project description

SOMOs

Versions [0.9.0] - [0.9.6] - 2024-04-27

Changed

  • logo is now gSOMOs instead of SOMOs
  • in the projection scheme (proj.py), there are now two criteria to identify a SOMO, namely "SOMO P2v?" (formerly SOMO?) and "SOMO dom. β MO?" (see scientific documentation)
    • SOMOs identified according to the P^2_virtual criterion are highlighted in green
    • SOMOs identified only on the basis of a dominant virtual beta MO are highlighted in orange (weaker criterion)
  • Scientific documentation renamed gSOMOs.pdf. And content updated
  • gSOMOs-v3.pdf scientific document now downloadable in gsomos.readthedocs.io
  • Images in README.md now point to their https://raw.githubusercontent.com counterpart
  • Update of DOCUMENTATION_setup.md, PUBLISHING.md

Added

  • new analyzis scheme in proj.py: bases on the diagonalization of projection matrices
  • new clean_logfile_name() function in io.py (made to solve a prefix issue for X.log.gz files)
  • Short examples in the documentation
  • docstring for projection_heatmap_from_df
  • docstring of show_alpha_to_homo translated in English
  • link toward a jupyter notebook example in README.md and in

Fixed

  • minor fixes

gSOMOs

🔗 Available on PyPI

A Python library to identify and analyze Single Occupied Molecular Orbitals (SOMOs) from Gaussian 09 or Gaussian 16 .log files.

PyPI version Documentation Status License Python Build


Installation

pip install gSOMOs

Capabilities Overview

SOMOs is a Python toolkit for analyzing molecular orbitals (MOs) from Gaussian log files, with a focus on identifying SOMOs (Singly Occupied Molecular Orbitals) in open-shell systems.


🚀 Main Features

from somos import cosim, proj

Load Gaussian Log Files

  • Parses .log and .log.gz Gaussian output files
  • Extracts orbital energies, coefficients, overlap matrices, and spin

Cosine Similarity & SOMO Detection

  • Computes cosine similarities between alpha and beta orbitals
  • Identifies SOMO candidates from orbital projections

Projection-Based Analysis

  • Projects occupied and virtual alpha MOs onto virtual beta MOs
  • Decomposes projection matrix to extract leading contributions

📊 Visualization Tools

Heatmaps

  • Interactive or static heatmaps of MO similarities
heatmap

t-SNE (Dimensionality Reduction)

  • Projects high-dimensional orbital space to 2D for visual exploration
  • Enables inspection of orbital families and similarity patterns
tSNE

📁 Output

  • .xlsx tables of SOMO similarity and projections
  • .png images of heatmaps and projections
  • All results saved in the logs/ folder
  • well-organized dataframes and printing
=== Summary of SOMO candidates ===

──────────── SOMO Candidate #1 ────────────
  α occupied contributions:
    • α 187 (44.2%)
    • α 164 (27.3%)
  β virtual projections:
    • β 194 (73.3%)
    • β 196 (16.1%)

──────────── SOMO Candidate #2 ────────────
  α occupied contributions:
    • α 169 (41.1%)
    • α 186 (21.6%)
    • α 165 (15.7%)
  β virtual projections:
    • β 192 (53.1%)
    • β 193 (26.9%)

──────────── SOMO Candidate #3 ────────────
  α occupied contributions:
    • α 186 (30.0%)
  β virtual projections:
    • β 198 (73.0%)

──────────── SOMO Candidate #4 ────────────
  α occupied contributions:
    • α 168 (51.8%)
    • α 183 (16.3%)
  β virtual projections:
    • β 193 (41.6%)
    • β 192 (26.7%)

✅ Examples Used in Notebooks (compressed Gaussian files)

  • H2CO_T1.log.gz
  • FeComplex.log.gz

📓 Example Jupyter Notebook

An example notebook demonstrating gSOMOs usage is available: gSOMOs Examples Notebook on GitHub


Technical and scientific documentation

This document describes two complementary methods to identify singly occupied molecular orbitals (SOMOs) in open-shell systems:

  • Orbital projection analysis, where occupied α orbitals are projected onto the β orbital basis using the AO overlap matrix;
  • Cosine similarity mapping, which computes the angular similarity between α and β orbitals and matches them using the Kuhn–Munkres (Hungarian) algorithm.

Two examples based on the triplet state (T₁) of formaldehyde (H₂CO) and on the lowest quintet state of an iron complex are commented in this document.


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

gsomos-0.9.6.tar.gz (48.7 MB view details)

Uploaded Source

Built Distribution

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

gsomos-0.9.6-py3-none-any.whl (4.6 MB view details)

Uploaded Python 3

File details

Details for the file gsomos-0.9.6.tar.gz.

File metadata

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

File hashes

Hashes for gsomos-0.9.6.tar.gz
Algorithm Hash digest
SHA256 ff07ff29d4a8a3f093cb1075c67a18e6027b77c1612f44c2e60bdf36095421a1
MD5 f99b7af44c6fe2eeb34f408e2dd64721
BLAKE2b-256 cb4ea6f5d6e03def2889d4da3bd30cd9c11a28c4b6561266268b6229274074fa

See more details on using hashes here.

File details

Details for the file gsomos-0.9.6-py3-none-any.whl.

File metadata

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

File hashes

Hashes for gsomos-0.9.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b978885154ff93b78014dd047cafaf7aeff35e40c9090f3f761826c304882fb2
MD5 7852fee5fd1b1c7be0ff608cf7c7301c
BLAKE2b-256 b50bf472727f6b3d5171f6ebf4d3b6f03c67adc62ce066f11d759c43d8bb498c

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