httk.atomistic.symmetry.spacegroup¶
One identified space-group setting: its symbols, operations, and Wyckoff positions.
A Spacegroup is a setting, not a space-group type. SG 15 has eighteen tabulated
settings, and they are genuinely different coordinate systems: Wyckoff letter e is
0,y,1/4 in the reference setting 15:b1 but 1/4,0,z in 15:c1. Everything a
Spacegroup exposes — its symmetry operations, its Wyckoff table — is expressed in its
own setting’s coordinates.
ASUStructure normally holds its Wyckoff data directly against the
tabulated setting it uses. Conversion through SettingTransform is
reserved for operations that explicitly require the IT standard setting, or for an own
setting that is not tabulated.
Classes¶
Represent a tabulated space-group setting from the vendored symmetry data. |
Functions¶
|
Map standard-setting Wyckoff letters to their names in another setting. |
Module Contents¶
- class httk.atomistic.symmetry.spacegroup.Spacegroup(record)[source]¶
Represent a tabulated space-group setting from the vendored symmetry data.
- Parameters:
record (collections.abc.Mapping[str, Any]) – The read-only vendored mapping describing one space-group setting.
- classmethod standard(it_number)[source]¶
Return the IT standard setting for a space-group number.
- Parameters:
it_number (int) – The International Tables space-group number.
- Returns:
The IT standard setting for
it_number.- Return type:
Self
- classmethod from_hall_entry(hall_entry)[source]¶
Return the setting named by a normalized Hall symbol.
For example,
"-c_2yc"names one setting.- Parameters:
hall_entry (str) – The normalized Hall symbol naming the setting.
- Returns:
The corresponding space-group setting.
- Return type:
Self
- classmethod from_setting(setting_it_nc)[source]¶
Return the setting named by an IT number and coordinate-system code.
For example,
"15:c1"names one setting.- Parameters:
setting_it_nc (str) – The IT setting identifier.
- Returns:
The corresponding space-group setting.
- Return type:
Self
- classmethod from_hm_entry(hm_entry)[source]¶
Return the setting named by a Hermann-Mauguin entry.
For example,
"C 1 2/c 1"names one setting.- Parameters:
hm_entry (str) – The Hermann-Mauguin symbol naming the setting.
- Returns:
The corresponding space-group setting.
- Return type:
Self
- property record: collections.abc.Mapping[str, Any][source]¶
Return the raw vendored record for fields this class does not model.
- Returns:
The source record for this setting.
- Return type:
collections.abc.Mapping[str, Any]
- property it_number: int[source]¶
Return the International Tables space-group number.
- Returns:
The space-group number from 1 through 230.
- Return type:
- property setting: str[source]¶
Return the setting name, such as
"15:c1".- Returns:
The IT number and coordinate-system code.
- Return type:
- property hall_entry: str[source]¶
Return the normalized Hall symbol naming the setting unambiguously.
- Returns:
The normalized Hall symbol.
- Return type:
- property hall_symbol: str[source]¶
Return the Hall symbol as conventionally written.
- Returns:
The conventional Hall symbol.
- Return type:
- property hermann_mauguin: str[source]¶
Return the short Hermann-Mauguin symbol for this setting.
- Returns:
The short Hermann-Mauguin symbol.
- Return type:
- property hermann_mauguin_full: str[source]¶
Return the full Hermann-Mauguin symbol for this setting.
- Returns:
The full Hermann-Mauguin symbol.
- Return type:
- property crystal_system: str[source]¶
Return the crystal system, such as
"monoclinic".- Returns:
The crystal-system name.
- Return type:
- property centring_type: str[source]¶
Return the lattice centring letter, such as
"P","C", or"F".- Returns:
The centring letter.
- Return type:
- property is_standard_setting: bool[source]¶
Report whether this is the IT standard setting for its space-group number.
- Returns:
Whether this setting is the IT reference setting.
- Return type:
- property symmetry_operations: tuple[httk.atomistic.symmetry.affine_operation.AffineOperation, Ellipsis][source]¶
Return every symmetry operation of the group in this setting’s coordinates.
The full set with centring translations already folded in, so its length is the group order and no separate centring pass is needed.
- Returns:
The complete tuple of symmetry operations.
- Return type:
tuple[httk.atomistic.symmetry.affine_operation.AffineOperation, Ellipsis]
- property centering_translations: tuple[httk.core.FracVector, Ellipsis][source]¶
Return the lattice centring translations, including zero.
- Returns:
The centring translations in this setting.
- Return type:
tuple[httk.core.FracVector, Ellipsis]
- property wyckoff: tuple[httk.atomistic.symmetry.wyckoff.WyckoffPosition, Ellipsis][source]¶
Return the Wyckoff positions ordered most specific first.
Sorted by
(free_count, multiplicity, letter), so identifying a coordinate by walking this order returns the most specific position it lies on.- Returns:
The ordered Wyckoff positions for this setting.
- Return type:
tuple[httk.atomistic.symmetry.wyckoff.WyckoffPosition, Ellipsis]
- wyckoff_position(letter)[source]¶
Return the Wyckoff position with the given letter.
For example,
"e"selects the position with lettere.
- identify_wyckoff(coordinate)[source]¶
Identify the most specific Wyckoff position holding an exact coordinate.
Returns
Nonewhen the coordinate lies on no position, which for a complete table means the input was not an exact rational site of this group. Matching is exact: an approximate coordinate must be snapped first (seeASUStructure’s recognition path), never passed here in the hope that it lands.- Parameters:
coordinate (Any) – The exact reduced coordinate to identify.
- Returns:
The matching position and free parameters, or
Nonewhen no position matches exactly.- Return type:
tuple[httk.atomistic.symmetry.wyckoff.WyckoffPosition, httk.core.FracVector] | None
- property transform_from_standard: httk.atomistic.symmetry.setting_transform.SettingTransform[source]¶
Return the change of basis from the IT standard setting to this one.
The identity exactly when this is the standard setting.
- Returns:
The stored standard-to-own setting transform.
- Return type:
- httk.atomistic.symmetry.spacegroup.wyckoff_letter_map(standard, target)[source]¶
Map standard-setting Wyckoff letters to their names in another setting.
Almost always the identity — but not always, and the exception is silent. Across all 3210 non-reference
(setting, letter)pairs in the vendored tables, exactly one setting permutes letters: in224:1the standard setting’sjis that setting’siand vice versa. So a CIF that declares site24iin setting224:1does not mean standard-setting letteri, and taking the letter at face value across a setting boundary produces the wrong structure with no error.Computed rather than hard-coded, so it survives a data refresh: each standard position is evaluated at generic parameters, mapped through the setting transform, and identified in the target’s own Wyckoff table.
- Parameters:
standard (Spacegroup) – The IT standard setting whose letters are being mapped.
target (Spacegroup) – The setting receiving the mapped letters.
- Returns:
A mapping from standard-setting letters to target-setting letters.
- Raises:
ValueError – If the settings belong to different space groups or the mapping is not bijective.
- Return type: