Skip to content

Commit

Permalink
Merge pull request #24 from coltonbh/feature-elements-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonbh authored Apr 10, 2024
2 parents 04c4bb2 + 63686eb commit a2b4124
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 0 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ repos:
rev: v1.16.10
hooks:
- id: typos
exclude: constants\.py$
- repo: local
hooks:
- id: tests
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [unreleased]

### Added

- `constants.ELEMENTS` mapping of atomic numbers to element symbols.

## [0.8.1] - 2024-03-29

### Added
Expand Down
121 changes: 121 additions & 0 deletions qcio/constants.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,123 @@
# https://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0
BOHR_TO_ANGSTROM = 0.529177210903

ELEMENTS = {
"H": 1,
"He": 2,
"Li": 3,
"Be": 4,
"B": 5,
"C": 6,
"N": 7,
"O": 8,
"F": 9,
"Ne": 10,
"Na": 11,
"Mg": 12,
"Al": 13,
"Si": 14,
"P": 15,
"S": 16,
"Cl": 17,
"Ar": 18,
"K": 19,
"Ca": 20,
"Sc": 21,
"Ti": 22,
"V": 23,
"Cr": 24,
"Mn": 25,
"Fe": 26,
"Co": 27,
"Ni": 28,
"Cu": 29,
"Zn": 30,
"Ga": 31,
"Ge": 32,
"As": 33,
"Se": 34,
"Br": 35,
"Kr": 36,
"Rb": 37,
"Sr": 38,
"Y": 39,
"Zr": 40,
"Nb": 41,
"Mo": 42,
"Tc": 43,
"Ru": 44,
"Rh": 45,
"Pd": 46,
"Ag": 47,
"Cd": 48,
"In": 49,
"Sn": 50,
"Sb": 51,
"Te": 52,
"I": 53,
"Xe": 54,
"Cs": 55,
"Ba": 56,

Check warning on line 60 in qcio/constants.py

View workflow job for this annotation

GitHub Actions / spell check

"Ba" should be "By" or "Be".
"La": 57,
"Ce": 58,
"Pr": 59,
"Nd": 60,

Check warning on line 64 in qcio/constants.py

View workflow job for this annotation

GitHub Actions / spell check

"Nd" should be "And".
"Pm": 61,
"Sm": 62,
"Eu": 63,
"Gd": 64,
"Tb": 65,
"Dy": 66,
"Ho": 67,
"Er": 68,
"Tm": 69,
"Yb": 70,
"Lu": 71,
"Hf": 72,
"Ta": 73,
"W": 74,
"Re": 75,
"Os": 76,
"Ir": 77,
"Pt": 78,
"Au": 79,
"Hg": 80,
"Tl": 81,
"Pb": 82,
"Bi": 83,
"Po": 84,
"At": 85,
"Rn": 86,
"Fr": 87,
"Ra": 88,
"Ac": 89,
"Th": 90,
"Pa": 91,
"U": 92,
"Np": 93,
"Pu": 94,
"Am": 95,
"Cm": 96,
"Bk": 97,
"Cf": 98,
"Es": 99,
"Fm": 100,
"Md": 101,
"No": 102,
"Lr": 103,
"Rf": 104,
"Db": 105,
"Sg": 106,
"Bh": 107,
"Hs": 108,
"Mt": 109,
"Ds": 110,
"Rg": 111,
"Cn": 112,
"Nh": 113,
"Fl": 114,
"Mc": 115,
"Lv": 116,
"Ts": 117,
"Og": 118,
}

0 comments on commit a2b4124

Please sign in to comment.