MPID

class emmet.core.mpid.MPID(val)

Bases: str

A Materials Project type ID with a prefix and an integer This class enables seemlessly mixing MPIDs and regular integer IDs Prefixed IDs are considered less than non-prefixed IDs to enable proper mixing with the Materials Project

Args:
val: Either 1) a prefixed string e.g. “mp-1234”
  1. an integer e.g. 1234

  2. a number stored as a string e.g. ‘1234’

  3. an MPID

Numbers stored as strings are coerced to ints

Parameters:

val (MPID | int | str)