utils¶
-
javelin.utils.
get_atomic_number_symbol
(Z=None, symbol=None)[source]¶ This function returns a tuple of matching arrays of atomic numbers (Z) and chemical symbols (symbol).
Parameters: - Z (int, array like object of int's) – atomic numbers
- symbol (str, array like object of str) – chemical symbols
Returns: arrays of atomic numbers and chemical symbols
Return type: tuple of
numpy.ndarray
Note: If both Z and symbol are provided the symbol will win out and change the Z to match.
Examples: >>> Z, symbol = get_atomic_number_symbol(Z=[12, 24, 26, 48]) >>> print(Z) [12 24 26 48] >>> print(symbol[0]) Mg >>> print(symbol[1]) Cr >>> print(symbol[2]) Fe >>> print(symbol[3]) Cd
>>> Z, symbol = get_atomic_number_symbol(symbol=['C', 'H', 'N', 'O']) >>> print(Z) [6 1 7 8] >>> print(symbol) ['C' 'H' 'N' 'O']
-
javelin.utils.
get_atomic_numbers
(structure)[source]¶ Wrapper to get the atomic numbers from different structure classes
-
javelin.utils.
get_positions
(structure)[source]¶ Wrapper to get the positions from different structure classes