emmet.core.featurization.robocrys.util

Miscellaneous utility functions and common data.

Attributes:
common_formulas: A set of common formulas. The keys to the data are strings

from pymatgen.core.composition.Composition.reduced_formula.

connected_geometries: A list of geometries that are considered

“connectable” polyhedra. E.g. Their face-sharing, edge-sharing, etc properties are of interest.

geometry_to_polyhedra: A mapping from geometry type (e.g. octahedral) to the

plural polyhedra name (e.g. octahedra).

dimensionality_to_shape: A mapping from dimensionality to the component

shape.

Functions

defaultdict_to_dict

Recursively convert nested defaultdict to dict.

get_el

Utility method to get an element str from a symbol, Element, or Specie.

get_formatted_el

Formats an element string.

htmlify_spacegroup

Formats a spacegroup using unicode symbols.

superscript_number

Converts a string containing numbers to superscript.

unicodeify_spacegroup

Formats a spacegroup using unicode symbols.

Classes

TYPE_CHECKING

bool(x) -> bool

common_formulas

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2).

connected_geometries

Built-in mutable sequence.

dimensionality_to_shape

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2).

geometry_to_polyhedra

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2).

polyhedra_plurals

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2).