atomic_number

plasmapy.atomic.atomic_number(element: plasmapy.atomic.particle_class.Particle) → int

Return the number of protons in an atom, isotope, or ion.

Parameters:

element (str or Particle) – A string representing an element, isotope, or ion; or an instance of the Particle class.

Returns:

atomic_number – The atomic number of an element.

Return type:

int

Raises:
  • InvalidElementError – If the argument is a valid particle but not a valid element.
  • InvalidParticleError – If the argument does not correspond to a valid particle.
  • TypeError – If the argument is not a str.

See also

mass_number : returns the mass number (the total
number of protons and neutrons) of an isotope.

Examples

>>> atomic_number("H")
1
>>> atomic_number("tritium")
1
>>> atomic_number("alpha")
2
>>> atomic_number("oganesson")
118