StructureDescriber
- class emmet.core.featurization.robocrys.describe.describer.StructureDescriber(describe_mineral=True, describe_component_makeup=True, describe_components=True, describe_symmetry_labels=True, describe_oxidation_states=True, describe_bond_lengths=True, bond_length_decimal_places=2, distorted_tol=0.6, only_describe_cation_polyhedra_connectivity=True, only_describe_bonds_once=True, fmt='raw', return_parts=False)
Bases:
object- Parameters:
describe_mineral (bool)
describe_component_makeup (bool)
describe_components (bool)
describe_symmetry_labels (bool)
describe_oxidation_states (bool)
describe_bond_lengths (bool)
bond_length_decimal_places (int)
distorted_tol (float)
only_describe_cation_polyhedra_connectivity (bool)
only_describe_bonds_once (bool)
fmt (str)
return_parts (bool)
- describe(condensed_structure)
Convert a condensed structure into a text description.
- Return type:
str|dict[str,str]- Parameters:
condensed_structure (dict[str, Any])
- Args:
- condensed_structure: The condensed structure data, formatted as
produced by
StructureCondenser.condense_structure().
- Returns:
A description of the structure. If
StructureDescriber.return_partsisFalse, the description will be returned as astr. If it is equal toTrue, the description will be returned as adictwith the keys ‘mineral’, ‘component_makeup’ and ‘components’, each containing the relevant part of the description.
- get_mineral_description()
Gets the mineral name and space group description.
If the structure is a perfect match for a known prototype (e.g. the distance parameter is -1, the mineral name is the prototype name. If a structure is not a perfect match but similar to a known mineral, “-like” will be added to the mineral name. If the structure is a good match to a mineral but contains a different number of element types than the mineral prototype, “-derived” will be added to the mineral name.
- Return type:
str
- Returns:
The description of the mineral name.
- get_component_makeup_summary()
Gets a summary of the makeup of components in a structure.
- Return type:
str
- Returns:
A description of the number of components and their dimensionalities and orientations.
- get_all_component_descriptions()
Gets the descriptions of all components in the structure.
- Return type:
str
- Returns:
A description of all components in the structure.
- get_component_description(component_index, single_component=False)
Gets the descriptions of all sites in a component.
- Return type:
str- Parameters:
component_index (int)
single_component (bool)
- Args:
component_index: The index of the component single_component: Whether the structure contains only a single
component.
- Returns:
The description for all sites in the components.
- get_site_description(site_index)
Gets a description of the geometry and bonding of a site.
If the site likeness (order parameter) is less than
distorted_tol, “distorted” will be added to the geometry description.- Return type:
str- Parameters:
site_index (int)
- Args:
site_index: An inequivalent site index.
- Returns:
A description of the geometry and bonding of a site.
- get_bond_length_description(from_site, to_sites)
Gets a description of the bond lengths between two sets of sites.
- Return type:
str- Parameters:
from_site (int)
to_sites (list[int])
- Args:
from_site: An inequivalent site index. to_sites: A
listof site indices. The site indices shouldall be for the same element.
- Returns:
A description of the bond lengths or an empty string if
StructureDescriber.only_describe_bonds_onceisTrueand all all bond lengths have already been described.
- get_octahedral_tilt_description(site_index)
Gets a description of octahedral tilting angles between two sites.
Currently only implemented for corner-sharing octahedra. Will throw an error if the two sites are not next nearest neighbors.
- Return type:
str- Parameters:
site_index (int)
- Args:
site_index: An inequivalent site index.
- Returns:
A description of the octahedral tilting angles.