BaseAdapter

class emmet.core.featurization.robocrys.adapter.BaseAdapter(condensed_structure)

Bases: object

Base adapter class for facilitating access to condensed structure data.

Attributes:

elements: The site elements.

Args:
condensed_structure: The condensed structure data, formatted as produced

by robocrys.condense.StructureCondenser.condense_structure().

Parameters:

condensed_structure (dict[str, Any])

get_distance_details(from_site, to_sites)

Gets the bond lengths between two sets of sites.

Return type:

list[float]

Parameters:
  • from_site (int)

  • to_sites (int | list[int])

Args:

from_site: An inequivalent site index. to_sites: One or more inequivalent site indices.

Returns:

The distances between the sites.

get_angle_details(from_site, to_sites, connectivity)

Gets the connectivity angles between two sets of sites.

Return type:

list[float]

Parameters:
  • from_site (int)

  • to_sites (int | list[int])

  • connectivity (str)

Args:

from_site: An inequivalent site index. to_sites: One or more inequivalent site indices. connectivity: The site connectivity type. I.e. “corner”, “edge”, or

“face”.

Returns:

The distances between the sites.

property mineral: dict[str, str | int | bool]

The mineral data.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property formula: str

The structure formula.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property spg_symbol: str

The space group symbol.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property crystal_system: str

The crystal system.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property dimensionality: int

The overall dimensionality.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property sites: dict[int, dict[str, Any]]

The site data.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property distances: dict[int, dict[int, list[float]]]

The distance data.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property angles: dict[int, dict[int, dict[str, list[float]]]]

The angle data.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property components: dict[int, dict[str, Any]]

The component data.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property component_makeup: list[int]

The component makeup of the structure.

See robocrys.condense.StructureCondenser.condense_structure() for more details.

property is_vdw_heterostructure: bool

Whether the structure is a vdw heterostructure.

See robocrys.condense.StructureCondenser.condense_structure() for more details.