Skip to content

Python program to compute molecular g-matrices using for any multiplicity, integrated within PyQChem. Parses Q-Chem outputs to build effective Hamiltonians and obtain spin–orbit-coupled states for g-matrix analysis.

Notifications You must be signed in to change notification settings

acebgit/gmatrix_state_interaction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magnetic property calculation: g-matrix with state-interaction procedure

Development of computer codes for calculating the molecular g-matrix using the state-interaction (SI) procedure.


🧠 Overview

This repository contains Python programs developed to compute magnetic g-matrices through the state-interaction (SI) approach.
The workflow consists of two main post-processing stages:

  1. Parsing Q-Chem outputs to extract relevant electronic structure data (state energies, spin–orbit couplings, and angular momentum matrix elements) [1]
  2. Computing the g-matrix based on the SI effective Hamiltonian formalism.

Electronic structure calculations are performed with a developer version of Q-Chem 6.0, which provides all the quantities required by the SI scheme. The evaluation of the g-matrix is carried out with in-house codes integrated within PyQChem and ezMagnet frameworks.


⚙️ Methodology Summary

The SI procedure constructs and diagonalizes an effective Hamiltonian whose:

  • diagonal elements correspond to the non-relativistic state energies, and
  • off-diagonal elements contain the spin–orbit coupling (SOC) matrix elements.

The resulting spin–orbit-coupled states are linear combinations of the non-relativistic states.
Two implementations are available:

  • Bolvin’s approach, for systems with doublet multiplicity [2]
  • Tatchen’s method, for arbitrary spin multiplicities [3]

This framework enables a detailed rationalization of g-shifts, analyzing how excitation energies, SOCs, and orbital angular momenta jointly determine magnetic anisotropy.


🚀 Main Features

  • Computation of the molecular g-tensor from Q-Chem output files.
  • Support for RAS-CI, TDDFT and EOM calculations.
  • JSON-based intermediate representation of extracted electronic data.
  • Modular structure for integration into larger workflows (e.g., PyQChem, ezMagnet).

🧰 Installation Requirements

Python ≥ 3.8 and the following packages: numpy json decimal pymatgen

(Other built-in modules such as warnings, sys, hashlib, and operator are used internally.)


📁 Repository Structure

File Description
parser_eom.py Parses Q-Chem EOM-CC outputs and generates a .json input for g-tensor calculation.
parser_rasci.py Parses Q-Chem RAS-CI outputs and generates a .json input for g-tensor calculation.
gtensor.py Computes the g-tensor from the generated .json data file.

🧪 Example Usage

Simple command-line workflow:

# For EOM outputs
python parser_eom.py example_eom.out
python gtensor.py example_eom.json > example_eom_results.out

# For RAS-CI outputs
python parser_rasci.py example_ras.out
python gtensor.py example_ras.json > example_ras_results.out

📖 References

  • [1] A. Krylov et al., Q-Chem 6.0 (developer version)
  • [2] Bolvin, H. (2006). ChemPhysChem: A European Journal of Chemical Physics and Physical Chemistry, 7(7), 1575-1589.
  • [3] Tatchen, J., Kleinschmidt, M., & Marian, C. M. (2009). The Journal of chemical physics, 130(15).

📬 Contact

Antonio Cebreiro

🌐 LinkedIn profile

🌐 Google Scholar profile

📍 Molecular Electronic Structure Group at the Donostia International Physics Centre (DIPC)

📧 Mail

🧾 License

This project is distributed for research and educational use. Please cite appropriately if used in scientific publications.

About

Python program to compute molecular g-matrices using for any multiplicity, integrated within PyQChem. Parses Q-Chem outputs to build effective Hamiltonians and obtain spin–orbit-coupled states for g-matrix analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages