PeriodicTable


PeriodicTable

ATK supports calculations for all elements in the periodic table up to Lawrencium (Lr, 103). The names of the elements (such as Hydrogen, Gold, etc) are made available by importing one of the two modules ATK.KohnSham or ATK.TwoProbe.

For a complete list of the elements, with alternative spellings and more information about the pseudo-potentials, please refer to the manual page on atomic data.

There are two query methods available for elements:

  • atomicNumber(): Returns the atomic number of the element

  • symbol(): Returns the atomic symbol of the element

from ATK.KohnSham import *

print Oxygen.atomicNumber()
8
print Oxygen.symbol()
O

Alternatively:

import ATK.KohnSham

print ATK.KohnSham.Oxygen.atomicNumber()
8

Additionally, by importing the module ATK.PeriodicTable, the symbolic element names also becomes available (as well as the long element names, of course).

from ATK import PeriodicTable

print PeriodicTable.O.atomicNumber()
8

This allows for a shorthand usage of elements. For example, for storing atomic elements in a list:

from ATK.PeriodicTable import *

first_group_elements = [H] + [Li] + [Na] + \
      [K] + [Rb] + [Cs] + [Fr]
for element in first_group_elements:
    print element.symbol()
#The lines below are the program output.
H
Li
Na
K
Rb
Cs
Fr

When importing the entire ATK.PeriodicTable package, be careful not to "destroy" the chemical elements by using the element symbol for something else. The following example will not work:

from ATK.Periodictable import *

N = 4
elements = [Mn,N,Se,Au]
for element in elements:
    print element.symbol()