pub struct AtomBindings { /* private fields */ }Expand description
The occupied subshells of one neutral atom.
Absent shells are not listed. A subshell that is unoccupied in the
neutral ground state has no entry; AtomBindings::binding_energy_ev
returns None for it. There is no zero or sentinel binding energy.
Invariants: 1 <= z <= 92 (the crate’s element table); at least one
subshell; subshells strictly increasing by designator (so no duplicates);
occupancies summing to z within OCCUPANCY_SUM_TOLERANCE (a neutral
atom).
Implementations§
Source§impl AtomBindings
impl AtomBindings
Sourcepub fn new(z: u8, shells: Vec<ShellBinding>) -> Result<Self, ElectronDataError>
pub fn new(z: u8, shells: Vec<ShellBinding>) -> Result<Self, ElectronDataError>
Build a validated atom. Shells must be given in increasing designator order (the order of the ENDF format).
Sourcepub fn shells(&self) -> &[ShellBinding]
pub fn shells(&self) -> &[ShellBinding]
Occupied subshells, in increasing designator order.
Sourcepub fn shell(&self, subshell: Subshell) -> Option<&ShellBinding>
pub fn shell(&self, subshell: Subshell) -> Option<&ShellBinding>
The entry for a subshell, or None if it is unoccupied.
Sourcepub fn binding_energy_ev(&self, subshell: Subshell) -> Option<f64>
pub fn binding_energy_ev(&self, subshell: Subshell) -> Option<f64>
Binding energy of a subshell, eV, or None if it is unoccupied.
Trait Implementations§
Source§impl Clone for AtomBindings
impl Clone for AtomBindings
Source§fn clone(&self) -> AtomBindings
fn clone(&self) -> AtomBindings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AtomBindings
impl Debug for AtomBindings
Source§impl<'de> Deserialize<'de> for AtomBindings
impl<'de> Deserialize<'de> for AtomBindings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AtomBindings
impl PartialEq for AtomBindings
Source§impl Serialize for AtomBindings
impl Serialize for AtomBindings
impl StructuralPartialEq for AtomBindings
Auto Trait Implementations§
impl Freeze for AtomBindings
impl RefUnwindSafe for AtomBindings
impl Send for AtomBindings
impl Sync for AtomBindings
impl Unpin for AtomBindings
impl UnsafeUnpin for AtomBindings
impl UnwindSafe for AtomBindings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more