This project has been archived by its maintainers, and is no longer receiving any updates.
Atomic Term Symbol Calculator
A Python package for calculating all possible atomic term symbols from electron configurations. This tool uses quantum mechanical principles to determine microstates and derive term symbols including J-coupling.
Features
- Calculate total number of microstates for any electron configuration
- Generate all possible term symbols from electron configurations
- Support for s, p, d, and f orbitals
- Handles multiple electron shells and mixed configurations
- Applies Pauli exclusion principle and Hund's rules
- Calculates J quantum numbers using Russell-Saunders coupling
- Flexible input format (space or dot separated orbitals)
Installation
From Source
- Clone the repository:
git clone https://github.com/ccheung93/atomic-term-symbol-calculator.git
cd atomic-term-symbol-calculator
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package in development mode:
pip install -e .
- To install with testing dependencies:
pip install -e .[test]
Requirements
- Python ≥ 3.8
- numpy
- pandas
- fractions (built-in)
- itertools (built-in)
- re (built-in)
Usage
As a Python Module
from atomic_term_symbol_calculator.terms import calc_term_symbols, calc_microstates
# Calculate term symbols for carbon (2p2)
terms = calc_term_symbols("2p2")
print(terms)
# Output: ['3P0', '3P1', '3P2', '1D2', '1S0']
# Calculate microstates for p2 configuration
microstates = calc_microstates(6, 2) # 6 positions, 2 electrons
print(microstates)
# Output: 15
# Mixed orbital configurations
terms = calc_term_symbols("2s1.2p1")
print(terms)
# Output: ['3P0', '3P1', '3P2', '1P1']
# d orbital configurations
terms = calc_term_symbols("3d2")
print(terms)
Command Line Usage
python -m atomic_term_symbol_calculator.terms
# Enter configuration when prompted: 2p3
Input Format
Electron configurations can be specified in two formats:
- Dot separated:
2s1.2p3.3d2 - Space separated:
2s1 2p3 3d2
The occupancy number can be omitted if it's 1:
2p1is equivalent to2p3d1is equivalent to3d
Examples
| Configuration | Description | Example Terms |
|---|---|---|
1s1 |
Hydrogen | 2S1/2 |
2p1 |
Boron | 2P1/2, 2P3/2 |
2p2 |
Carbon | 3P0, 3P1, 3P2, 1D2, 1S0 |
2p3 |
Nitrogen | 4S3/2, 2D3/2, 2D5/2, 2P1/2, 2P3/2 |
3d1 |
Sc²⁺ | 2D3/2, 2D5/2 |
3d5 |
Mn²⁺ | Multiple terms (high-spin d5) |
Testing
Run the test suite:
pytest
Run tests with verbose output:
pytest -v
Run tests for a specific file:
pytest tests/test_terms.py
Run tests with coverage:
pytest --cov=atomic_term_symbol_calculator
Development
Project Structure
atomic-term-symbol-calculator/
├── src/
│ └── atomic_term_symbol_calculator/
│ ├── __init__.py # Version info
│ └── terms.py # Main calculation functions
├── tests/
│ └── test_terms.py # Comprehensive test suite
├── pyproject.toml # Project configuration
├── README.md # This file
└── CLAUDE.md # Development guidance
Algorithm Overview
The calculator follows these steps:
- Parse Configuration: Extract orbital types and electron counts
- Generate Microstates: Create all possible electron arrangements
- Apply Quantum Rules: Filter using Pauli exclusion principle
- Tabulate States: Create ML vs MS quantum number table
- Extract Terms: Systematically remove term symbols from table
- Calculate J Values: Apply |L-S| ≤ J ≤ |L+S| coupling rules
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
License
MIT License - see LICENSE file for details.
References
- Term Symbols Notes
- Russell-Saunders coupling theory
- Quantum mechanical principles of atomic structure
Author
Charles Cheung (ccheung@udel.edu)
Metadata
Release files for atomic-term-symbol-calculator 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atomic_term_symbol_calculator-0.1.1.tar.gz | 11.9 kB | Without provenance | Details for atomic_term_symbol_calculator-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atomic_term_symbol_calculator-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for atomic_term_symbol_calculator-0.1.1-py3-none-any.whl |
Total release size: 19.6 kB
Release files / atomic_term_symbol_calculator-0.1.1.tar.gz
| Download URL | atomic_term_symbol_calculator-0.1.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2027a8e292f26c1cc23513692677a8ef2a8b4bc2344af32fdae1a76114250101
|
|
BLAKE2b-256 checksum How to use checksums |
67ff14f60140aca06733b916e8fc791a7d763fdff076151b849cf62108910eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / atomic_term_symbol_calculator-0.1.1-py3-none-any.whl
| Download URL | atomic_term_symbol_calculator-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbeb7c11c08fb6101cba62b3695dd46e904f55e402217ce7bccd9f3f51cd1949
|
|
BLAKE2b-256 checksum How to use checksums |
9199bc0d7b741d85ac531e59d1399876978b3218fd5a5e2ce93a787fbedcb03b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Security for atomic-term-symbol-calculator 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.