pyiron_atomistics.atomistics.structure.atoms.Symbols#

class pyiron_atomistics.atomistics.structure.atoms.Symbols(numbers)[source]#

Bases: Symbols

Derived from the ase symbols class which has the following docs:

Parameters:

list/numpy.ndarray) (numbers) – List of atomic numbers

__init__(numbers)[source]#

Methods

__init__(numbers)

count(value)

fromsymbols(symbols)

get_chemical_formula([mode, empirical])

Get chemical formula.

index(value, [start, [stop]])

Raises ValueError if the value is not present.

indices()

Return dictionary mapping each unique symbol to indices.

search(symbols)

Return the indices of elements with given symbol or symbols.

species()

Return unique symbols as a set.

species_indices()

Return the indices of each atom within their individual species.

Attributes

formula

Formula object.

structure

The structure to which the symbol is assigned to

count(value) integer -- return number of occurrences of value#
property formula: Formula#

Formula object.

get_chemical_formula(mode: str = 'hill', empirical: bool = False) str[source]#

Get chemical formula.

See documentation of ase.atoms.Atoms.get_chemical_formula().

index(value[, start[, stop]]) integer -- return first index of value.#

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

indices() dict[str, Sequence[int] | ndarray][source]#

Return dictionary mapping each unique symbol to indices.

>>> from ase.build import molecule
>>> atoms = molecule('CH3CH2OH')
>>> atoms.symbols.indices()
{'C': array([0, 1]), 'O': array([2]), 'H': array([3, 4, 5, 6, 7, 8])}
search(symbols) Sequence[int] | ndarray[source]#

Return the indices of elements with given symbol or symbols.

species() set[str][source]#

Return unique symbols as a set.

species_indices() Sequence[int][source]#

Return the indices of each atom within their individual species.

>>> from ase import Atoms
>>> atoms = Atoms('CH3CH2OH')
>>> atoms.symbols.species_indices()
[0, 0, 1, 2, 1, 3, 4, 0, 5]

^ ^ ^ ^ ^ ^ ^ ^ ^ C H H H C H H O H

property structure#

The structure to which the symbol is assigned to

Returns:

The required structure

Return type:

pyiron_atomistics.atomistics.structure.atoms.Atoms