DescriptionAdapter
- class emmet.core.featurization.robocrys.describe.adapter.DescriptionAdapter(condensed_structure, use_iupac_ordering=True)
Bases:
BaseAdapterClass to facilitate pulling data from the condensed structure dictionary.
- Attributes:
sym_labels: The symmetry labels as strings. use_iupac_ordering (bool, optional): Whether to order formulas
by the iupac “electronegativity” series, defined in Table VI of “Nomenclature of Inorganic Chemistry (IUPAC Recommendations 2005)”. This ordering effectively follows the groups and rows of the periodic table, except the Lanthanides, Actanides and hydrogen. If set to
False, the elements will be ordered according to the electronegativity values.- Args:
- condensed_structure: The condensed structure data, formatted as produced
by
robocrys.condense.StructureCondenser.condense_structure().
- Parameters:
condensed_structure (dict[str, Any])
use_iupac_ordering (bool)
- get_nearest_neighbor_details(site_index, group=False)
Gets a summary of all the nearest neighbors to a site.
- Return type:
list[NeighborSiteDetails]- Parameters:
site_index (int)
group (bool)
- Args:
site_index: An inequivalent site index. group: Whether to group all nearest neighbor sites
with the same element together.
- Returns:
A
listofNeighborSiteDetailsobjects, each with the attributes:element(str): The element of the nearest neighbor site.count(int): The number of sites of this type.sym_label(str): The symmetry label.sites(list[int]): The site indices representing this nearest neighbor. Can be more than one site ifgroup_by_element=True.
- get_next_nearest_neighbor_details(site_index, group=False)
Gets a summary of all the next nearest neighbors to a site.
We only get the summaries for next nearest neighbor sites that have a geometry type listed in
robocrys.util.connected_geometriesand have apoly_formula.- Return type:
list[NextNeighborSiteDetails]- Parameters:
site_index (int)
group (bool)
- Args:
site_index: An inequivalent site index. group: Whether to group together all next nearest neighbor sites
with the same element, connectivity and geometry but different symmetry labels.
- Returns:
A
listofNextNeighborSiteDetailsobjects, each with the attributes:element(str): The element of the next nearest neighbor site.connectivity(str): The connectivity type to this site.geometry(str): The geometry type of the next nearest neighbor.count(int): The number of sites of this type.sym_label(str): The symmetry label.sites(list[int]): The site indices representing this next nearest neighbor. Can be more than one site ifgroup=True.poly_formula(str): The polyhedral formula.
- get_component_details()
Gets a summary of all components.
- Return type:
list[ComponentDetails]
- Returns:
A
listofComponentDetailsobjects, each with the attributes:count(int): The number of these components in the structure.formula(str): The component formula.dimensionality(int): The component dimensionality.molecule_name(strorNone): The molecule name if applicable, elseNone.orientation(tuple[int]): The component orientation.index(list[int]): The component inequivalent index.
- get_component_groups()
Gets a summary of all components groups.
- Return type:
list[ComponentGroup]
- Returns:
The components, grouped together by formula, dimensionality and molecule name. The data will be returned as a
listofComponentGroupobjects, each with the attributes:count(int): The total number of components in this group.formula(str): The formula of the components.dimensionality(int): The dimensionality of the components.molecule_name(strorNone): The molecule name if applicable, elseNone.components(list[ComponentDetails]): The components in the group.
- get_component_site_groups(component_index)
Gets a summary of the sites in a component.
- Return type:
list[SiteGroup]- Parameters:
component_index (int)
- Returns:
The sites, grouped together by element. The data will be returned as a
listofSiteGroupobjects, each with the attributes:count(int): The total number of sites in this group.element(str): The site element.sites(list[int]): A list of site indices in this group.
- get_sym_label(site_indices)
Convert site indices into a formatted symmetry label.
- Return type:
str- Parameters:
site_indices (int | list[int])
- Args:
site_indices: The site indices.
- Returns:
The formatted symmetry label. E.g., if the set of symmetry labels for the sites looks like
(1, 2), the symmetry label will be(1,2).