Skip to main content

atomistic_oscillator_strength

Calculates the electron transition density atomic contribution (ETDAC) matrix from X-ray absorption spectroscopy (XAS) calculations. The ETDAC matrix splits the core-electron transition intensities (from core to virtual molecular orbitals) into contributions from pairs of atoms: the atom the core electron leaves (core atom) and the atom where it arrives (virtual atom). With it, excited-state charge transfer between molecular fragments can be quantified, for example in π-stacked aromatic amino acids.

The method and its applications are described in:

X-ray absorption spectroscopy reveals charge transfer in π-stacked aromatic amino acids, Phys. Chem. Chem. Phys. (2025). https://doi.org/10.1039/D4CP04615C

The ETDAC matrix element is written in the paper as $$\tilde{\gamma}^{[l,m]}_{AA^{\prime}}$$. It is built from three inputs per molecular geometry: the Löwdin populations of the core molecular orbitals (MOs) on each atom, the Löwdin populations of the virtual MOs on each atom, and the core-electron transition intensities from each core MO to each virtual MO.

How it works

flowchart LR
    A["ORCA XAS<br/>calculations"] --> B["xas-qmol-parser"]
    B --> C["Inputs per geometry:<br/>core-MO populations,<br/>virtual-MO populations,<br/>core-electron<br/>transition intensities<br/>(3 list files + CSV matrices)"]
    C --> D["qm_etdac_calculator<br/>checks the inputs,<br/>calculates ETDAC"]
    D --> E["etdac_outputs/<br/>data_etdac_matrix.h5<br/>(one matrix per geometry)"]
    D --> F["data_etdac_matrix.log<br/>(what happened in the run)"]
    E --> G["Your analysis:<br/>heatmaps, notebooks"]

The inputs come from xas-qmol-parser, which parses ORCA outputs. Their format, and how to keep one folder per system, are described in docs/input-format.md. An earlier result is never overwritten: it is kept as data_etdac_matrix_oldversionN.h5.

Install

Python 3.11 or newer, in a virtual environment:

python3 -m venv .venv && source .venv/bin/activate
pip install qm-etdac-calculator
qm-etdac-test        # checks that the installation calculates correctly

To run the example below with the data shipped in the repository, or to use the notebooks, install from a clone instead:

git clone https://github.com/caraortizmah/atomistic_oscillator_strength.git
cd atomistic_oscillator_strength
python3 -m venv .venv && source .venv/bin/activate
pip install .

More options in docs/installation.md.

Run

From the folder with the three list files (the project folder), here the Phe–Tyr example data shipped with the tests:

cd tests/data/phe_tyr
qm-etdac noauto --list-input resA_MOcore_list.log resB_MOvirt_list.log corevirt_fosce_AB_list.log

The result is etdac_outputs/data_etdac_matrix.h5 (one matrix per geometry), with the run log next to it. qm-etdac-test checks the installation in a second. Settings in a JSON file (auto), checking the inputs without calculating (check), the terms between fragments and a plotting script: docs/examplesrun.md.

The same calculation from Python, run from the repository folder:

from qm_etdac_calculator import ConfigMan, Scheme

config = ConfigMan(
    corepop="resA_MOcore_list.log",       # core-MO populations
    virtpop="resB_MOvirt_list.log",       # virtual-MO populations
    etranscv="corevirt_fosce_AB_list.log",  # core-electron transition intensities
    logspath="tests/data/phe_tyr",        # the folder with the three list files
)
scheme = Scheme(config)
paths = scheme.prepare_outputs()  # tests/data/phe_tyr/etdac_outputs/; an earlier result is kept
etdac = scheme.run(paths)         # {sample hash: core-atom x virtual-atom matrix}, also written to paths.h5

Each sample in the .h5 file is a group sample_<hash> with the dataset ETDAC_matrix. The file also records which program version made it and which input files were used.

Notebooks

The original analysis notebooks are kept in the repository:

For developers

How the program is built, tested, logged, debugged and hardened: docs/development.md. Design decisions: docs/adr/. Status and plans: docs/project-state.md. Changes: CHANGELOG.md. Time, memory and disk for large data sets (100 to 1 000 000 samples): docs/performance-and-scale.md.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.

Metadata

Release files for qm-etdac-calculator 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qm-etdac-calculator 1.2.1
File Size Uploaded Provenance Actions
qm_etdac_calculator-1.2.1.tar.gz 47.6 kB With provenance Details for qm_etdac_calculator-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qm-etdac-calculator 1.2.1
File Interpreter ABI Platform Actions
qm_etdac_calculator-1.2.1-py3-none-any.whl Python 3 none any Details for qm_etdac_calculator-1.2.1-py3-none-any.whl

Total release size: 98.7 kB

Release files / qm_etdac_calculator-1.2.1.tar.gz

Download URL qm_etdac_calculator-1.2.1.tar.gz
Size 47.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5a77304933e68b3d12a97553be7c05ff51804df1953aec0c311b247c4b72f15a
BLAKE2b-256 checksum
How to use checksums
3c0dd5e0ba3efb06577d12a41a0e270c803fb87acfe7d85169e3dd115404d463
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / qm_etdac_calculator-1.2.1-py3-none-any.whl

Download URL qm_etdac_calculator-1.2.1-py3-none-any.whl
Size 51.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e85f96c9671401bf3cee7522c6084a51aebaab8d550d0f01c10c7c0dedaef6b0
BLAKE2b-256 checksum
How to use checksums
2ce5a9f9752f8e89d9489c166bea6a2642fa2a394f64cf37d3848317b83accd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for qm-etdac-calculator 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qm_etdac_calculator-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page