M3GNetSimilarity

class emmet.core.similarity.M3GNetSimilarity(model='M3GNet-MP-2018.6.1-Eform')

Bases: SimilarityScorer

Obtain structural similarity using an M3GNet formation energy model.

Parameters

modelstr or Path

Model for computing feature vectors of a structure. Defaults to “M3GNet-MP-2018.6.1-Eform”

property model

Return the matgl model.

featurize_structures(structures, num_procs=1)

Featurize structures using the user-defined _featurize_structure.

Rewritten because of pickling issues with torch objects.

Parameters

structures : list of Structure objects num_procs : int = 1

Number of parallel processes to run in featurizing structures.

Returns

np.ndarray : the feature vectors of the input structures.

Parameters:
  • structures (list[Structure])

  • num_procs (int)

Parameters:

model (str | Path)