get_element_id_from_string#

diffsims.structure_factor.get_element_id_from_string(element_str)[source]#

Get periodic element ID for elements \(Z\) = 1-98 from element symbol.

Parameters:
element_strstr

String starting with an element symbol, optionally delimited from other following characters by a non-alphabetic character. Only the element symbol is evaluated. In particular, compatible with common atom type symbols in CIF files that often start with an element symbol followed by e.g. an optional oxidation number, although this is not guaranteed: https://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Iatom_type_symbol.html

Returns:
element_idint

Integer ID in the periodic table of elements.