SubstratesBuilder
- class emmet.builders.materials.substrates.SubstratesBuilder(materials, substrates, elasticity, query=None, **kwargs)
Bases:
Builder- Parameters:
materials (Store)
substrates (Store)
elasticity (Store)
query (dict | None)
- prechunk(number_splits)
Part of a domain-decomposition paradigm to allow the builder to operate on multiple nodes by dividing up the IO as well as the compute This function should return an iterator of dictionaries that can be distributed to multiple instances of the builder to get/process/update on.
- Return type:
Iterable[dict]- Parameters:
number_splits (int)
- Arguments:
number_splits: The number of groups to split the documents to work on
- get_items()
Gets all materials that need new substrates
- Returns:
generator of materials to calculate substrates
- process_item(item)
Calculates substrate matches for all given substrates
- Args:
item (dict): a dict with a material_id and a structure
- Returns:
dict: a diffraction dict
- update_targets(items)
Inserts the new substrate matches into the substrates collection
- Args:
items ([[dict]]): a list of list of thermo dictionaries to update
- ensure_indicies()
Ensures indicies on the substrates, materials, and elastic collections