classes
Provides classes to model period table elements.
Classes:
|
Chemical element. |
|
Ordered dict of Elements with lookup by number, symbol, and name. |
|
Subclass of |
|
Isotope massnumber, relative atomic mass, and abundance. |
Data:
Type alias for isotope dictionaries. |
-
class
Element
(number, symbol, name, group=0, period=0, block='', series=0, mass=0.0, eleneg=0.0, eleaffin=0.0, covrad=0.0, atmrad=0.0, vdwrad=0.0, tboil=0.0, tmelt=0.0, density=0.0, eleconfig='', oxistates='', ionenergy=None, isotopes=None, description='')[source] Bases:
Dictable
Chemical element.
- Parameters
number (
int
) – The atomic number of the element.symbol (
str
) – The chemical symbol of the element.name (
str
) – The name of the element in English.group (
int
) – The number of electrons in the element. Default0
.period (
int
) – The number of protons in the element. Default0
.block (
str
) – The group of the element in the periodic table. Default''
.series (
int
) – The Period of the element in the periodic table. Default0
.mass (
float
) – The relative atomic mass. Default0.0
.eleneg (
float
) – The Electronegativity (Pauling scale). Default0.0
.eleaffin (
float
) – The electron affinity in eV. Default0.0
.covrad (
float
) – The Covalent radius in Angstrom. Default0.0
.atmrad (
float
) – The Atomic radius in Angstrom. Default0.0
.vdwrad (
float
) – The Van der Waals radius in Angstrom. Default0.0
.tboil (
float
) – The boiling temperature in K. Default0.0
.tmelt (
float
) – The melting temperature in K. Default0.0
.density (
float
) – The density at 295K in g/cm³ respectively g/L. Default0.0
.eleconfig (
str
) – The Ground state electron configuration. Default''
.oxistates (
str
) – The oxidation states. Default''
.ionenergy (
Optional
[Tuple
]) – The ionization energies ineV
. DefaultNone
.isotopes (
Optional
[Dict
[int
,Union
[Isotope
,Tuple
[float
,float
]]]]) – The Isotopic composition. A mapping of isotope mass numbers toIsotope
objects. DefaultNone
.description (
str
) – A description of the element. Default''
.
Methods:
__repr__
()Return a string representation of the
Element
.__str__
()Return
str(self)
.validate
()Check consistency of the data.
Attributes:
The Atomic radius in Angstrom.
The Block of the element in the periodic table.
The Covalent radius in Angstrom.
The density at 295K in g/cm³ respectively g/L.
A description of the element.
The electron affinity in eV.
The Ground state electron configuration.
The ground state electron configuration.
The number of electrons in the element.
The Electronegativity (Pauling scale).
The number of electrons per shell as tuple.
The relative atomic mass calculated from the isotopic composition.
The group of the element in the periodic table.
The ionization energies in
eV
.The Isotopic composition.
The relative atomic mass.
The relative atomic mass.
The name of the element in English.
The number of neutrons in the most abundant natural stable isotope.
The mass number of the most abundant natural stable isotope.
The atomic number of the element.
The oxidation states.
The Period of the element in the periodic table.
The number of protons in the element.
Index to chemical series.
The chemical symbol of the element.
The boiling temperature in K.
The melting temperature in K.
The Van der Waals radius in Angstrom.
-
property
eleconfig_dict
The ground state electron configuration.
Mapping of Tuple(shell, subshell): electrons.
-
property
exactmass
The relative atomic mass calculated from the isotopic composition.
- Return type
-
property
isotopes
The Isotopic composition.
keys: isotope mass number
values: Isotope(relative atomic mass, abundance)
-
property
molecular_weight
The relative atomic mass.
Ratio of the average mass of atoms.
- Return type
-
property
neutrons
The number of neutrons in the most abundant natural stable isotope.
- Return type
-
validate
()[source] Check consistency of the data.
- Raises
ValueError – If there are any validation issues.
-
class
Elements
(*elements)[source] -
Ordered dict of Elements with lookup by number, symbol, and name.
- Parameters
*elements (
Element
) – The elements to add to the dictionary.
Methods:
__contains__
(item)Return
key in self
.__getitem__
(key)Return
self[key]
.__iter__
()Returns an iterator over the elements, in order.
__len__
()Returns the number of elements.
__repr__
()Return a string representation of the
Elements
.__str__
()Return
str(self)
.add_alternate_spelling
(element, spelling)Adds an alternate spelling for an element.
split_isotope
(string)Returns the symbol and mass number for the isotope represented by
string
.Attributes:
The names of the elements, all in lowercase.
The names of the elements.
The symbols of the elements.
-
class
HeavyHydrogen
(number, symbol, name, group=0, period=0, block='', series=0, mass=0.0, eleneg=0.0, eleaffin=0.0, covrad=0.0, atmrad=0.0, vdwrad=0.0, tboil=0.0, tmelt=0.0, density=0.0, eleconfig='', oxistates='', ionenergy=None, isotopes=None, description='')[source] Bases:
Element
Subclass of
Element
to handle the Heavy Hydrogen isotopes Deuterium and Tritium.Chemical element.
- Parameters
number (
int
) – The atomic number of the element.symbol (
str
) – The chemical symbol of the element.name (
str
) – The name of the element in English.group (
int
) – The number of electrons in the element. Default0
.period (
int
) – The number of protons in the element. Default0
.block (
str
) – The group of the element in the periodic table. Default''
.series (
int
) – The Period of the element in the periodic table. Default0
.mass (
float
) – The relative atomic mass. Default0.0
.eleneg (
float
) – The Electronegativity (Pauling scale). Default0.0
.eleaffin (
float
) – The electron affinity in eV. Default0.0
.covrad (
float
) – The Covalent radius in Angstrom. Default0.0
.atmrad (
float
) – The Atomic radius in Angstrom. Default0.0
.vdwrad (
float
) – The Van der Waals radius in Angstrom. Default0.0
.tboil (
float
) – The boiling temperature in K. Default0.0
.tmelt (
float
) – The melting temperature in K. Default0.0
.density (
float
) – The density at 295K in g/cm³ respectively g/L. Default0.0
.eleconfig (
str
) – The Ground state electron configuration. Default''
.oxistates (
str
) – The oxidation states. Default''
.ionenergy (
Optional
[Tuple
]) – The ionization energies ineV
. DefaultNone
.isotopes (
Optional
[Dict
[int
,Union
[Isotope
,Tuple
[float
,float
]]]]) – The Isotopic composition. A mapping of isotope mass numbers toIsotope
objects. DefaultNone
.description (
str
) – A description of the element. Default''
.
Attributes:
Return the isotope in
H[X]
format.Return mass number of most abundant natural stable isotope.
-
class
Isotope
(mass=0.0, abundance=1.0, massnumber=0)[source] Bases:
Dictable
Isotope massnumber, relative atomic mass, and abundance.
- Parameters
Methods:
__repr__
()Return a string representation of the
Isotope
.__str__
()Return
str(self)
.Attributes:
The natural abundance of the isotope.
The mass of the isotope.
The mass number of the isotope.