Skip to main content

Crate use_electron_shell

Crate use_electron_shell 

Source
Expand description

§use-electron-shell

Simple electron shell distribution helpers.
Static shell distributions for known elements with conservative main-group valence helpers for introductory and general utility use.

use-electron-shell is intentionally simple. It does not model full electron configurations, orbital ordering nuance, or transition-metal valence chemistry.

§Surface

ItemPurpose
electron_shells()Shell population list for an atomic number
shell_count()Number of occupied shells in the static distribution
outer_shell_electrons()Electrons in the outermost occupied shell
valence_electrons_main_group()Conservative valence helper for main-group elements only

§Example

use use_electron_shell::{electron_shells, valence_electrons_main_group};

assert_eq!(electron_shells(11), Some(vec![2, 8, 1]));
assert_eq!(valence_electrons_main_group(17), Some(7));
assert_eq!(valence_electrons_main_group(26), None);

Simple electron shell distribution helpers.

Functions§

electron_shells
Returns the static shell distribution for an atomic number.
outer_shell_electrons
Returns the electron count in the outermost occupied shell.
shell_count
Returns the number of occupied shells in the static distribution.
valence_electrons_main_group
Returns a conservative main-group valence electron count.