StructureSimilarityBuilder

class emmet.builders.materials.similarity.StructureSimilarityBuilder(site_descriptors, structure_similarity, fp_type='csf', **kwargs)

Bases: Builder

get_items()

Gets all materials that need new site descriptors.

Returns:

generator of materials to calculate site descriptors.

process_item(item)

Calculates site descriptors for the structures

Args:
item (list): a list (length 2) with each one document that

carries a task ID in “task_id” and a statistics vector from OP site-fingerprints in “statistics”.

Returns:

dict: similarity measures.

update_targets(items)

Inserts the new task_types into the task_types collection.

Args:

items ([[dict]]): a list of list of site-descriptors dictionaries to update.