#[repr(u8)]pub enum Element {
Show 119 variants
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,
La = 57,
Ce = 58,
Pr = 59,
Nd = 60,
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,
Unknown = 0,
}Expand description
Periodic table entries supported by bio-forge.
Each variant encodes its atomic number in the repr(u8) discriminant and provides
conveniences for retrieving standard symbols, heavy-atom classification, and atomic
masses used when exporting coordinates or computing physical properties.
Variants§
H = 1
Hydrogen (Z = 1).
He = 2
Helium (Z = 2).
Li = 3
Lithium (Z = 3).
Be = 4
Beryllium (Z = 4).
B = 5
Boron (Z = 5).
C = 6
Carbon (Z = 6).
N = 7
Nitrogen (Z = 7).
O = 8
Oxygen (Z = 8).
F = 9
Fluorine (Z = 9).
Ne = 10
Neon (Z = 10).
Na = 11
Sodium (Z = 11).
Mg = 12
Magnesium (Z = 12).
Al = 13
Aluminum (Z = 13).
Si = 14
Silicon (Z = 14).
P = 15
Phosphorus (Z = 15).
S = 16
Sulfur (Z = 16).
Cl = 17
Chlorine (Z = 17).
Ar = 18
Argon (Z = 18).
K = 19
Potassium (Z = 19).
Ca = 20
Calcium (Z = 20).
Sc = 21
Scandium (Z = 21).
Ti = 22
Titanium (Z = 22).
V = 23
Vanadium (Z = 23).
Cr = 24
Chromium (Z = 24).
Mn = 25
Manganese (Z = 25).
Fe = 26
Iron (Z = 26).
Co = 27
Cobalt (Z = 27).
Ni = 28
Nickel (Z = 28).
Cu = 29
Copper (Z = 29).
Zn = 30
Zinc (Z = 30).
Ga = 31
Gallium (Z = 31).
Ge = 32
Germanium (Z = 32).
As = 33
Arsenic (Z = 33).
Se = 34
Selenium (Z = 34).
Br = 35
Bromine (Z = 35).
Kr = 36
Krypton (Z = 36).
Rb = 37
Rubidium (Z = 37).
Sr = 38
Strontium (Z = 38).
Y = 39
Yttrium (Z = 39).
Zr = 40
Zirconium (Z = 40).
Nb = 41
Niobium (Z = 41).
Mo = 42
Molybdenum (Z = 42).
Tc = 43
Technetium (Z = 43).
Ru = 44
Ruthenium (Z = 44).
Rh = 45
Rhodium (Z = 45).
Pd = 46
Palladium (Z = 46).
Ag = 47
Silver (Z = 47).
Cd = 48
Cadmium (Z = 48).
In = 49
Indium (Z = 49).
Sn = 50
Tin (Z = 50).
Sb = 51
Antimony (Z = 51).
Te = 52
Tellurium (Z = 52).
I = 53
Iodine (Z = 53).
Xe = 54
Xenon (Z = 54).
Cs = 55
Cesium (Z = 55).
Ba = 56
Barium (Z = 56).
La = 57
Lanthanum (Z = 57).
Ce = 58
Cerium (Z = 58).
Pr = 59
Praseodymium (Z = 59).
Nd = 60
Neodymium (Z = 60).
Pm = 61
Promethium (Z = 61).
Sm = 62
Samarium (Z = 62).
Eu = 63
Europium (Z = 63).
Gd = 64
Gadolinium (Z = 64).
Tb = 65
Terbium (Z = 65).
Dy = 66
Dysprosium (Z = 66).
Ho = 67
Holmium (Z = 67).
Er = 68
Erbium (Z = 68).
Tm = 69
Thulium (Z = 69).
Yb = 70
Ytterbium (Z = 70).
Lu = 71
Lutetium (Z = 71).
Hf = 72
Hafnium (Z = 72).
Ta = 73
Tantalum (Z = 73).
W = 74
Tungsten (Z = 74).
Re = 75
Rhenium (Z = 75).
Os = 76
Osmium (Z = 76).
Ir = 77
Iridium (Z = 77).
Pt = 78
Platinum (Z = 78).
Au = 79
Gold (Z = 79).
Hg = 80
Mercury (Z = 80).
Tl = 81
Thallium (Z = 81).
Pb = 82
Lead (Z = 82).
Bi = 83
Bismuth (Z = 83).
Po = 84
Polonium (Z = 84).
At = 85
Astatine (Z = 85).
Rn = 86
Radon (Z = 86).
Fr = 87
Francium (Z = 87).
Ra = 88
Radium (Z = 88).
Ac = 89
Actinium (Z = 89).
Th = 90
Thorium (Z = 90).
Pa = 91
Protactinium (Z = 91).
U = 92
Uranium (Z = 92).
Np = 93
Neptunium (Z = 93).
Pu = 94
Plutonium (Z = 94).
Am = 95
Americium (Z = 95).
Cm = 96
Curium (Z = 96).
Bk = 97
Berkelium (Z = 97).
Cf = 98
Californium (Z = 98).
Es = 99
Einsteinium (Z = 99).
Fm = 100
Fermium (Z = 100).
Md = 101
Mendelevium (Z = 101).
No = 102
Nobelium (Z = 102).
Lr = 103
Lawrencium (Z = 103).
Rf = 104
Rutherfordium (Z = 104).
Db = 105
Dubnium (Z = 105).
Sg = 106
Seaborgium (Z = 106).
Bh = 107
Bohrium (Z = 107).
Hs = 108
Hassium (Z = 108).
Mt = 109
Meitnerium (Z = 109).
Ds = 110
Darmstadtium (Z = 110).
Rg = 111
Roentgenium (Z = 111).
Cn = 112
Copernicium (Z = 112).
Nh = 113
Nihonium (Z = 113).
Fl = 114
Flerovium (Z = 114).
Mc = 115
Moscovium (Z = 115).
Lv = 116
Livermorium (Z = 116).
Ts = 117
Tennessine (Z = 117).
Og = 118
Oganesson (Z = 118).
Unknown = 0
Placeholder for unsupported or user-defined elements.
Implementations§
Source§impl Element
impl Element
Sourcepub fn symbol(&self) -> &'static str
pub fn symbol(&self) -> &'static str
Retrieves the IUPAC element symbol.
This is used across file writers to ensure the element column stays normalized regardless of how the atom was originally labeled.
§Returns
A static string slice containing the two-character symbol (or "Unknown").
Sourcepub fn is_heavy_atom(&self) -> bool
pub fn is_heavy_atom(&self) -> bool
Indicates whether the element is treated as a heavy atom.
Hydrogen is the only light atom; every other element (including Unknown) is flagged
as heavy for the purpose of filtering coordinate exports.
§Returns
true if the element is not hydrogen.
Sourcepub fn atomic_mass(&self) -> f64
pub fn atomic_mass(&self) -> f64
Returns the standard atomic mass in unified atomic mass units.
Values follow IUPAC tables and feed mass-based calculations such as center-of-mass or density estimations in solvation operations.
§Returns
The atomic mass expressed as f64; 0.0 for Unknown.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Element
impl<'de> Deserialize<'de> for Element
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>,
impl Copy for Element
impl Eq for Element
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.