What is the regex validator for the mp id format?

What is the format of the mp id numbers? I have seen “mp-#####” and “mvc-#####” show up in the database. But I have no idea what else might show up. What I am really after is the regex validator for these id numbers, so if you could supply that it would be great.

Hi Eli,

mp- and mvc- are the only prefixes we’ve used so far for our core materials. There’s also a por- prefix for the separate porous materials dataset. The following regex has worked for me in the past:

mp_id_pattern = re.compile(r'^(mp|por|mvc)-\d+$', re.IGNORECASE)

HTH
Patrick

thanks! that’s what I needed to know.

Also a note that all new materials are exclusively using the mp- prefix, mvc- was used historically for materials that came from a multivalent cathode project.