StructureCondenser

class emmet.core.featurization.robocrys.condense.condenser.StructureCondenser(use_conventional_cell=True, near_neighbors=None, mineral_matcher=None, use_symmetry_equivalent_sites=False, symprec=0.01, simplify_molecules=True, use_iupac_formula=True, use_common_formulas=True)

Bases: object

Class to transform a structure into an intermediate dict representation.

Args:
use_conventional_cell: Whether to always use the convention cell

representation of the structure.

near_neighbors: A NearNeighbors instance used to calculate the

bonding in the structure. For example, one of pymatgen.analysis.local_env.CrystalNN, pymatgen.analysis.local_env.VoronoiNN, etc. Defaults to None, in which case pymatgen.analysis.local_env.CrystalNN will be used.

mineral_matcher: A MineralMatcher instance. Defaults to None

in which case the default MineralMatcher settings will be used. If set to False, no mineral matching will occur.

use_symmetry_equivalent_sites: Whether to use symmetry to determine if

sites are inequivalent. If False, the site geometry and (next) nearest neighbor information will be used.

symprec: The tolerance used when determining the symmetry of

the structure. The symmetry can used both to determine if multiple sites are symmetrically equivalent (if use_symmetry_equivalent_sites is True) and to obtain the symmetry labels for each site.

use_iupac_formula (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.

use_common_formulas: Whether to use the database of common formulas.

The common formula will be used preferentially to the iupac or reduced formula.

Parameters:
  • use_conventional_cell (bool)

  • near_neighbors (NearNeighbors | None)

  • mineral_matcher (MineralMatcher | None)

  • use_symmetry_equivalent_sites (bool)

  • symprec (float)

  • simplify_molecules (bool)

  • use_iupac_formula (bool)

  • use_common_formulas (bool)

condense_structure(structure)

Condenses the structure into an intermediate dict representation.

Return type:

dict[str, Any]

Parameters:

structure (Structure)

Args:

structure: A pymatgen structure object.

Returns:

The condensed structure information. The data is formatted as a dict with a fixed set of keys. An up-to-date example of the, the condensed representation of MoS2 given in the documentation. See: robocrystallographer/docs_rst/source/format.rst or https://hackingmaterials.lbl.gov/robocrystallographer/format.html