to_structure#

ConfigurationWithProperties.to_structure(
self: ConfigurationWithProperties,
converter: str = 'atomic',
atom_type_naming_method: str = 'chemical_name',
excluded_species: collections.abc.Sequence[str] = ['Va', 'VA', 'va'],
) Structure#

Construct a Structure from a ConfigurationWithProperties

Parameters:
  • converter (str = "atomic") –

    The converter to use for generating the structure. Options are currently limited to one:

    • ”atomic”: Conversion is supported for configurations with prim that only have atomic occupants and generates structure with only atom types and properties. Fixed species properties of occupants other than “<flavor>magspin” and “selectivedynamics” are ignored.

      If “disp” is a degree of freedom (DoF), it is included in the structure’s atomic coordinates, but not included in the structure’s atom properties. If strain is a DoF, it is included in the structure’s atomic coordinates, and the structure’s lattice vectors, and not included in the structure’s global properties. Other DoF are copied to the structure’s atom or global properties.

      The deformation gradient applied to ideal lattice vectors is obtained from one of the following, in order of preference:

      1. Strain DoF (this is not copied to the structure’s global properties)

      2. ”Ustrain” in global_properties (this is copied to the structure’s global properties)

      3. The identify matrix, I

      If the prim has discrete magnetic states, due to occupants that have “<flavor>magspin” as an AtomComponent property, then “<flavor>magspin” is included in the atom properties. Any occupants that do not have “<flavor>magspin” as an AtomComponent property are given a value of [0] (for collinear flavors) or [0, 0, 0] (for non-collinear flavors).

      If any prim occupant has “selectivedynamics” as an AtomComponent property, then the output structure will have “selectivedynamics” in its atom properties. The default value for occupants without an explicitly specified “selectivedynamics” AtomComponent property is [0.0, 0.0, 0.0].

  • atom_type_naming_method (str = "chemical_name") –

    Specifies how Structure.atom_type values are set. Options are:

    • ”chemical_name” (default): use occupant.name(), where occupant is the Occupant occupying the site

    • ”orientation_name”: uses occ_dof[b][s], where occ_dof are the labels (‘orientation names’) of occupants obtained from occ_dof(), b is the sublattice index of the site, and s is the occupation index.

  • excluded_species (list[str] = ["Va", "VA", "va"]) – The names of any molecular or atomic species that should not be included in the output.

Returns:

structure – The Structure constructed from the ConfigurationWithProperties.

Return type:

Structure