LocalConfiguration#

class libcasm.local_configuration.LocalConfiguration(
configuration: Configuration,
pos: tuple[int, int],
event_info: OccEventSymInfo,
)[source]#

Bases: object

An OccEvent-Configuration pair

The position of an OccEvent with respect to a Configuration is represented by a pos tuple with two integers, as (unitcell_index, equivalent_index).

The equivalent_index specifies the event orientation as the index into the orbit of equivalent events associated with the origin unit cell (libcasm.enumerate.OccEventPrimSymInfo.events()), and the unitcell_index specifies the unit cell in the supercell where the event is located (as the translation UnitCellIndexConverter.unitcell(unitcell_index)).

Conversions between OccEvent and pos can be most easily done using for a particular supercell using OccEventSupercellSymInfo.coordinate and OccEventSupercellSymInfo.event.

The equivalent_index should be used as an index into libcasm.enumerate.OccEventPrimSymInfo.events()

Special Methods

The multiplication operator X = lhs * rhs can be used to apply SupercellSymOp to LocalConfiguration:

  • X=LocalConfiguration, lhs=SupercellSymOp, rhs=LocalConfiguration: Copy and transform the event and configuration, returning the transformed LocalConfiguration, such that X.configuration == lhs * rhs.configuration, and X.pos is the position of the transformed event, standardized and within the supercell.

Sort and compare LocalConfiguration:

  • LocalConfiguration can be sorted using <, <=, >, >=, and compared using ==, !=:

Additional methods:

  • LocalConfiguration may be copied with LocalConfiguration.copy, copy.copy, or copy.deepcopy.

Constructor

Parameters:
  • configuration (Configuration) – The configuration.

  • pos (tuple[int, int]) – The position of the phenomenal cluster or event in the supercell, as (unitcell_index, equivalent_index).

  • event_info (OccEventSymInfo) – Information about the OccEvent with respect to the supercell, which defines the meaning of the pos attribute and can be shared for all LocalConfiguration with the same type of event.

Methods

copy

Return a copy of the LocalConfiguration.

from_dict

Construct the LocalConfiguration from a Python dict

from_event

Convert a OccEvent and Configuration to a LocalConfiguration.

to_dict

Represent the LocalConfiguration as a Python dict

Attributes

event

The OccEvent associated with the LocalConfiguration, as determined from pos.

configuration

The configuration.

pos

The position of the phenomenal cluster or event in the supercell, as (unitcell_index, equivalent_index).

event_info

Information about the OccEvent