httk.atomistic.data¶
Vendored crystallographic symmetry datasets and their lookups.
Two datasets ship with httk-atomistic, both read through
DataLoader and both licensed CC BY 4.0 (see the adjacent
LICENSE and README.md for the full attribution):
symmetry_basics.json.gzOne record per space-group setting — 527 of them, of which 230 are flagged
is_reference_setting(the International Tables standard setting for their IT number). Each record is self-contained in its own setting: its symmetry operations, its Wyckoff table, and its asymmetric-unit region are all expressed in that setting’s coordinates. So SG 15 Wyckoff letterereads0,y,1/4in the reference setting15:b1but1/4,0,zin15:c1.spacegroup_setting_transforms.json.gzThe change-of-basis operation taking each setting to its IT standard setting, keyed on Hall entry, covering all 527 settings. See
setting_transform()for the direction convention, which is easy to get backwards.
Nothing here is read at import time. The first lookup triggers the load: ~0.4 s and
~12 MB resident for symmetry_basics, paid once per process and only if symmetry is
actually used. The transforms dataset is negligible.
Two field-choice traps worth stating once, because both fail silently:
Use
symopsandorbit, notsymops_mod_centeringandorbit_mod_centering. The former are the full sets with centering translations folded in, solen(orbit) == multiplicityholds; the_mod_centeringvariants are the factored forms and mixing the two in a set comparison misreports every centred group.orbit[0]follows the record’sfirst_orbit, which differs fromfirst_orbit_itain 180 of the 3440 Wyckoff entries. Both describe the same orbit, but only the latter matches what International Tables prints.
Functions¶
|
Every tabulated space-group setting, one record each (527 of them). |
|
The 32 crystallographic point groups, with their symmetry operations and character tables. |
|
The setting record identified by exactly one of the given keys. |
|
The IT standard (reference) setting for a space-group number, |
|
The setting spglib treats as its default for a space-group number. |
|
The IT numbers that have a tabulated standard setting: |
|
The change-of-basis operation between a setting and its IT standard setting. |
Package Contents¶
- httk.atomistic.data.spacegroup_settings() list[dict[str, Any]][source]¶
Every tabulated space-group setting, one record each (527 of them).
- httk.atomistic.data.point_groups() list[dict[str, Any]][source]¶
The 32 crystallographic point groups, with their symmetry operations and character tables.
- httk.atomistic.data.spacegroup_setting(*, hall_entry: str | None = None, setting_it_nc: str | None = None, hm_entry: str | None = None) dict[str, Any][source]¶
The setting record identified by exactly one of the given keys.
hall_entryis the normalized Hall symbol ("-c_2yc"),setting_it_ncthe IT number with coordinate-system code ("15:c1"), andhm_entrythe Hermann-Mauguin entry name ("C 1 2/c 1"). A Hall entry names a setting unambiguously — symbol, axes and origin — which is why it is the key the transform dataset uses.Raises
KeyErrorif the key is unknown, andTypeErrorunless exactly one key is given.
- httk.atomistic.data.standard_spacegroup_setting(it_number: int) dict[str, Any][source]¶
The IT standard (reference) setting for a space-group number,
1 <= it_number <= 230.This is the setting flagged
is_reference_settingand is the onesetting_transform()transforms to. Note it is not always spglib’s default setting: the two differ for the 24 space groups with two origin choices (48, 50, 59, 68, 70, 85, 86, 88, 125, 126, 129, 130, 133, 134, 137, 138, 141, 142, 201, 203, 222, 224, 227, 228) and agree for the other 206. Any interoperation with spglib must go through an explicit transform rather than assuming the two coincide.
- httk.atomistic.data.spglib_default_spacegroup_setting(it_number: int) dict[str, Any][source]¶
The setting spglib treats as its default for a space-group number.
This differs from
standard_spacegroup_setting()for the 24 space groups with two origin choices and coincides with it for the other 206, which is exactly why any code that hands coordinates to or takes them from spglib must transform explicitly rather than assume the two agree — the failure mode is a structure displaced by a fraction of a cell that still passes a symmetry check.
- httk.atomistic.data.standard_setting_it_numbers() list[int][source]¶
The IT numbers that have a tabulated standard setting:
[1, ..., 230].
- httk.atomistic.data.setting_transform(hall_entry: str) dict[str, Any][source]¶
The change-of-basis operation between a setting and its IT standard setting.
The returned record’s
affine_transformationholds an exact rationalmatrixMandvectorv. Direction matters and the field name is misleading: despite deriving from a table calledhall_to_it_std_transform, the pair maps standard-setting coordinates into this setting, as column vectors:x_own = M @ x_std + v
Under httk’s row-vector convention that is
f_own = f_std @ M.T + v, with the reversef_std = (f_own - v) @ inv(M).Tand cell basis rows transforming asB_own = inv(M).T @ B_std. Applying it backwards yields a structurally valid but systematically wrong crystal.Mis unimodular for 520 of the 527 settings. The exceptions are the seven rhombohedral-axes settings (IT numbers 146, 148, 155, 160, 161, 166, 167), wheredet M == 3because the standard hexagonal cell has three times the volume of the rhombohedral one — and correspondinglyinv(M)has thirds, so nothing may assume the reverse transform is integral.