LocalConfiguration#
- class libcasm.local_configuration.LocalConfiguration(
- configuration: Configuration,
- pos: tuple[int, int],
- event_info: OccEventSymInfo,
Bases:
object
An OccEvent-Configuration pair
The position of an
OccEvent
with respect to aConfiguration
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 usingOccEventSupercellSymInfo.coordinate
andOccEventSupercellSymInfo.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 applySupercellSymOp
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
Return a copy of the LocalConfiguration.
Construct the LocalConfiguration from a Python dict
Convert a OccEvent and Configuration to a LocalConfiguration.
Represent the LocalConfiguration as a Python dict
Attributes
The OccEvent associated with the LocalConfiguration, as determined from pos.
The configuration.
The position of the phenomenal cluster or event in the supercell, as (unitcell_index, equivalent_index).
Information about the OccEvent