pyextal.potentialMap.structureFactors¶
Refined structure factors, extended over a beam set by symmetry.
A refinement run stores structure factors only for the reflections it refined. A map needs a value for every beam it sums, so each beam is resolved, in order:
refined: the beam is symmetry-equivalent to a refined reflection. Its value is the refined one times the translation phase between the two (a glide or screw axis shifts the phase of equivalent beams, Waser, Acta Cryst. 1955; the same convention as pyextal.symmetry.GroupSymmetry).friedel: the beam’s Friedel mate -g is case 1, so F(g) = conj(F(-g)).model: anything else takes the model value – by default the.dat’s own structure factor (pyextal.callBloch.lookupSF).
With symmetry_constraint='Friedel' there is no space-group grouping: a
refined value applies to its own hkl and, conjugated, to -hkl.
Classes¶
One layer's refined structure factors, resolvable for any beam. |
|
The crystal a run was refined against, loaded into the Bloch engine. |
Functions¶
|
Cartesian direct-lattice vectors (rows a, b, c) in Angstrom. |
|
Phase of F(hkl) relative to its symmetry group's first member. |
|
Parses the run's |
Module Contents¶
- pyextal.potentialMap.structureFactors.lattice_vectors(cell)¶
Cartesian direct-lattice vectors (rows a, b, c) in Angstrom.
a along x, b in the xy plane – the convention VESTA and VASP use.
- Parameters:
cell (sequence) – a, b, c (Angstrom), alpha, beta, gamma (degrees).
- Returns:
(3, 3), one lattice vector per row.
- Return type:
np.ndarray
- pyextal.potentialMap.structureFactors._translation_phase(sym, hkl)¶
Phase of F(hkl) relative to its symmetry group’s first member.
F(hkl) = F(group[0]) * exp(1j * phase). Computed from the symmetry operations rather than read fromsym.phaseDict, which only holds beams that occur in the Ugh table.
- class pyextal.potentialMap.structureFactors.LayerSF¶
One layer’s refined structure factors, resolvable for any beam.
- Variables:
gvectors (np.ndarray) – (n, 3) refined reflections.
sf (np.ndarray) – (n, 4)
[xfre, xfim, afre, afim], physical units.sym (GroupSymmetry or None) – Space-group grouping; None for Friedel only.
layer (int) – Layer index in the run.
- gvectors: numpy.ndarray¶
- sf: numpy.ndarray¶
- sym: object = None¶
- layer: int = 0¶
- _lookup: dict = None¶
- __post_init__()¶
- _refined(g)¶
F(g) from the refined set, or None.
- resolve(beams, model_sf=None)¶
Electron structure factor (elastic part) for each beam.
- Parameters:
beams (array-like) – (n, 3) Miller indices.
model_sf (np.ndarray, optional) – (n, 4)
lookupSFformat (amplitude, phase in degrees, …) for the beams that are neither refined nor Friedel mates of refined ones. Defaults tolookupSF(beams).
- Returns:
(F, source)– complex (n,) and a str array (n,) of ‘refined’, ‘friedel’ or ‘model’.- Return type:
tuple
- class pyextal.potentialMap.structureFactors.MapContext¶
The crystal a run was refined against, loaded into the Bloch engine.
- Variables:
run (RefinedRun) – The refinement run.
dat (Path) – The
.datthat was parsed.beams (np.ndarray) – (n, 3) the
.dat’s beams, (0,0,0) excluded.sym (GroupSymmetry or None) – Grouping of those beams, or None for a Friedel-only run.
cell (np.ndarray) – a, b, c, alpha, beta, gamma.
lattice (np.ndarray) – (3, 3) Cartesian lattice vectors (rows).
metric (np.ndarray) – (3, 3) direct metric tensor, Angstrom^2.
volume (float) – Cell volume, Angstrom^3.
kv (float) – Accelerating voltage in volts, from the
.dat.
- run: object¶
- dat: pathlib.Path¶
- beams: numpy.ndarray¶
- sym: object¶
- cell: numpy.ndarray¶
- lattice: numpy.ndarray¶
- metric: numpy.ndarray¶
- volume: float¶
- kv: float¶
- layer(i=0)¶
The LayerSF of layer
i.
- pyextal.potentialMap.structureFactors.setup(run, dat=None, symmetry=None)¶
Parses the run’s
.datand groups its beams by symmetry.- Parameters:
run (RefinedRun) – From pyextal.hdf5io.load_refinement_run.
dat (path-like, optional) – The
.datto use. Defaults to the one embedded in the run (pyextal.hdf5io.dat_for).symmetry (str, optional) – ‘SpaceGroup’ or ‘Friedel’. Defaults to the run’s
symmetry_constraint.
- Returns:
MapContext