Using element and species classes#
The element and species classes are at the heart of smact functionality. Elements are the elements of the periodic table. Species are elements, with some additional information; the oxidation state and the coordination environment (if known). So for example the element iron can have many oxidation states and those oxidation states can have many coordination environments.
import smact
iron = smact.Element("Fe")
print(
"The element %s has %i oxidation states. They are %s."
% (iron.symbol, len(iron.oxidation_states), iron.oxidation_states)
)
The element Fe has 8 oxidation states. They are [-2, -1, 1, 2, 3, 4, 5, 6].
When an element has an oxidation state and coordination environment then it has additional features. For example, the Shannon radius of the element is useful for calculating radius ratio rules, or for training neural networks.
iron_square_planar = smact.Species("Fe", 2, "4_n")
print("Square planar iron has a Shannon radius of %s Angstrom" % iron_square_planar.shannon_radius)
Square planar iron has a Shannon radius of None Angstrom