Automation wrapper for the Cowan atomic structure code
Project description
Cowan Runner
https://doi.org/10.5281/zenodo.18607952
WARNING: The Cowan code must be obtained separately. This tool only automates execution and parsing.
Python automation tool for running the Cowan atomic structure code and parsing results (Slater integrals, spin–orbit constants) for a given atomic configuration and respective XAS final state for L and M edges
This project does NOT include the Cowan code itself.
Installation
Install directly from GitHub:
pip install git+https://github.com/miguemcarvalhojr-cmd/cowan-runner.git
Requirements:
- Python >= 3.8
- Cowan executables available in PATH:
- rcn
- rcn2
Verify Cowan is accessible by running:
rcn
in your terminal.
WHAT THIS TOOL DOES
- Automatically generates IN36
- Runs Cowan (rcn, rcn2)
- Parses the results
- Extracts: • Fk (same-shell) • Fk (cross-shell) • Gk (exchange) • Zeta (spin–orbit)
- Converts all values to eV
USAGE
Run:
cowan_runner
The script will prompt for the required atomic and configuration parameters.
EXAMPLE
For Ni²⁺ 3d⁸ with a 2p core hole, run:
python cowan_runner.py
The script will ask:
Atomic number (Z): 28
Element symbol (e.g. Co, Ni, Ce,...): Ni
Ionization (e.g. 3+): 2+
Open subshell (e.g. 3d,4d,4f): 3d
Shell to create a hole (e.g. 2p,3d): 2p
Occupation number n (e.g. 7 for 3d7): 8
Select Cowan control mesh:
90 = non-relativistic
190 = relativistic (standard)
290 = relativistic (recommended for heavy atoms / f systems)
Mesh [290 default]: 290
Example output:
Time spent: 0 hr 0 min 0.4 sec
--- Ni2+ 3d8 ---
zeta_3d = 0.0826 eV
F2 = 12.2328 eV
F4 = 7.5969 eV
--- Ni2+ 2p5 3d9 ---
zeta_2p = 11.5070 eV
zeta_3d = 0.1022 eV
G1pd = 5.7829 eV
F2pd = 7.7204 eV
G3pd = 3.2898 eV
F2 = 13.0052 eV
F4 = 8.0836 eV
NOTES
- The Cowan CODE directory must be accessible via PATH
- This repository does NOT distribute Cowan binaries
- Designed for atomic multiplet and spectroscopy calculations
- The mesh details can be found on COWAN documentation
Citation
If you use this tool in published work, please cite both this repository and the original Cowan code. Carvalho, M. (2026). cowan-runner (Version 0.1.0) [Software]. DOI: 10.5281/zenodo.18607952 Cowan code:
R. D. Cowan, "The Theory of Atomic Structure and Spectra", University of California Press, 1981.
BibTeX:
@book{cowan1981theory, title={The Theory of Atomic Structure and Spectra}, author={Cowan, Robert D.}, year={1981}, publisher={University of California Press} }
LICENSE
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cowan_runner-0.1.1.tar.gz.
File metadata
- Download URL: cowan_runner-0.1.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bfcee79ed5deb2a801255f4b25db22decad9fbb06048333afa92c5d4060711f
|
|
| MD5 |
272b62169e3a672a894026bfb66947ce
|
|
| BLAKE2b-256 |
96eea0f77fe2d794ed2f7986413ea42cd0e84f915a84b88b2dbea383ffb27e20
|
File details
Details for the file cowan_runner-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cowan_runner-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
070376cbfe65e533955ca3b7beb46fabeab4a0685408e311e1aa6ddf59d82658
|
|
| MD5 |
f4c72e139c011f9729516d095a108504
|
|
| BLAKE2b-256 |
3bf87f09cb788b1fbcc146c47340ac26d0755513869aff0d4d88dd1263df90d8
|