pyiron.atomistics.structure.sparse_list module

class pyiron.atomistics.structure.sparse_list.SparseArray(length=None, **qwargs)[source]

Bases: object

Administrate object that consists of several sparse lists (tags) and full lists that have identical indices and length

Parameters:**qwargs – dictionary containing lists and SparseLists (tags) (must have identical length)
add_tag(*args, **qwargs)[source]
check_consistency()[source]

Returns:

items()[source]

Returns:

keys()[source]

Returns:

remove_tag(*args, **qwargs)[source]
Parameters:
  • *args
  • **qwargs

Returns:

class pyiron.atomistics.structure.sparse_list.SparseArrayElement(**qwargs)[source]

Bases: object

Single element of a SparseArray :param **qwargs:

class pyiron.atomistics.structure.sparse_list.SparseList(sparse_list, default=None, length=None)[source]

Bases: object

Object to represent a single sparse list Internal representation like a dict External representation like a list :param sparse_list: dict object with {index: val} :param default: default value for all elements not given by index in sparse_list :param length: length of the list

items()[source]
Returns:index, value pairs of non-sparse elements
keys()[source]
Returns:indices of non-sparse elements
list()[source]

convert sparse list into full list :returns: list representation

to_hdf(hdf, key)[source]
Parameters:
  • hdf
  • key

Returns:

values()[source]
Returns:values of non-sparse elements
class pyiron.atomistics.structure.sparse_list.SparseListElement(ind, val)[source]

Bases: object

Handle single element of a sparse lisr :param ind: index :param val: value

pyiron.atomistics.structure.sparse_list.sparse_index(index_list, length, default_val=True)[source]
Parameters:
  • index_list
  • length
  • default_val

Returns: