The simplest way of accessing the elements is importing them directly from mendeleev
by symbols
from mendeleev import Si, Fe, O
print("Si's name: ", Si.name)
print("Fe's atomic number:", Fe.atomic_number)
print("O's atomic weight: ", O.atomic_weight)
An alternative interface to the data is through the element
function that returns a single Element
object or a list of Element
object depending on the arguments.
The function can be imported directly from the mendeleev
package
from mendeleev import element
The element
method accepts unique identifiers: atomic number, atomic symbol or element’s name in English. To retrieve the entries on Silicon by symbol type
si = element("Si")
si
Similarly to access the data by atomic number or element names type
al = element(13)
print(al.name)
o = element("Oxygen")
print(o.atomic_number)
The element
method also accepts list or tuple of identifiers and then returns a list of Element
objects
c, h, o = element(["C", "Hydrogen", 8])
print(c.name, h.name, o.name)
Next to simple attributes returning str
, int
or float
, there are extended attributes
oxistates
, returns a list of oxidation statesionenergies
, returns a dictionary of ionization energiesisotopes
, returns a list of Isotope
objectsionic_radii
returns a list of IonicRadius
objectsec
, electronic configuration objectoxistates
returns a list of most common oxidation states for a given element
fe = element("Fe")
print(fe.oxistates)
The ionenergies
returns a dictionary with ionization energies in eV
as values and degrees of ionization as keys
o = element("O")
o.ionenergies
The isotopes
attribute returns a list of Isotope
objects with the following attributes per isotope
print(
"{0:^4s} {1:^4s} {2:^10s} {3:8s} {4:6s} {5:5s}\n{6}".format(
"AN", "MN", "Mass", "Unc.", "Abu.", "Rad.", "-" * 42
)
)
for iso in fe.isotopes:
print(
"{0:4d} {1:4d} {2:10.5f} {3:8.2e} {4:} {5:}".format(
iso.atomic_number,
iso.mass_number,
iso.mass,
iso.mass_uncertainty,
iso.abundance,
iso.is_radioactive,
)
)
Similarly to element
function that can be used to fetch specific isotopes by:
atomic_number
and mass_number
orsymbol
and mass_number
from mendeleev import isotope
isotope("Fe", mass_number=57)
# tritium
isotope(1, 3)
Radioactive isotopes can have multiple decay modes and that data is available as decay_modes
attrobute for each Isotope
isotope("Li", 11).decay_modes
Another composite attribute is ionic_radii
which returns a list of IonicRadius
object with the following attributes
atomic_number
, atomic number of the ioncharge
, charge of the ioneconf
, electronic configuration of the ioncoordination
, coordination type of the ionspin
, spin state of the ion (HS or LS)crystal_radius
, crystal radius in pmionic_radius
, ionic radius in pmorigin
, source of the datamost_reliable
, recommended value, (see the original paper for more information)for ir in fe.ionic_radii:
print(ir)
Next to stored attributes there is a number of useful functions
si = element("Si")
# get the number of valence electrons
si.nvalence()
# calculate softness for an ion
si.softness(charge=2)
# calcualte hardness for an ion
si.hardness(charge=4)
# calculate the effective nuclear charge for a subshell using Slater's rules
si.zeff(n=3, o="s")
# calculate the effective nuclear charge for a subshell using Clemneti's and Raimondi's exponents
si.zeff(n=3, o="s", method="clementi")
Currently there are 9 electronagativity scales implemented that can me accessed though the common electronegativity
method, the scales are:
allen
allred-rochow
cottrell-sutton
ghosh
gordy
li-xue
martynov-batsanov
mulliken
nagle
pauling
sanderson
More information can be found in the documentation.
si.electronegativity(scale="pauling")
si.electronegativity(scale="allen")
# calculate mulliken electronegativity for a neutral atom or ion
si.electronegativity(scale="mulliken", charge=1)