PeriodicTable

class qcelemental.periodic_table.PeriodicTable[source]

Bases: object

Nuclear and mass data about chemical elements from NIST.

Parameters

None

A

Mass number, number of protons and neutrons, starting with 0 for dummies.

Type

List[int]

Z

Atomic number, number of protons, starting with 0 for dummies.

Type

List[int]

E

Element symbol from periodic table, starting with “X” for dummies. “Fe” capitalization.

Type

List[str]

EA

Nuclide symbol in E + A form, e.g., “Li6”. List EA is a superset of E; that is, both “Li6” and “Li” present. For hydrogen, “D” and “T” also included.

Type

List[str]

mass

Atomic mass [u].

  • For nuclides (e.g., “Li6”), the reported mass.

  • For stable elements (e.g., “Li”), the mass of the most abundant isotope (“Li7”).

  • For unstable elements (e.g., “Pu”), the mass of the longest-lived isotope (“Pu244”).

Type

List[decimal.Decimal]

name

Element name from periodic table, starting with “Dummy”. “Iron” capitalization.

Type

List[str]

Methods Summary

to_A(atom)

Get mass number of atom.

to_E(atom[, strict])

Get element symbol of atom.

to_Z(atom[, strict])

Get atomic number of atom.

to_atomic_number(atom[, strict])

Get atomic number of atom.

to_element(atom[, strict])

Get element name of atom.

to_group(atom)

Get group (vertical column in periodic table) of atom.

to_mass(atom, *[, return_decimal])

Get atomic mass of atom.

to_mass_number(atom)

Get mass number of atom.

to_name(atom[, strict])

Get element name of atom.

to_period(atom)

Get period (horizontal row in periodic table) of atom.

to_symbol(atom[, strict])

Get element symbol of atom.

Methods Documentation

to_A(atom)[source]

Get mass number of atom.

Functions to_A() and to_mass_number() are aliases.

Parameters

atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

Returns

Mass number, number of protons and neutrons.

  • If atom is nuclide (e.g., “Li6”), the corresponding mass number, 6.

  • If atom is stable element (e.g., “Li”), the mass number of the most abundant isotope, 7.

  • If atom is unstable element (e.g., “Pu”), the mass number of the longest-lived isotope, 244.

Return type

int

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide.

to_E(atom, strict=False)[source]

Get element symbol of atom.

Functions to_E() and to_symbol() are aliases.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • strict (bool) – Allow only element identification in atom, not nuclide.

Returns

Element symbol, capitalized.

Return type

str

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide. If strict=True and atom resolves into nuclide, not element.

to_Z(atom, strict=False)[source]

Get atomic number of atom.

Functions to_Z() and to_atomic_number() are aliases.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • strict (bool) – Allow only element identification in atom, not nuclide.

Returns

Atomic number, number of protons.

Return type

int

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide. If strict=True and atom resolves into nuclide, not element.

to_atomic_number(atom, strict=False)

Get atomic number of atom.

Functions to_Z() and to_atomic_number() are aliases.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • strict (bool) – Allow only element identification in atom, not nuclide.

Returns

Atomic number, number of protons.

Return type

int

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide. If strict=True and atom resolves into nuclide, not element.

to_element(atom, strict=False)[source]

Get element name of atom.

Functions to_element() and to_name() are aliases.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • strict (bool) – Allow only element identification in atom, not nuclide.

Returns

Element name, capitalized.

Return type

str

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide. If strict=True and atom resolves into nuclide, not element.

to_group(atom)[source]

Get group (vertical column in periodic table) of atom.

Parameters

atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

Return type

Optional[int]

Returns

  • int – Group between 1 (e.g., Li) and 18 (e.g., KR84).

  • None – If one of the 30 Lanthanides (Z=57-71) or Actinides (Z=89-103).

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide.

to_mass(atom, *, return_decimal=False)[source]

Get atomic mass of atom.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • return_decimal (bool) – Whether to preserve significant figures information by returning as Decimal (True) or to convert to float (False).

Returns

Atomic mass [u]. See above for type.

  • If atom is nuclide (e.g., “Li6”), the reported mass.

  • If atom is stable element (e.g., “Li”), the mass of the most abundant isotope, “Li7”.

  • If atom is unstable element (e.g., “Pu”), the mass of the longest-lived isotope, “Pu244”.

Return type

decimal.Decimal or float

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide.

to_mass_number(atom)

Get mass number of atom.

Functions to_A() and to_mass_number() are aliases.

Parameters

atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

Returns

Mass number, number of protons and neutrons.

  • If atom is nuclide (e.g., “Li6”), the corresponding mass number, 6.

  • If atom is stable element (e.g., “Li”), the mass number of the most abundant isotope, 7.

  • If atom is unstable element (e.g., “Pu”), the mass number of the longest-lived isotope, 244.

Return type

int

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide.

to_name(atom, strict=False)

Get element name of atom.

Functions to_element() and to_name() are aliases.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • strict (bool) – Allow only element identification in atom, not nuclide.

Returns

Element name, capitalized.

Return type

str

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide. If strict=True and atom resolves into nuclide, not element.

to_period(atom)[source]

Get period (horizontal row in periodic table) of atom.

Parameters

atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

Returns

Period between 1 (e.g., He) and 7 (e.g., U238).

Return type

int

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide.

to_symbol(atom, strict=False)

Get element symbol of atom.

Functions to_E() and to_symbol() are aliases.

Parameters
  • atom (Union[int, str]) – Identifier for element or nuclide, e.g., H, D, H2, He, hE4.

  • strict (bool) – Allow only element identification in atom, not nuclide.

Returns

Element symbol, capitalized.

Return type

str

Raises

NotAnElementError – If atom cannot be resolved into an element or nuclide. If strict=True and atom resolves into nuclide, not element.