calculate_structure_factor#
- ReciprocalLatticeVector.calculate_structure_factor(scattering_params='xtables')[source]#
Populate
structure_factor
with the complex kinematical structure factor \(F_{hkl}\) for each vector.- Parameters:
scattering_params (str) – Which atomic scattering factors to use, either
"xtables"
(default) or"lobato"
.
Examples
See
ReciprocalLatticeVector
for the creation ofrlv
>>> rlv ReciprocalLatticeVector (2,), al (m-3m) [[1. 1. 1.] [2. 0. 0.]]
A unit cell with all asymmetric atom positions is required to calculate structure factors
>>> rlv.phase.structure [Al 0.000000 0.000000 1.000000 1.0000] >>> rlv.sanitise_phase() >>> rlv.phase.structure [Al 0.000000 0.000000 0.000000 1.0000, Al 0.000000 0.500000 0.500000 1.0000, Al 0.500000 0.000000 0.500000 1.0000, Al 0.500000 0.500000 0.000000 1.0000]
>>> rlv.calculate_structure_factor() >>> rlv.structure_factor array([8.46881663-1.55569638e-15j, 7.04777513-8.63103525e-16j])
Default atomic scattering factors are from the International Tables of Crystallography Vol. C Table 4.3.2.3. Alternative scattering factors are available from Lobato and Van Dyck Acta Cryst. (2014). A70, 636-649 https://doi.org/10.1107/S205327331401643X
>>> rlv.calculate_structure_factor("lobato") >>> rlv.structure_factor array([8.44934816-1.55212008e-15j, 7.0387957 -8.62003862e-16j])