AbsorptionBuilder

class emmet.builders.materials.absorption_spectrum.AbsorptionBuilder(materials, tasks, absorption, query=None, **kwargs)

Bases: Builder

Parameters:
  • materials (Store)

  • tasks (Store)

  • absorption (Store)

  • query (dict | None)

prechunk(number_splits)

Prechunk method to perform chunking by the key field

Return type:

Iterator[dict]

Parameters:

number_splits (int)

get_items()

Gets all items to process

Return type:

Iterator[list[dict]]

Returns:

generator or list relevant tasks and materials to process

process_item(item)

Process an item. There should be no database operations in this method. Default behavior is to return the item.

Arguments:

item:

Returns:

item: an item to update

update_targets(items)

Inserts the new absorption docs into the absorption collection