allElements

allElements()

Method for obtaining a list of all the elements.

Usage Examples

Loop over all elements and print the element names and masses:

for element in PeriodicTable.allElements():
    # Print the element name
    print "Element name: ", element.name()
    # Print the element mass
    print "Element mass: ", element.atomicMass().inUnitsOf(atomic_mass_unit)

Notes

The function is part of the PeriodicTableElement module and can be called via

PeriodicTable.allElements()