octadist.elements

octadist.src.elements.number_to_symbol(x)[source]

Convert atomic number to symbol and vice versa for atom 1-109.

Parameters:x (str or int) – symbol or atomic number.
Returns:
  • atom[x] (str) – If x is atomic number, return symbol.
  • atom.index(i) (int) – If x is symbol, return atomic number.

Examples

>>> check_atom('He')
2
>>> check_atom(2)
'He'
octadist.src.elements.number_to_radii(x)[source]

Convert atomic number (index) to atom radii in Angstroms: 1-119.

Parameters:x (int) – Atomic number.
Returns:atom_radii[x] (int) – Atomic radius.

Examples

>>> check_radii(2) # He
0.93
octadist.src.elements.number_to_color(x)[source]

Convert atomic number to color: 1-109.

Parameters:x (int) – Atomic number.
Returns:atomic color[x] (str) – Atomic color.

References

http://jmol.sourceforge.net/jscolors/

Examples

>>> check_color(2) # He
'#D9FFFF'