PbSO4 tutorial: indexing, spacegroup determination & structure solution

In this notebook, you can: * Load the powder diffraction data and create the PowderPattern object, for two diffrection patterns (X-ray and neutron) * Find the diffraction peaks and index them (determine the unit cell) * Perform a profile fit to optimise the background and reflection profiles * Determine the spacegroup * Add a molecule to describe the contents of the Crystal structure * Solve the Crystal structure using a Monte-Carlo/Parallel tempering algorithm, using both X-ray and neutron diffraction patterns * Save the best result to a CIF file and to Fox .xmlgz format

Notes: * This is a simple case, which illustrates the possibility of joint X-ray/neutron optimisation. * It is important to follow the steps relatively linearly and avoid going back to previous cells until you know better. For example to avoid adding multiple times Scatterer/Molecule objects in the crystal structure, or multiple crystalline phases to the powder pattern with the same crystal, etc…

Imports

[1]:
# 'widget' allows live update and works in both classical notebooks and jupyter-lab.
# Otherwise 'notebook', 'ipympl', 'inline' can be used
%matplotlib widget

import os
import pyobjcryst
import numpy as np
import matplotlib.pyplot as plt
from pyobjcryst.crystal import *
from pyobjcryst.scatteringpower import ScatteringPowerAtom
from pyobjcryst.atom import Atom
from pyobjcryst.polyhedron import MakeTetrahedron
from pyobjcryst.powderpattern import *
from pyobjcryst.radiation import RadiationType
from pyobjcryst.indexing import *
from pyobjcryst.molecule import *
from pyobjcryst.globaloptim import MonteCarlo
from pyobjcryst.io import xml_cryst_file_save_global

Create powder pattern object, download data if necessary

We start with the X-ray data which will be used to determine the unit cell and spacegroup.

[2]:
px = PowderPattern()
if not os.path.exists("pbso4-x.dat"):
    os.system("curl -o pbso4-x.dat https://raw.githubusercontent.com/vincefn/objcryst/master/Fox/example/tutorial-pbso4/xray.dat")
px.ImportPowderPatternFullprof("pbso4-x.dat")
px.SetWavelength("Cu")  # Valid strings for X-ray tubes are "Cu", "CuA1",...
print(px.GetRadiation()) # Better check the string was understood
px.plot()
Radiation: X-Ray,Wavelength= tube: Cu, Alpha1/Alpha2= 0.5Imported powder pattern: 6001 points, 2theta= 10.000 -> 160.000, step= 0.025

Find peaks & index the reflections

In this case the peaks are automatically found without any parasitic phase.

And the unit cell is also indexed without any ambiguity. This uses the dichotomy in volume approach (Louër & Boultif).

… It is not always that easy !

[3]:
# Index
pl = px.FindPeaks(1.5, -1, 1000)
if len(pl) > 20:
    pl.resize(20)  # Only keep 20 peaks
for peak in pl:
    print(peak)

ex = quick_index(pl)

print("Solutions:")
for s in ex.GetSolutions():
    print(s)
Peak dobs=0.23410+/-0.00049 iobs=5.631088e+04 (? ? ?))
Peak dobs=0.26180+/-0.00049 iobs=3.661422e+04 (? ? ?))
Peak dobs=0.27573+/-0.00048 iobs=1.369719e+04 (? ? ?))
Peak dobs=0.28690+/-0.00041 iobs=2.120413e+04 (? ? ?))
Peak dobs=0.29939+/-0.00048 iobs=5.965503e+04 (? ? ?))
Peak dobs=0.31016+/-0.00048 iobs=4.475041e+04 (? ? ?))
Peak dobs=0.33210+/-0.00048 iobs=6.886522e+04 (? ? ?))
Peak dobs=0.36110+/-0.00048 iobs=2.483898e+04 (? ? ?))
Peak dobs=0.36997+/-0.00047 iobs=3.424055e+04 (? ? ?))
Peak dobs=0.38119+/-0.00047 iobs=6.008678e+03 (? ? ?))
Peak dobs=0.41488+/-0.00047 iobs=1.116247e+04 (? ? ?))
Peak dobs=0.43867+/-0.00047 iobs=1.291596e+04 (? ? ?))
Peak dobs=0.44637+/-0.00047 iobs=3.054905e+03 (? ? ?))
Peak dobs=0.45514+/-0.00046 iobs=3.965780e+03 (? ? ?))
Peak dobs=0.46161+/-0.00046 iobs=1.755345e+04 (? ? ?))
Peak dobs=0.46832+/-0.00046 iobs=3.017849e+03 (? ? ?))
Peak dobs=0.48313+/-0.00053 iobs=5.114404e+04 (? ? ?))
Peak dobs=0.49213+/-0.00052 iobs=3.115425e+04 (? ? ?))
Peak dobs=0.50613+/-0.00046 iobs=1.278484e+04 (? ? ?))
Peak dobs=0.53141+/-0.00045 iobs=3.895334e+03 (? ? ?))
Predicting volumes from 20 peaks between d=42.716 and d= 1.882

Starting indexing using 20 peaks
      CUBIC P : V=    407 ->   4545 A^3, max length= 49.70A
 ->   0 sols in   0.00s, best score=   0.0

 TETRAGONAL P : V=    151 ->   1089 A^3, max length= 30.86A
 ->   0 sols in   0.01s, best score=   0.0

RHOMBOEDRAL P : V=    167 ->   1143 A^3, max length= 31.36A
 ->   0 sols in   0.00s, best score=   0.0

  HEXAGONAL P : V=    206 ->   1507 A^3, max length= 34.39A
 ->   0 sols in   0.01s, best score=   0.0

ORTHOROMBIC P : V=     88 ->    565 A^3, max length= 25.00A
 ->   1 sols in   0.01s, best score=  57.5

 MONOCLINIC P : V=     65 ->    364 A^3, max length= 25.00A
 ->   3 sols in   0.07s, best score=  56.5

Solutions:
( 5.40  6.97  8.49  90.0  90.0  90.0 V= 320 ORTHOROMBIC P, 63.80767059326172)
( 5.40  8.49  6.97  90.0  90.0  90.0 V= 320 MONOCLINIC P, 61.222660064697266)
( 6.97  5.40  8.49  90.0  90.0  90.0 V= 320 MONOCLINIC P, 57.77278137207031)

Create a crystal phase using the indexed unit cell

[4]:
uc = ex.GetSolutions()[0][0].DirectUnitCell()
c = pyobjcryst.crystal.Crystal(uc[0], uc[1], uc[2], uc[3], uc[4], uc[5], "P1")
pdiff = px.AddPowderPatternDiffraction(c)

# Plot with indexing in new figure
px.plot(diff=False,fig=None,hkl=True)

Fit the profile and background

We use a maximum sin(theta)/lambda because we don’t really need high angle/high resolution data.

This will go faster and is more reliable for spacegroup indexing and structure solution.

[5]:
px.SetMaxSinThetaOvLambda(0.3)
px.quick_fit_profile(auto_background=True,plot=False, init_profile=True,verbose=True)
px.quick_fit_profile(plot=False, init_profile=False, asym=True, displ_transl=True, verbose=False)

# Plot in new figure
px.plot(diff=True, fig=None, hkl=True)
print("Fit result: Rw=%6.2f%% Chi2=%10.2f  GoF=%8.2f  LLK=%10.3f" %
      (px.rw * 100, px.chi2, px.chi2/px.GetNbPointUsed(), px.llk))
No background, adding one automatically
Selected PowderPatternDiffraction:    with Crystal:
Profile fitting finished.
Remember to use SetExtractionMode(False) on the PowderPatternDiffraction object
to disable profile fitting and optimise the structure.
Fit result: Rw=  7.91% Chi2=   7415.97  GoF=    1.24  LLK=  1116.695

Find the spacegroup

The SpaceGroupExplorer can be used to find the optimal spacegroup.

What RunAll() does is try all spacegroups and settings which are compatible with the unit cell (in this case all monoclinic and triclinic), and perform a profile fit (Le Bail only, we don’t refine profile parameters or background since these parameters should be OK).

From this several values are extracted for each spacegroup setting: * Rw - the standard full-profile weighted R factor \(R_{wp}\) * GoF: the chi2 (full profile \(\chi^2=\Sigma\frac{(obs-calc)^2}{\sigma^2}\)) divided by the number of points used * nGoF: this is the Goodness-of-Fit, but computed on integration intervals defined by P1 reflections, and then multipled by the number of reflections used divided by the number of reflections for the P1 spacegroup. This is more discriminating and allows to put forward spacegroups which yield a good fit with more extinctions. * reflections is the number of reflections actually taken into account for this spacegroup up to the maximum sin(theta)/lambda * extinct446 gives the number of extinct reflections for 0<=H<=4 0<=K<=4 0<=L<=6 (which is used internally as a unique fingerprint for the extinctions)

Some C++ verbose output does not appear here but will be in the jupyter server log if you see it.

The results are sorting by ascending nGOF

Unfortunately in this case the correct spacegroup (Pcmn, or Pnma if the axis were exchanged) is only one among possible choices (P21cn has the same extinctions), so we’ll select it but in a real case, the different possible spacegroups would need to be tested.

[6]:
#px.SetMaxSinThetaOvLambda(0.3)  # This can be used to change the number of used reflections
spgex = SpaceGroupExplorer(pdiff)

# NB:verbose C++ output does not appear in a notebook
spgex.RunAll(keep_best=True, update_display=False, fitprofile_p1=False)

for sol in spgex.GetScores():
    #if sol.nGoF > 4 * spgex.GetScores()[0].nGoF:
    if sol.GoF <= 2 * spgex.GetScores()[0].GoF:
        print(sol)

c.GetSpaceGroup().ChangeSpaceGroup("Pmcn")
print("Chosen spacegroup (smallest nGoF): ", c.GetSpaceGroup())

# Updated plot with optimal spacegroup
px.plot(diff=True, fig=None, hkl=True, reset=True)
P 21 c n      nGoF=   0.6682 GoF=   6.438 Rw= 9.95 [ 49 reflections, extinct446= 27]Beginning spacegroup exploration... 348 to go...
  (#  1) P 1           : Rwp=  9.82%  GoF=     6.50  nGoF=     1.80  (164 reflections,   0 extinct)
  (#  2) P -1          : Rwp=  9.82%  GoF=     6.50  nGoF=     1.80  (164 reflections,   0 extinct) [same extinctions as:P 1]
  (#  3) P 1 2 1       : Rwp= 10.16%  GoF=     6.85  nGoF=     1.18  ( 99 reflections,   0 extinct)
  (#  3) P 1 1 2       : Rwp= 10.04%  GoF=     6.67  nGoF=     1.08  ( 96 reflections,   0 extinct)
  (#  3) P 2 1 1       : Rwp= 10.37%  GoF=     7.12  nGoF=     1.25  (101 reflections,   0 extinct)
  (#  4) P 1 21 1      : Rwp= 10.40%  GoF=     7.16  nGoF=     1.16  ( 97 reflections,   2 extinct)
  (#  4) P 1 1 21      : Rwp= 10.29%  GoF=     6.99  nGoF=     1.16  ( 93 reflections,   3 extinct)
  (#  4) P 21 1 1      : Rwp= 10.31%  GoF=     7.03  nGoF=     1.19  ( 99 reflections,   2 extinct)
  (#  5) C 1 2 1       : Rwp= 67.21%  GoF=   303.80  nGoF=    73.57  ( 47 reflections,  84 extinct)
  (#  5) A 1 2 1       : Rwp= 84.58%  GoF=   475.12  nGoF=   131.08  ( 49 reflections,  85 extinct)
  (#  5) I 1 2 1       : Rwp= 72.33%  GoF=   338.02  nGoF=    95.93  ( 48 reflections,  87 extinct)
  (#  5) A 1 1 2       : Rwp= 84.41%  GoF=   472.15  nGoF=   125.00  ( 47 reflections,  85 extinct)
  (#  5) B 1 1 2       : Rwp= 71.09%  GoF=   327.08  nGoF=    90.41  ( 48 reflections,  85 extinct)
  (#  5) I 1 1 2       : Rwp= 72.10%  GoF=   335.86  nGoF=    91.74  ( 46 reflections,  87 extinct)
  (#  5) B 2 1 1       : Rwp= 71.03%  GoF=   325.79  nGoF=    94.20  ( 50 reflections,  85 extinct)
  (#  5) C 2 1 1       : Rwp= 67.37%  GoF=   305.42  nGoF=    75.30  ( 48 reflections,  84 extinct)
  (#  5) I 2 1 1       : Rwp= 72.35%  GoF=   338.01  nGoF=    97.98  ( 49 reflections,  87 extinct)
  (#  6) P 1 m 1       : Rwp= 10.16%  GoF=     6.85  nGoF=     1.18  ( 99 reflections,   0 extinct) [same extinctions as:P 1 2 1]
  (#  6) P 1 1 m       : Rwp= 10.04%  GoF=     6.67  nGoF=     1.08  ( 96 reflections,   0 exti
P m c n       nGoF=   0.6682 GoF=   6.438 Rw= 9.95 [ 49 reflections, extinct446= 27]
P 21 m n      nGoF=   0.7431 GoF=   7.453 Rw=10.69 [ 58 reflections, extinct446= 12]
P m 21 n      nGoF=   0.7431 GoF=   7.453 Rw=10.69 [ 58 reflections, extinct446= 12]
P m m n :1    nGoF=   0.7431 GoF=   7.453 Rw=10.69 [ 58 reflections, extinct446= 12]
P m m n :2    nGoF=   0.7431 GoF=   7.453 Rw=10.69 [ 58 reflections, extinct446= 12]
P 21 21 2     nGoF=   0.7575 GoF=   7.435 Rw=10.67 [ 62 reflections, extinct446=  4]
P 21 21 21    nGoF=   0.7727 GoF=   6.459 Rw= 9.95 [ 59 reflections, extinct446=  7]
P 21 2 2      nGoF=   0.7771 GoF=   7.129 Rw=10.44 [ 64 reflections, extinct446=  2]
P m c 21      nGoF=   0.7777 GoF=   7.476 Rw=10.70 [ 57 reflections, extinct446= 15]
P 2 c m       nGoF=   0.7777 GoF=   7.476 Rw=10.70 [ 57 reflections, extinct446= 15]
P m c m       nGoF=   0.7777 GoF=   7.476 Rw=10.70 [ 57 reflections, extinct446= 15]
P 2 21 2      nGoF=   0.8000 GoF=   7.497 Rw=10.71 [ 64 reflections, extinct446=  2]
P 2 21 21     nGoF=   0.8162 GoF=   6.520 Rw= 9.99 [ 61 reflections, extinct446=  5]
P 21 2 21     nGoF=   0.8201 GoF=   7.462 Rw=10.69 [ 61 reflections, extinct446=  5]
P 2 2 2       nGoF=   0.8202 GoF=   7.192 Rw=10.48 [ 66 reflections, extinct446=  0]
P m m 2       nGoF=   0.8202 GoF=   7.192 Rw=10.48 [ 66 reflections, extinct446=  0]
P 2 m m       nGoF=   0.8202 GoF=   7.192 Rw=10.48 [ 66 reflections, extinct446=  0]
P m 2 m       nGoF=   0.8202 GoF=   7.192 Rw=10.48 [ 66 reflections, extinct446=  0]
P m m m       nGoF=   0.8202 GoF=   7.192 Rw=10.48 [ 66 reflections, extinct446=  0]
P 2 2 21      nGoF=   0.8650 GoF=   7.526 Rw=10.73 [ 63 reflections, extinct446=  3]
P 1 1 n       nGoF=   0.9768 GoF=   6.931 Rw=10.26 [ 84 reflections, extinct446= 12]
P 1 1 2/n     nGoF=   0.9768 GoF=   6.931 Rw=10.26 [ 84 reflections, extinct446= 12]
P 1 1 21/n    nGoF=   1.0128 GoF=   5.934 Rw= 9.50 [ 81 reflections, extinct446= 15]
P 1 21/c 1    nGoF=   1.0460 GoF=   6.099 Rw= 9.62 [ 82 reflections, extinct446= 17]
P 1 1 2       nGoF=   1.0782 GoF=   6.667 Rw=10.04 [ 96 reflections, extinct446=  0]
P 1 1 m       nGoF=   1.0782 GoF=   6.667 Rw=10.04 [ 96 reflections, extinct446=  0]
P 1 1 2/m     nGoF=   1.0782 GoF=   6.667 Rw=10.04 [ 96 reflections, extinct446=  0]
P 1 c 1       nGoF=   1.0998 GoF=   7.112 Rw=10.38 [ 84 reflections, extinct446= 15]
P 1 2/c 1     nGoF=   1.0998 GoF=   7.112 Rw=10.38 [ 84 reflections, extinct446= 15]
P 1 21 1      nGoF=   1.1596 GoF=   7.159 Rw=10.40 [ 97 reflections, extinct446=  2]
P 1 21/m 1    nGoF=   1.1596 GoF=   7.159 Rw=10.40 [ 97 reflections, extinct446=  2]
P 1 1 21      nGoF=   1.1633 GoF=   6.993 Rw=10.29 [ 93 reflections, extinct446=  3]
P 1 1 21/m    nGoF=   1.1633 GoF=   6.993 Rw=10.29 [ 93 reflections, extinct446=  3]
P 1 2 1       nGoF=   1.1767 GoF=   6.850 Rw=10.16 [ 99 reflections, extinct446=  0]
P 1 m 1       nGoF=   1.1767 GoF=   6.850 Rw=10.16 [ 99 reflections, extinct446=  0]
P 1 2/m 1     nGoF=   1.1767 GoF=   6.850 Rw=10.16 [ 99 reflections, extinct446=  0]
P 21 1 1      nGoF=   1.1896 GoF=   7.025 Rw=10.31 [ 99 reflections, extinct446=  2]
P 21/m 1 1    nGoF=   1.1896 GoF=   7.025 Rw=10.31 [ 99 reflections, extinct446=  2]
P 2 1 1       nGoF=   1.2487 GoF=   7.121 Rw=10.37 [101 reflections, extinct446=  0]
P m 1 1       nGoF=   1.2487 GoF=   7.121 Rw=10.37 [101 reflections, extinct446=  0]
P 2/m 1 1     nGoF=   1.2487 GoF=   7.121 Rw=10.37 [101 reflections, extinct446=  0]
P 1           nGoF=   1.7960 GoF=   6.503 Rw= 9.82 [164 reflections, extinct446=  0]
P -1          nGoF=   1.7960 GoF=   6.503 Rw= 9.82 [164 reflections, extinct446=  0]
nct) [same extinctions as:P 1 1 2]
  (#  6) P m 1 1       : Rwp= 10.37%  GoF=     7.12  nGoF=     1.25  (101 reflections,   0 extinct) [same extinctions as:P 2 1 1]
  (#  7) P 1 c 1       : Rwp= 10.38%  GoF=     7.11  nGoF=     1.10  ( 84 reflections,  15 extinct)
  (#  7) P 1 n 1       : Rwp= 38.27%  GoF=    96.35  nGoF=    46.21  ( 84 reflections,  17 extinct)
  (#  7) P 1 a 1       : Rwp= 43.45%  GoF=   124.43  nGoF=    51.91  ( 83 reflections,  14 extinct)
  (#  7) P 1 1 a       : Rwp= 33.13%  GoF=    72.23  nGoF=    27.48  ( 84 reflections,  10 extinct)
  (#  7) P 1 1 n       : Rwp= 10.26%  GoF=     6.93  nGoF=     0.98  ( 84 reflections,  12 extinct)
  (#  7) P 1 1 b       : Rwp= 33.20%  GoF=    72.53  nGoF=    27.49  ( 84 reflections,  10 extinct)
  (#  7) P b 1 1       : Rwp= 33.53%  GoF=    73.78  nGoF=    25.85  ( 83 reflections,  14 extinct)
  (#  7) P n 1 1       : Rwp= 33.67%  GoF=    74.39  nGoF=    33.08  ( 84 reflections,  17 extinct)
  (#  7) P c 1 1       : Rwp= 38.44Chosen spacegroup (smallest nGoF):  P m c n
%  GoF=    96.88  nGoF=    39.45  ( 82 reflections,  15 extinct)
  (#  8) C 1 m 1       : Rwp= 67.21%  GoF=   303.80  nGoF=    73.57  ( 47 reflections,  84 extinct) [same extinctions as:C 1 2 1]
  (#  8) A 1 m 1       : Rwp= 84.58%  GoF=   475.12  nGoF=   131.08  ( 49 reflections,  85 extinct) [same extinctions as:A 1 2 1]
  (#  8) I 1 m 1       : Rwp= 72.33%  GoF=   338.02  nGoF=    95.93  ( 48 reflections,  87 extinct) [same extinctions as:I 1 2 1]
  (#  8) A 1 1 m       : Rwp= 84.41%  GoF=   472.15  nGoF=   125.00  ( 47 reflections,  85 extinct) [same extinctions as:A 1 1 2]
  (#  8) B 1 1 m       : Rwp= 71.09%  GoF=   327.08  nGoF=    90.41  ( 48 reflections,  85 extinct) [same extinctions as:B 1 1 2]
  (#  8) I 1 1 m       : Rwp= 72.10%  GoF=   335.86  nGoF=    91.74  ( 46 reflections,  87 extinct) [same extinctions as:I 1 1 2]
  (#  8) B m 1 1       : Rwp= 71.03%  GoF=   325.79  nGoF=    94.20  ( 50 reflections,  85 extinct) [same extinctions as:B 2 1 1]
  (#  8) C m 1 1       : Rwp= 67.37%  GoF=   305.42  nGoF=    75.30  ( 48 reflections,  84 extinct) [same extinctions as:C 2 1 1]
  (#  8) I m 1 1       : Rwp= 72.35%  GoF=   338.01  nGoF=    97.98  ( 49 reflections,  87 extinct) [same extinctions as:I 2 1 1]
  (#  9) C 1 c 1       : Rwp= 64.29%  GoF=   276.98  nGoF=    60.10  ( 40 reflections,  93 extinct)
  (#  9) A 1 n 1       : Rwp= 85.31%  GoF=   481.19  nGoF=   113.30  ( 41 reflections,  93 extinct)
  (#  9) I 1 a 1       : Rwp= 72.32%  GoF=   338.70  nGoF=    79.93  ( 40 reflections,  93 extinct)
  (#  9) A 1 a 1       : Rwp= 85.31%  GoF=   481.19  nGoF=   113.30  ( 41 reflections,  93 extinct) [same extinctions as:A 1 n 1]
  (#  9) C 1 n 1       : Rwp= 64.29%  GoF=   276.98  nGoF=    60.10  ( 40 reflections,  93 extinct) [same extinctions as:C 1 c 1]
  (#  9) I 1 c 1       : Rwp= 72.32%  GoF=   338.70  nGoF=    79.93  ( 40 reflections,  93 extinct) [same extinctions as:I 1 a 1]
  (#  9) A 1 1 a       : Rwp= 62.66%  GoF=   259.44  nGoF=    61.15  ( 41 reflections,  91 extinct)
  (#  9) B 1 1 n       : Rwp= 71.10%  GoF=   326.28  nGoF=    79.15  ( 42 reflections,  91 extinct)
  (#  9) I 1 1 b       : Rwp= 73.15%  GoF=   344.60  nGoF=    81.97  ( 40 reflections,  91 extinct)
  (#  9) B 1 1 b       : Rwp= 71.10%  GoF=   326.28  nGoF=    79.15  ( 42 reflections,  91 extinct) [same extinctions as:B 1 1 n]
  (#  9) A 1 1 n       : Rwp= 62.66%  GoF=   259.44  nGoF=    61.15  ( 41 reflections,  91 extinct) [same extinctions as:A 1 1 a]
  (#  9) I 1 1 a       : Rwp= 73.15%  GoF=   344.60  nGoF=    81.97  ( 40 reflections,  91 extinct) [same extinctions as:I 1 1 b]
  (#  9) B b 1 1       : Rwp= 72.77%  GoF=   340.69  nGoF=    83.67  ( 42 reflections,  93 extinct)
  (#  9) C n 1 1       : Rwp= 72.34%  GoF=   350.52  nGoF=    75.02  ( 39 reflections,  93 extinct)
  (#  9) I c 1 1       : Rwp= 73.91%  GoF=   351.19  nGoF=    80.65  ( 39 reflections,  93 extinct)
  (#  9) C c 1 1       : Rwp= 72.34%  GoF=   350.52  nGoF=    75.02  ( 39 reflections,  93 extinct) [same extinctions as:C n 1 1]
  (#  9) B n 1 1       : Rwp= 72.77%  GoF=   340.69  nGoF=    83.67  ( 42 reflections,  93 extinct) [same extinctions as:B b 1 1]
  (#  9) I b 1 1       : Rwp= 73.91%  GoF=   351.19  nGoF=    80.65  ( 39 reflections,  93 extinct) [same extinctions as:I c 1 1]
  (# 10) P 1 2/m 1     : Rwp= 10.16%  GoF=     6.85  nGoF=     1.18  ( 99 reflections,   0 extinct) [same extinctions as:P 1 2 1]
  (# 10) P 1 1 2/m     : Rwp= 10.04%  GoF=     6.67  nGoF=     1.08  ( 96 reflections,   0 extinct) [same extinctions as:P 1 1 2]
  (# 10) P 2/m 1 1     : Rwp= 10.37%  GoF=     7.12  nGoF=     1.25  (101 reflections,   0 extinct) [same extinctions as:P 2 1 1]
  (# 11) P 1 21/m 1    : Rwp= 10.40%  GoF=     7.16  nGoF=     1.16  ( 97 reflections,   2 extinct) [same extinctions as:P 1 21 1]
  (# 11) P 1 1 21/m    : Rwp= 10.29%  GoF=     6.99  nGoF=     1.16  ( 93 reflections,   3 extinct) [same extinctions as:P 1 1 21]
  (# 11) P 21/m 1 1    : Rwp= 10.31%  GoF=     7.03  nGoF=     1.19  ( 99 reflections,   2 extinct) [same extinctions as:P 21 1 1]
  (# 12) C 1 2/m 1     : Rwp= 67.21%  GoF=   303.80  nGoF=    73.57  ( 47 reflections,  84 extinct) [same extinctions as:C 1 2 1]
  (# 12) A 1 2/m 1     : Rwp= 84.58%  GoF=   475.12  nGoF=   131.08  ( 49 reflections,  85 extinct) [same extinctions as:A 1 2 1]
  (# 12) I 1 2/m 1     : Rwp= 72.33%  GoF=   338.02  nGoF=    95.93  ( 48 reflections,  87 extinct) [same extinctions as:I 1 2 1]
  (# 12) A 1 1 2/m     : Rwp= 84.41%  GoF=   472.15  nGoF=   125.00  ( 47 reflections,  85 extinct) [same extinctions as:A 1 1 2]
  (# 12) B 1 1 2/m     : Rwp= 71.09%  GoF=   327.08  nGoF=    90.41  ( 48 reflections,  85 extinct) [same extinctions as:B 1 1 2]
  (# 12) I 1 1 2/m     : Rwp= 72.10%  GoF=   335.86  nGoF=    91.74  ( 46 reflections,  87 extinct) [same extinctions as:I 1 1 2]
  (# 12) B 2/m 1 1     : Rwp= 71.03%  GoF=   325.79  nGoF=    94.20  ( 50 reflections,  85 extinct) [same extinctions as:B 2 1 1]
  (# 12) C 2/m 1 1     : Rwp= 67.37%  GoF=   305.42  nGoF=    75.30  ( 48 reflections,  84 extinct) [same extinctions as:C 2 1 1]
  (# 12) I 2/m 1 1     : Rwp= 72.35%  GoF=   338.01  nGoF=    97.98  ( 49 reflections,  87 extinct) [same extinctions as:I 2 1 1]
  (# 13) P 1 2/c 1     : Rwp= 10.38%  GoF=     7.11  nGoF=     1.10  ( 84 reflections,  15 extinct) [same extinctions as:P 1 c 1]
  (# 13) P 1 2/n 1     : Rwp= 38.27%  GoF=    96.35  nGoF=    46.21  ( 84 reflections,  17 extinct) [same extinctions as:P 1 n 1]
  (# 13) P 1 2/a 1     : Rwp= 43.45%  GoF=   124.43  nGoF=    51.91  ( 83 reflections,  14 extinct) [same extinctions as:P 1 a 1]
  (# 13) P 1 1 2/a     : Rwp= 33.13%  GoF=    72.23  nGoF=    27.48  ( 84 reflections,  10 extinct) [same extinctions as:P 1 1 a]
  (# 13) P 1 1 2/n     : Rwp= 10.26%  GoF=     6.93  nGoF=     0.98  ( 84 reflections,  12 extinct) [same extinctions as:P 1 1 n]
  (# 13) P 1 1 2/b     : Rwp= 33.20%  GoF=    72.53  nGoF=    27.49  ( 84 reflections,  10 extinct) [same extinctions as:P 1 1 b]
  (# 13) P 2/b 1 1     : Rwp= 33.53%  GoF=    73.78  nGoF=    25.85  ( 83 reflections,  14 extinct) [same extinctions as:P b 1 1]
  (# 13) P 2/n 1 1     : Rwp= 33.67%  GoF=    74.39  nGoF=    33.08  ( 84 reflections,  17 extinct) [same extinctions as:P n 1 1]
  (# 13) P 2/c 1 1     : Rwp= 38.44%  GoF=    96.88  nGoF=    39.45  ( 82 reflections,  15 extinct) [same extinctions as:P c 1 1]
  (# 14) P 1 21/c 1    : Rwp=  9.62%  GoF=     6.10  nGoF=     1.05  ( 82 reflections,  17 extinct)
  (# 14) P 1 21/n 1    : Rwp= 38.14%  GoF=    95.58  nGoF=    45.09  ( 82 reflections,  19 extinct)
  (# 14) P 1 21/a 1    : Rwp= 43.48%  GoF=   124.47  nGoF=    50.66  ( 81 reflections,  16 extinct)
  (# 14) P 1 1 21/a    : Rwp= 33.20%  GoF=    72.38  nGoF=    26.58  ( 81 reflections,  13 extinct)
  (# 14) P 1 1 21/n    : Rwp=  9.50%  GoF=     5.93  nGoF=     1.01  ( 81 reflections,  15 extinct)
  (# 14) P 1 1 21/b    : Rwp= 33.04%  GoF=    71.70  nGoF=    26.54  ( 81 reflections,  13 extinct)
  (# 14) P 21/b 1 1    : Rwp= 39.94%  GoF=   104.54  nGoF=    31.96  ( 81 reflections,  16 extinct)
  (# 14) P 21/n 1 1    : Rwp= 33.65%  GoF=    74.22  nGoF=    32.26  ( 82 reflections,  19 extinct)
  (# 14) P 21/c 1 1    : Rwp= 43.67%  GoF=   124.94  nGoF=    44.44  ( 80 reflections,  17 extinct)
  (# 15) C 1 2/c 1     : Rwp= 64.29%  GoF=   276.98  nGoF=    60.10  ( 40 reflections,  93 extinct) [same extinctions as:C 1 c 1]
  (# 15) A 1 2/n 1     : Rwp= 85.31%  GoF=   481.19  nGoF=   113.30  ( 41 reflections,  93 extinct) [same extinctions as:A 1 n 1]
  (# 15) I 1 2/a 1     : Rwp= 72.32%  GoF=   338.70  nGoF=    79.93  ( 40 reflections,  93 extinct) [same extinctions as:I 1 a 1]
  (# 15) A 1 2/a 1     : Rwp= 85.31%  GoF=   481.19  nGoF=   113.30  ( 41 reflections,  93 extinct) [same extinctions as:A 1 n 1]
  (# 15) C 1 2/n 1     : Rwp= 64.29%  GoF=   276.98  nGoF=    60.10  ( 40 reflections,  93 extinct) [same extinctions as:C 1 c 1]
  (# 15) I 1 2/c 1     : Rwp= 72.32%  GoF=   338.70  nGoF=    79.93  ( 40 reflections,  93 extinct) [same extinctions as:I 1 a 1]
  (# 15) A 1 1 2/a     : Rwp= 62.66%  GoF=   259.44  nGoF=    61.15  ( 41 reflections,  91 extinct) [same extinctions as:A 1 1 a]
  (# 15) B 1 1 2/n     : Rwp= 71.10%  GoF=   326.28  nGoF=    79.15  ( 42 reflections,  91 extinct) [same extinctions as:B 1 1 n]
  (# 15) I 1 1 2/b     : Rwp= 73.15%  GoF=   344.60  nGoF=    81.97  ( 40 reflections,  91 extinct) [same extinctions as:I 1 1 b]
  (# 15) B 1 1 2/b     : Rwp= 71.10%  GoF=   326.28  nGoF=    79.15  ( 42 reflections,  91 extinct) [same extinctions as:B 1 1 n]
  (# 15) A 1 1 2/n     : Rwp= 62.66%  GoF=   259.44  nGoF=    61.15  ( 41 reflections,  91 extinct) [same extinctions as:A 1 1 a]
  (# 15) I 1 1 2/a     : Rwp= 73.15%  GoF=   344.60  nGoF=    81.97  ( 40 reflections,  91 extinct) [same extinctions as:I 1 1 b]
  (# 15) B 2/b 1 1     : Rwp= 72.77%  GoF=   340.69  nGoF=    83.67  ( 42 reflections,  93 extinct) [same extinctions as:B b 1 1]
  (# 15) C 2/n 1 1     : Rwp= 72.34%  GoF=   350.52  nGoF=    75.02  ( 39 reflections,  93 extinct) [same extinctions as:C n 1 1]
  (# 15) I 2/c 1 1     : Rwp= 73.91%  GoF=   351.19  nGoF=    80.65  ( 39 reflections,  93 extinct) [same extinctions as:I c 1 1]
  (# 15) C 2/c 1 1     : Rwp= 72.34%  GoF=   350.52  nGoF=    75.02  ( 39 reflections,  93 extinct) [same extinctions as:C n 1 1]
  (# 15) B 2/n 1 1     : Rwp= 72.77%  GoF=   340.69  nGoF=    83.67  ( 42 reflections,  93 extinct) [same extinctions as:B b 1 1]
  (# 15) I 2/b 1 1     : Rwp= 73.91%  GoF=   351.19  nGoF=    80.65  ( 39 reflections,  93 extinct) [same extinctions as:I c 1 1]
  (# 16) P 2 2 2       : Rwp= 10.48%  GoF=     7.19  nGoF=     0.82  ( 66 reflections,   0 extinct)
  (# 17) P 2 2 21      : Rwp= 10.73%  GoF=     7.53  nGoF=     0.87  ( 63 reflections,   3 extinct)
  (# 17) P 21 2 2      : Rwp= 10.44%  GoF=     7.13  nGoF=     0.78  ( 64 reflections,   2 extinct)
  (# 17) P 2 21 2      : Rwp= 10.71%  GoF=     7.50  nGoF=     0.80  ( 64 reflections,   2 extinct)
  (# 18) P 21 21 2     : Rwp= 10.67%  GoF=     7.44  nGoF=     0.76  ( 62 reflections,   4 extinct)
  (# 18) P 2 21 21     : Rwp=  9.99%  GoF=     6.52  nGoF=     0.82  ( 61 reflections,   5 extinct)
  (# 18) P 21 2 21     : Rwp= 10.69%  GoF=     7.46  nGoF=     0.82  ( 61 reflections,   5 extinct)
  (# 19) P 21 21 21    : Rwp=  9.95%  GoF=     6.46  nGoF=     0.77  ( 59 reflections,   7 extinct)
  (# 20) C 2 2 21      : Rwp= 67.46%  GoF=   303.94  nGoF=    45.55  ( 29 reflections,  87 extinct)
  (# 20) A 21 2 2      : Rwp= 84.58%  GoF=   470.71  nGoF=    82.95  ( 31 reflections,  87 extinct)
  (# 20) B 2 21 2      : Rwp= 71.13%  GoF=   324.96  nGoF=    58.45  ( 31 reflections,  87 extinct)
  (# 21) C 2 2 2       : Rwp= 67.49%  GoF=   304.79  nGoF=    50.24  ( 32 reflections,  84 extinct)
  (# 21) A 2 2 2       : Rwp= 84.59%  GoF=   471.25  nGoF=    88.31  ( 33 reflections,  85 extinct)
  (# 21) B 2 2 2       : Rwp= 71.14%  GoF=   325.42  nGoF=    62.22  ( 33 reflections,  85 extinct)
  (# 22) F 2 2 2       : Rwp= 76.55%  GoF=   388.57  nGoF=    35.98  ( 16 reflections, 127 extinct)
  (# 23) I 2 2 2       : Rwp= 72.54%  GoF=   338.13  nGoF=    64.30  ( 32 reflections,  87 extinct)
  (# 24) I 21 21 21    : Rwp= 72.54%  GoF=   338.13  nGoF=    64.30  ( 32 reflections,  87 extinct) [same extinctions as:I 2 2 2]
  (# 25) P m m 2       : Rwp= 10.48%  GoF=     7.19  nGoF=     0.82  ( 66 reflections,   0 extinct) [same extinctions as:P 2 2 2]
  (# 25) P 2 m m       : Rwp= 10.48%  GoF=     7.19  nGoF=     0.82  ( 66 reflections,   0 extinct) [same extinctions as:P 2 2 2]
  (# 25) P m 2 m       : Rwp= 10.48%  GoF=     7.19  nGoF=     0.82  ( 66 reflections,   0 extinct) [same extinctions as:P 2 2 2]
  (# 26) P m c 21      : Rwp= 10.70%  GoF=     7.48  nGoF=     0.78  ( 57 reflections,  15 extinct)
  (# 26) P c m 21      : Rwp= 38.51%  GoF=    96.48  nGoF=    26.53  ( 55 reflections,  15 extinct)
  (# 26) P 21 m a      : Rwp= 33.23%  GoF=    72.02  nGoF=    19.37  ( 59 reflections,  10 extinct)
  (# 26) P 21 a m      : Rwp= 43.68%  GoF=   124.63  nGoF=    35.55  ( 57 reflections,  14 extinct)
  (# 26) P b 21 m      : Rwp= 33.76%  GoF=    74.22  nGoF=    17.64  ( 56 reflections,  14 extinct)
  (# 26) P m 21 b      : Rwp= 33.30%  GoF=    72.32  nGoF=    19.38  ( 59 reflections,  10 extinct)
  (# 27) P c c 2       : Rwp= 38.49%  GoF=    96.35  nGoF=    23.65  ( 49 reflections,  27 extinct)
  (# 27) P 2 a a       : Rwp= 50.26%  GoF=   164.56  nGoF=    43.85  ( 52 reflections,  22 extinct)
  (# 27) P b 2 b       : Rwp= 43.68%  GoF=   123.89  nGoF=    29.64  ( 51 reflections,  22 extinct)
  (# 28) P m a 2       : Rwp= 43.68%  GoF=   124.63  nGoF=    35.55  ( 57 reflections,  14 extinct) [same extinctions as:P 21 a m]
  (# 28) P b m 2       : Rwp= 33.76%  GoF=    74.22  nGoF=    17.64  ( 56 reflections,  14 extinct) [same extinctions as:P b 21 m]
  (# 28) P 2 m b       : Rwp= 33.30%  GoF=    72.32  nGoF=    19.38  ( 59 reflections,  10 extinct) [same extinctions as:P m 21 b]
  (# 28) P 2 c m       : Rwp= 10.70%  GoF=     7.48  nGoF=     0.78  ( 57 reflections,  15 extinct) [same extinctions as:P m c 21]
  (# 28) P c 2 m       : Rwp= 38.51%  GoF=    96.48  nGoF=    26.53  ( 55 reflections,  15 extinct) [same extinctions as:P c m 21]
  (# 28) P m 2 a       : Rwp= 33.23%  GoF=    72.02  nGoF=    19.37  ( 59 reflections,  10 extinct) [same extinctions as:P 21 m a]
  (# 29) P c a 21      : Rwp= 61.81%  GoF=   248.06  nGoF=    62.06  ( 46 reflections,  29 extinct)
  (# 29) P b c 21      : Rwp= 33.60%  GoF=    73.35  nGoF=    14.86  ( 47 reflections,  29 extinct)
  (# 29) P 21 a b      : Rwp= 50.29%  GoF=   164.54  nGoF=    42.16  ( 50 reflections,  24 extinct)
  (# 29) P 21 c a      : Rwp= 33.33%  GoF=    72.28  nGoF=    16.53  ( 50 reflections,  25 extinct)
  (# 29) P c 21 b      : Rwp= 46.59%  GoF=   140.72  nGoF=    34.46  ( 48 reflections,  25 extinct)
  (# 29) P b 21 a      : Rwp= 48.24%  GoF=   150.90  nGoF=    32.31  ( 49 reflections,  24 extinct)
  (# 30) P n c 2       : Rwp= 33.94%  GoF=    74.91  nGoF=    19.48  ( 49 reflections,  29 extinct)
  (# 30) P c n 2       : Rwp= 59.85%  GoF=   232.16  nGoF=    62.13  ( 48 reflections,  29 extinct)
  (# 30) P 2 n a       : Rwp= 46.50%  GoF=   140.36  nGoF=    39.44  ( 51 reflections,  25 extinct)
  (# 30) P 2 a n       : Rwp= 43.70%  GoF=   124.34  nGoF=    31.81  ( 51 reflections,  24 extinct)
  (# 30) P b 2 n       : Rwp= 40.62%  GoF=   107.08  nGoF=    19.91  ( 50 reflections,  24 extinct)
  (# 30) P n 2 b       : Rwp= 43.70%  GoF=   123.91  nGoF=    32.21  ( 50 reflections,  25 extinct)
  (# 31) P m n 21      : Rwp= 38.34%  GoF=    95.70  nGoF=    30.87  ( 56 reflections,  17 extinct)
  (# 31) P n m 21      : Rwp= 33.96%  GoF=    75.04  nGoF=    21.89  ( 55 reflections,  17 extinct)
  (# 31) P 21 m n      : Rwp= 10.69%  GoF=     7.45  nGoF=     0.74  ( 58 reflections,  12 extinct)
  (# 31) P 21 n m      : Rwp= 38.34%  GoF=    95.70  nGoF=    30.87  ( 56 reflections,  17 extinct) [same extinctions as:P m n 21]
  (# 31) P n 21 m      : Rwp= 33.96%  GoF=    75.04  nGoF=    21.89  ( 55 reflections,  17 extinct) [same extinctions as:P n m 21]
  (# 31) P m 21 n      : Rwp= 10.69%  GoF=     7.45  nGoF=     0.74  ( 58 reflections,  12 extinct) [same extinctions as:P 21 m n]
  (# 32) P b a 2       : Rwp= 54.71%  GoF=   194.42  nGoF=    43.86  ( 47 reflections,  28 extinct)
  (# 32) P 2 c b       : Rwp= 33.17%  GoF=    71.61  nGoF=    16.51  ( 50 reflections,  25 extinct)
  (# 32) P c 2 a       : Rwp= 50.65%  GoF=   166.32  nGoF=    37.87  ( 48 reflections,  25 extinct)
  (# 33) P n a 21      : Rwp= 61.14%  GoF=   242.72  nGoF=    63.64  ( 46 reflections,  31 extinct)
  (# 33) P b n 21      : Rwp= 51.58%  GoF=   172.27  nGoF=    39.53  ( 46 reflections,  31 extinct)
  (# 33) P 21 n b      : Rwp= 46.42%  GoF=   139.73  nGoF=    37.88  ( 49 reflections,  27 extinct)
  (# 33) P 21 c n      : Rwp=  9.95%  GoF=     6.44  nGoF=     0.67  ( 49 reflections,  27 extinct)
  (# 33) P c 21 n      : Rwp= 44.05%  GoF=   125.70  nGoF=    26.12  ( 47 reflections,  27 extinct)
  (# 33) P n 21 a      : Rwp= 43.68%  GoF=   123.69  nGoF=    30.91  ( 48 reflections,  27 extinct)
  (# 34) P n n 2       : Rwp= 59.17%  GoF=   226.98  nGoF=    64.15  ( 48 reflections,  31 extinct)
  (# 34) P 2 n n       : Rwp= 38.20%  GoF=    94.70  nGoF=    27.56  ( 50 reflections,  27 extinct)
  (# 34) P n 2 n       : Rwp= 33.95%  GoF=    74.74  nGoF=    19.50  ( 49 reflections,  27 extinct)
  (# 35) C m m 2       : Rwp= 67.49%  GoF=   304.79  nGoF=    50.24  ( 32 reflections,  84 extinct) [same extinctions as:C 2 2 2]
  (# 35) A 2 m m       : Rwp= 84.59%  GoF=   471.25  nGoF=    88.31  ( 33 reflections,  85 extinct) [same extinctions as:A 2 2 2]
  (# 35) B m 2 m       : Rwp= 71.14%  GoF=   325.42  nGoF=    62.22  ( 33 reflections,  85 extinct) [same extinctions as:B 2 2 2]
  (# 36) C m c 21      : Rwp= 64.36%  GoF=   276.37  nGoF=    40.65  ( 27 reflections,  93 extinct)
  (# 36) C c m 21      : Rwp= 72.52%  GoF=   350.68  nGoF=    50.24  ( 26 reflections,  93 extinct)
  (# 36) A 21 m a      : Rwp= 62.85%  GoF=   259.63  nGoF=    43.46  ( 29 reflections,  91 extinct)
  (# 36) A 21 a m      : Rwp= 85.31%  GoF=   478.01  nGoF=    77.38  ( 28 reflections,  93 extinct)
  (# 36) B b 21 m      : Rwp= 72.89%  GoF=   340.67  nGoF=    55.83  ( 28 reflections,  93 extinct)
  (# 36) B m 21 b      : Rwp= 71.15%  GoF=   324.80  nGoF=    54.70  ( 29 reflections,  91 extinct)
  (# 37) C c c 2       : Rwp= 70.67%  GoF=   332.61  nGoF=    45.35  ( 24 reflections,  99 extinct)
  (# 37) A 2 a a       : Rwp= 73.18%  GoF=   351.38  nGoF=    54.22  ( 26 reflections,  97 extinct)
  (# 37) B b 2 b       : Rwp= 72.91%  GoF=   340.45  nGoF=    51.86  ( 26 reflections,  97 extinct)
  (# 38) A m m 2       : Rwp= 84.59%  GoF=   471.25  nGoF=    88.31  ( 33 reflections,  85 extinct) [same extinctions as:A 2 2 2]
  (# 38) B m m 2       : Rwp= 71.14%  GoF=   325.42  nGoF=    62.22  ( 33 reflections,  85 extinct) [same extinctions as:B 2 2 2]
  (# 38) B 2 m m       : Rwp= 71.14%  GoF=   325.42  nGoF=    62.22  ( 33 reflections,  85 extinct) [same extinctions as:B 2 2 2]
  (# 38) C 2 m m       : Rwp= 67.49%  GoF=   304.79  nGoF=    50.24  ( 32 reflections,  84 extinct) [same extinctions as:C 2 2 2]
  (# 38) C m 2 m       : Rwp= 67.49%  GoF=   304.79  nGoF=    50.24  ( 32 reflections,  84 extinct) [same extinctions as:C 2 2 2]
  (# 38) A m 2 m       : Rwp= 84.59%  GoF=   471.25  nGoF=    88.31  ( 33 reflections,  85 extinct) [same extinctions as:A 2 2 2]
  (# 39) A b m 2       : Rwp= 84.63%  GoF=   473.64  nGoF=    75.08  ( 28 reflections,  91 extinct)
  (# 39) B m a 2       : Rwp= 71.17%  GoF=   325.88  nGoF=    54.72  ( 29 reflections,  91 extinct)
  (# 39) B 2 c m       : Rwp= 71.17%  GoF=   325.88  nGoF=    54.72  ( 29 reflections,  91 extinct) [same extinctions as:B m a 2]
  (# 39) C 2 m b       : Rwp= 69.12%  GoF=   319.10  nGoF=    48.46  ( 29 reflections,  88 extinct)
  (# 39) C m 2 a       : Rwp= 69.12%  GoF=   319.10  nGoF=    48.46  ( 29 reflections,  88 extinct) [same extinctions as:C 2 m b]
  (# 39) A c 2 m       : Rwp= 84.63%  GoF=   473.64  nGoF=    75.08  ( 28 reflections,  91 extinct) [same extinctions as:A b m 2]
  (# 40) A m a 2       : Rwp= 85.31%  GoF=   478.01  nGoF=    77.38  ( 28 reflections,  93 extinct) [same extinctions as:A 21 a m]
  (# 40) B b m 2       : Rwp= 72.89%  GoF=   340.67  nGoF=    55.83  ( 28 reflections,  93 extinct) [same extinctions as:B b 21 m]
  (# 40) B 2 m b       : Rwp= 71.15%  GoF=   324.80  nGoF=    54.70  ( 29 reflections,  91 extinct) [same extinctions as:B m 21 b]
  (# 40) C 2 c m       : Rwp= 64.36%  GoF=   276.37  nGoF=    40.65  ( 27 reflections,  93 extinct) [same extinctions as:C m c 21]
  (# 40) C c 2 m       : Rwp= 72.52%  GoF=   350.68  nGoF=    50.24  ( 26 reflections,  93 extinct) [same extinctions as:C c m 21]
  (# 40) A m 2 a       : Rwp= 62.85%  GoF=   259.63  nGoF=    43.46  ( 29 reflections,  91 extinct) [same extinctions as:A 21 m a]
  (# 41) A b a 2       : Rwp= 85.45%  GoF=   481.44  nGoF=    63.89  ( 23 reflections,  99 extinct)
  (# 41) B b a 2       : Rwp= 72.91%  GoF=   341.08  nGoF=    47.88  ( 24 reflections,  99 extinct)
  (# 41) B 2 c b       : Rwp= 71.23%  GoF=   325.70  nGoF=    47.24  ( 25 reflections,  97 extinct)
  (# 41) C 2 c b       : Rwp= 66.43%  GoF=   293.90  nGoF=    38.64  ( 24 reflections,  97 extinct)
  (# 41) C c 2 a       : Rwp= 73.47%  GoF=   359.36  nGoF=    45.80  ( 23 reflections,  97 extinct)
  (# 41) A c 2 a       : Rwp= 67.31%  GoF=   299.08  nGoF=    39.85  ( 24 reflections,  97 extinct)
  (# 42) F m m 2       : Rwp= 76.55%  GoF=   388.57  nGoF=    35.98  ( 16 reflections, 127 extinct) [same extinctions as:F 2 2 2]
  (# 42) F 2 m m       : Rwp= 76.55%  GoF=   388.57  nGoF=    35.98  ( 16 reflections, 127 extinct) [same extinctions as:F 2 2 2]
  (# 42) F m 2 m       : Rwp= 76.55%  GoF=   388.57  nGoF=    35.98  ( 16 reflections, 127 extinct) [same extinctions as:F 2 2 2]
  (# 43) F d d 2       : Rwp= 80.95%  GoF=   445.23  nGoF=    28.01  ( 11 reflections, 137 extinct)
  (# 43) F 2 d d       : Rwp= 81.66%  GoF=   453.34  nGoF=    30.93  ( 12 reflections, 136 extinct)
  (# 43) F d 2 d       : Rwp= 80.96%  GoF=   433.60  nGoF=    30.56  ( 12 reflections, 136 extinct)
  (# 44) I m m 2       : Rwp= 72.54%  GoF=   338.13  nGoF=    64.30  ( 32 reflections,  87 extinct) [same extinctions as:I 2 2 2]
  (# 44) I 2 m m       : Rwp= 72.54%  GoF=   338.13  nGoF=    64.30  ( 32 reflections,  87 extinct) [same extinctions as:I 2 2 2]
  (# 44) I m 2 m       : Rwp= 72.54%  GoF=   338.13  nGoF=    64.30  ( 32 reflections,  87 extinct) [same extinctions as:I 2 2 2]
  (# 45) I b a 2       : Rwp= 74.13%  GoF=   353.50  nGoF=    47.79  ( 23 reflections,  99 extinct)
  (# 45) I 2 c b       : Rwp= 73.52%  GoF=   348.04  nGoF=    51.53  ( 25 reflections,  97 extinct)
  (# 45) I c 2 a       : Rwp= 74.95%  GoF=   359.44  nGoF=    51.01  ( 24 reflections,  97 extinct)
  (# 46) I m a 2       : Rwp= 72.53%  GoF=   339.35  nGoF=    56.25  ( 28 reflections,  93 extinct)
  (# 46) I b m 2       : Rwp= 74.10%  GoF=   351.89  nGoF=    56.07  ( 27 reflections,  93 extinct)
  (# 46) I 2 m b       : Rwp= 73.52%  GoF=   346.76  nGoF=    59.78  ( 29 reflections,  91 extinct)
  (# 46) I 2 c m       : Rwp= 72.53%  GoF=   339.35  nGoF=    56.25  ( 28 reflections,  93 extinct) [same extinctions as:I m a 2]
  (# 46) I c 2 m       : Rwp= 74.10%  GoF=   351.89  nGoF=    56.07  ( 27 reflections,  93 extinct) [same extinctions as:I b m 2]
  (# 46) I m 2 a       : Rwp= 73.52%  GoF=   346.76  nGoF=    59.78  ( 29 reflections,  91 extinct) [same extinctions as:I 2 m b]
  (# 47) P m m m       : Rwp= 10.48%  GoF=     7.19  nGoF=     0.82  ( 66 reflections,   0 extinct) [same extinctions as:P 2 2 2]
  (# 48) P n n n :1    : Rwp= 59.17%  GoF=   226.48  nGoF=    58.81  ( 44 reflections,  39 extinct)
  (# 48) P n n n :2    : Rwp= 59.17%  GoF=   226.48  nGoF=    58.81  ( 44 reflections,  39 extinct) [same extinctions as:P n n n :1]
  (# 49) P c c m       : Rwp= 38.49%  GoF=    96.35  nGoF=    23.65  ( 49 reflections,  27 extinct) [same extinctions as:P c c 2]
  (# 49) P m a a       : Rwp= 50.26%  GoF=   164.56  nGoF=    43.85  ( 52 reflections,  22 extinct) [same extinctions as:P 2 a a]
  (# 49) P b m b       : Rwp= 43.68%  GoF=   123.89  nGoF=    29.64  ( 51 reflections,  22 extinct) [same extinctions as:P b 2 b]
  (# 50) P b a n :1    : Rwp= 54.82%  GoF=   194.80  nGoF=    40.27  ( 43 reflections,  36 extinct)
  (# 50) P b a n :2    : Rwp= 54.82%  GoF=   194.80  nGoF=    40.27  ( 43 reflections,  36 extinct) [same extinctions as:P b a n :1]
  (# 50) P n c b :1    : Rwp= 43.71%  GoF=   123.90  nGoF=    28.37  ( 44 reflections,  37 extinct)
  (# 50) P n c b :2    : Rwp= 43.71%  GoF=   123.90  nGoF=    28.37  ( 44 reflections,  37 extinct) [same extinctions as:P n c b :1]
  (# 50) P c n a :1    : Rwp= 62.60%  GoF=   253.36  nGoF=    61.02  ( 43 reflections,  37 extinct)
  (# 50) P c n a :2    : Rwp= 62.60%  GoF=   253.36  nGoF=    61.02  ( 43 reflections,  37 extinct) [same extinctions as:P c n a :1]
  (# 51) P m m a       : Rwp= 33.23%  GoF=    72.02  nGoF=    19.37  ( 59 reflections,  10 extinct) [same extinctions as:P 21 m a]
  (# 51) P m m b       : Rwp= 33.30%  GoF=    72.32  nGoF=    19.38  ( 59 reflections,  10 extinct) [same extinctions as:P m 21 b]
  (# 51) P b m m       : Rwp= 33.76%  GoF=    74.22  nGoF=    17.64  ( 56 reflections,  14 extinct) [same extinctions as:P b 21 m]
  (# 51) P c m m       : Rwp= 38.51%  GoF=    96.48  nGoF=    26.53  ( 55 reflections,  15 extinct) [same extinctions as:P c m 21]
  (# 51) P m c m       : Rwp= 10.70%  GoF=     7.48  nGoF=     0.78  ( 57 reflections,  15 extinct) [same extinctions as:P m c 21]
  (# 51) P m a m       : Rwp= 43.68%  GoF=   124.63  nGoF=    35.55  ( 57 reflections,  14 extinct) [same extinctions as:P 21 a m]
  (# 52) P n n a       : Rwp= 61.94%  GoF=   248.04  nGoF=    62.36  ( 43 reflections,  39 extinct)
  (# 52) P n n b       : Rwp= 61.94%  GoF=   248.04  nGoF=    62.35  ( 43 reflections,  39 extinct)
  (# 52) P b n n       : Rwp= 51.62%  GoF=   172.14  nGoF=    36.13  ( 42 reflections,  39 extinct)
  (# 52) P c n n       : Rwp= 59.83%  GoF=   231.31  nGoF=    54.38  ( 42 reflections,  39 extinct)
  (# 52) P n c n       : Rwp= 33.93%  GoF=    74.60  nGoF=    17.09  ( 43 reflections,  39 extinct)
  (# 52) P n a n       : Rwp= 61.14%  GoF=   242.17  nGoF=    58.11  ( 42 reflections,  39 extinct)
  (# 53) P m n a       : Rwp= 46.50%  GoF=   140.36  nGoF=    39.44  ( 51 reflections,  25 extinct) [same extinctions as:P 2 n a]
  (# 53) P n m b       : Rwp= 43.70%  GoF=   123.91  nGoF=    32.21  ( 50 reflections,  25 extinct) [same extinctions as:P n 2 b]
  (# 53) P b m n       : Rwp= 40.62%  GoF=   107.08  nGoF=    19.91  ( 50 reflections,  24 extinct) [same extinctions as:P b 2 n]
  (# 53) P c n m       : Rwp= 59.85%  GoF=   232.16  nGoF=    62.13  ( 48 reflections,  29 extinct) [same extinctions as:P c n 2]
  (# 53) P n c m       : Rwp= 33.94%  GoF=    74.91  nGoF=    19.48  ( 49 reflections,  29 extinct) [same extinctions as:P n c 2]
  (# 53) P m a n       : Rwp= 43.70%  GoF=   124.34  nGoF=    31.81  ( 51 reflections,  24 extinct) [same extinctions as:P 2 a n]
  (# 54) P c c a       : Rwp= 50.72%  GoF=   166.64  nGoF=    33.25  ( 42 reflections,  37 extinct)
  (# 54) P c c b       : Rwp= 46.61%  GoF=   140.77  nGoF=    30.21  ( 42 reflections,  37 extinct)
  (# 54) P b a a       : Rwp= 58.60%  GoF=   222.45  nGoF=    46.79  ( 42 reflections,  36 extinct)
  (# 54) P c a a       : Rwp= 64.28%  GoF=   267.50  nGoF=    60.32  ( 41 reflections,  37 extinct)
  (# 54) P b c b       : Rwp= 43.63%  GoF=   123.30  nGoF=    24.50  ( 42 reflections,  37 extinct)
  (# 54) P b a b       : Rwp= 58.73%  GoF=   223.44  nGoF=    46.96  ( 42 reflections,  36 extinct)
  (# 55) P b a m       : Rwp= 54.71%  GoF=   194.42  nGoF=    43.86  ( 47 reflections,  28 extinct) [same extinctions as:P b a 2]
  (# 55) P m c b       : Rwp= 33.17%  GoF=    71.61  nGoF=    16.51  ( 50 reflections,  25 extinct) [same extinctions as:P 2 c b]
  (# 55) P c m a       : Rwp= 50.65%  GoF=   166.32  nGoF=    37.87  ( 48 reflections,  25 extinct) [same extinctions as:P c 2 a]
  (# 56) P c c n       : Rwp= 44.25%  GoF=   126.78  nGoF=    22.98  ( 41 reflections,  39 extinct)
  (# 56) P n a a       : Rwp= 63.61%  GoF=   262.03  nGoF=    61.32  ( 41 reflections,  39 extinct)
  (# 56) P b n b       : Rwp= 56.15%  GoF=   203.56  nGoF=    42.89  ( 41 reflections,  39 extinct)
  (# 57) P b c m       : Rwp= 33.60%  GoF=    73.35  nGoF=    14.86  ( 47 reflections,  29 extinct) [same extinctions as:P b c 21]
  (# 57) P c a m       : Rwp= 61.81%  GoF=   248.06  nGoF=    62.06  ( 46 reflections,  29 extinct) [same extinctions as:P c a 21]
  (# 57) P m c a       : Rwp= 33.33%  GoF=    72.28  nGoF=    16.53  ( 50 reflections,  25 extinct) [same extinctions as:P 21 c a]
  (# 57) P m a b       : Rwp= 50.29%  GoF=   164.54  nGoF=    42.16  ( 50 reflections,  24 extinct) [same extinctions as:P 21 a b]
  (# 57) P b m a       : Rwp= 48.24%  GoF=   150.90  nGoF=    32.31  ( 49 reflections,  24 extinct) [same extinctions as:P b 21 a]
  (# 57) P c m b       : Rwp= 46.59%  GoF=   140.72  nGoF=    34.46  ( 48 reflections,  25 extinct) [same extinctions as:P c 21 b]
  (# 58) P n n m       : Rwp= 59.17%  GoF=   226.98  nGoF=    64.15  ( 48 reflections,  31 extinct) [same extinctions as:P n n 2]
  (# 58) P m n n       : Rwp= 38.20%  GoF=    94.70  nGoF=    27.56  ( 50 reflections,  27 extinct) [same extinctions as:P 2 n n]
  (# 58) P n m n       : Rwp= 33.95%  GoF=    74.74  nGoF=    19.50  ( 49 reflections,  27 extinct) [same extinctions as:P n 2 n]
  (# 59) P m m n :1    : Rwp= 10.69%  GoF=     7.45  nGoF=     0.74  ( 58 reflections,  12 extinct) [same extinctions as:P 21 m n]
  (# 59) P m m n :2    : Rwp= 10.69%  GoF=     7.45  nGoF=     0.74  ( 58 reflections,  12 extinct) [same extinctions as:P 21 m n]
  (# 59) P n m m :1    : Rwp= 33.96%  GoF=    75.04  nGoF=    21.89  ( 55 reflections,  17 extinct) [same extinctions as:P n m 21]
  (# 59) P n m m :2    : Rwp= 33.96%  GoF=    75.04  nGoF=    21.89  ( 55 reflections,  17 extinct) [same extinctions as:P n m 21]
  (# 59) P m n m :1    : Rwp= 38.34%  GoF=    95.70  nGoF=    30.87  ( 56 reflections,  17 extinct) [same extinctions as:P m n 21]
  (# 59) P m n m :2    : Rwp= 38.34%  GoF=    95.70  nGoF=    30.87  ( 56 reflections,  17 extinct) [same extinctions as:P m n 21]
  (# 60) P b c n       : Rwp= 40.76%  GoF=   107.58  nGoF=    16.57  ( 41 reflections,  39 extinct)
  (# 60) P c a n       : Rwp= 61.85%  GoF=   247.55  nGoF=    54.04  ( 40 reflections,  39 extinct)
  (# 60) P n c a       : Rwp= 43.69%  GoF=   123.68  nGoF=    27.07  ( 42 reflections,  39 extinct)
  (# 60) P n a b       : Rwp= 63.61%  GoF=   262.01  nGoF=    61.32  ( 41 reflections,  39 extinct)
  (# 60) P b n a       : Rwp= 56.10%  GoF=   203.21  nGoF=    42.84  ( 41 reflections,  39 extinct)
  (# 60) P c n b       : Rwp= 62.60%  GoF=   253.04  nGoF=    58.20  ( 41 reflections,  39 extinct)
  (# 61) P b c a       : Rwp= 48.24%  GoF=   150.61  nGoF=    26.51  ( 40 reflections,  39 extinct)
  (# 61) P c a b       : Rwp= 64.33%  GoF=   267.64  nGoF=    57.46  ( 39 reflections,  39 extinct)
  (# 62) P n m a       : Rwp= 43.68%  GoF=   123.69  nGoF=    30.91  ( 48 reflections,  27 extinct) [same extinctions as:P n 21 a]
  (# 62) P m n b       : Rwp= 46.42%  GoF=   139.73  nGoF=    37.88  ( 49 reflections,  27 extinct) [same extinctions as:P 21 n b]
  (# 62) P b n m       : Rwp= 51.58%  GoF=   172.27  nGoF=    39.53  ( 46 reflections,  31 extinct) [same extinctions as:P b n 21]
  (# 62) P c m n       : Rwp= 44.05%  GoF=   125.70  nGoF=    26.12  ( 47 reflections,  27 extinct) [same extinctions as:P c 21 n]
  (# 62) P m c n       : Rwp=  9.95%  GoF=     6.44  nGoF=     0.67  ( 49 reflections,  27 extinct) [same extinctions as:P 21 c n]
  (# 62) P n a m       : Rwp= 61.14%  GoF=   242.72  nGoF=    63.64  ( 46 reflections,  31 extinct) [same extinctions as:P n a 21]
  (# 63) C m c m       : Rwp= 64.36%  GoF=   276.37  nGoF=    40.65  ( 27 reflections,  93 extinct) [same extinctions as:C m c 21]
  (# 63) C c m m       : Rwp= 72.52%  GoF=   350.68  nGoF=    50.24  ( 26 reflections,  93 extinct) [same extinctions as:C c m 21]
  (# 63) A m m a       : Rwp= 62.85%  GoF=   259.63  nGoF=    43.46  ( 29 reflections,  91 extinct) [same extinctions as:A 21 m a]
  (# 63) A m a m       : Rwp= 85.31%  GoF=   478.01  nGoF=    77.38  ( 28 reflections,  93 extinct) [same extinctions as:A 21 a m]
  (# 63) B b m m       : Rwp= 72.89%  GoF=   340.67  nGoF=    55.83  ( 28 reflections,  93 extinct) [same extinctions as:B b 21 m]
  (# 63) B m m b       : Rwp= 71.15%  GoF=   324.80  nGoF=    54.70  ( 29 reflections,  91 extinct) [same extinctions as:B m 21 b]
  (# 64) C m c a       : Rwp= 66.43%  GoF=   293.90  nGoF=    38.64  ( 24 reflections,  97 extinct) [same extinctions as:C 2 c b]
  (# 64) C c m b       : Rwp= 73.47%  GoF=   359.36  nGoF=    45.80  ( 23 reflections,  97 extinct) [same extinctions as:C c 2 a]
  (# 64) A b m a       : Rwp= 67.31%  GoF=   299.08  nGoF=    39.85  ( 24 reflections,  97 extinct) [same extinctions as:A c 2 a]
  (# 64) A c a m       : Rwp= 85.45%  GoF=   481.44  nGoF=    63.89  ( 23 reflections,  99 extinct) [same extinctions as:A b a 2]
  (# 64) B b c m       : Rwp= 72.91%  GoF=   341.08  nGoF=    47.88  ( 24 reflections,  99 extinct) [same extinctions as:B b a 2]
  (# 64) B m a b       : Rwp= 71.23%  GoF=   325.70  nGoF=    47.24  ( 25 reflections,  97 extinct) [same extinctions as:B 2 c b]
  (# 65) C m m m       : Rwp= 67.49%  GoF=   304.79  nGoF=    50.24  ( 32 reflections,  84 extinct) [same extinctions as:C 2 2 2]
  (# 65) A m m m       : Rwp= 84.59%  GoF=   471.25  nGoF=    88.31  ( 33 reflections,  85 extinct) [same extinctions as:A 2 2 2]
  (# 65) B m m m       : Rwp= 71.14%  GoF=   325.42  nGoF=    62.22  ( 33 reflections,  85 extinct) [same extinctions as:B 2 2 2]
  (# 66) C c c m       : Rwp= 70.67%  GoF=   332.61  nGoF=    45.35  ( 24 reflections,  99 extinct) [same extinctions as:C c c 2]
  (# 66) A m a a       : Rwp= 73.18%  GoF=   351.38  nGoF=    54.22  ( 26 reflections,  97 extinct) [same extinctions as:A 2 a a]
  (# 66) B b m b       : Rwp= 72.91%  GoF=   340.45  nGoF=    51.86  ( 26 reflections,  97 extinct) [same extinctions as:B b 2 b]
  (# 67) C m m a       : Rwp= 69.12%  GoF=   319.10  nGoF=    48.46  ( 29 reflections,  88 extinct) [same extinctions as:C 2 m b]
  (# 67) C m m b       : Rwp= 69.12%  GoF=   319.10  nGoF=    48.46  ( 29 reflections,  88 extinct) [same extinctions as:C 2 m b]
  (# 67) A b m m       : Rwp= 84.63%  GoF=   473.64  nGoF=    75.08  ( 28 reflections,  91 extinct) [same extinctions as:A b m 2]
  (# 67) A c m m       : Rwp= 84.63%  GoF=   473.64  nGoF=    75.08  ( 28 reflections,  91 extinct) [same extinctions as:A b m 2]
  (# 67) B m c m       : Rwp= 71.17%  GoF=   325.88  nGoF=    54.72  ( 29 reflections,  91 extinct) [same extinctions as:B m a 2]
  (# 67) B m a m       : Rwp= 71.17%  GoF=   325.88  nGoF=    54.72  ( 29 reflections,  91 extinct) [same extinctions as:B m a 2]
  (# 68) C c c a :1    : Rwp= 71.81%  GoF=   342.90  nGoF=    40.95  ( 21 reflections, 103 extinct)
  (# 68) C c c a :2    : Rwp= 71.81%  GoF=   342.90  nGoF=    40.95  ( 21 reflections, 103 extinct) [same extinctions as:C c c a :1]
  (# 68) C c c b :1    : Rwp= 71.81%  GoF=   342.90  nGoF=    40.95  ( 21 reflections, 103 extinct) [same extinctions as:C c c a :1]
  (# 68) C c c b :2    : Rwp= 71.81%  GoF=   342.90  nGoF=    40.95  ( 21 reflections, 103 extinct) [same extinctions as:C c c a :1]
  (# 68) A b a a :1    : Rwp= 75.25%  GoF=   376.53  nGoF=    45.61  ( 21 reflections, 103 extinct)
  (# 68) A b a a :2    : Rwp= 75.25%  GoF=   376.53  nGoF=    45.61  ( 21 reflections, 103 extinct) [same extinctions as:A b a a :1]
  (# 68) A c a a :1    : Rwp= 75.25%  GoF=   376.53  nGoF=    45.61  ( 21 reflections, 103 extinct) [same extinctions as:A b a a :1]
  (# 68) A c a a :2    : Rwp= 75.25%  GoF=   376.53  nGoF=    45.61  ( 21 reflections, 103 extinct) [same extinctions as:A b a a :1]
  (# 68) B b c b :1    : Rwp= 72.97%  GoF=   341.22  nGoF=    43.94  ( 22 reflections, 103 extinct)
  (# 68) B b c b :2    : Rwp= 72.97%  GoF=   341.22  nGoF=    43.94  ( 22 reflections, 103 extinct) [same extinctions as:B b c b :1]
  (# 68) B b a b :1    : Rwp= 72.97%  GoF=   341.22  nGoF=    43.94  ( 22 reflections, 103 extinct) [same extinctions as:B b c b :1]
  (# 68) B b a b :2    : Rwp= 72.97%  GoF=   341.22  nGoF=    43.94  ( 22 reflections, 103 extinct) [same extinctions as:B b c b :1]
  (# 69) F m m m       : Rwp= 76.55%  GoF=   388.57  nGoF=    35.98  ( 16 reflections, 127 extinct) [same extinctions as:F 2 2 2]
  (# 70) F d d d :1    : Rwp= 80.95%  GoF=   445.23  nGoF=    28.01  ( 11 reflections, 139 extinct)
  (# 70) F d d d :2    : Rwp= 80.95%  GoF=   445.23  nGoF=    28.01  ( 11 reflections, 139 extinct) [same extinctions as:F d d d :1]
  (# 71) I m m m       : Rwp= 72.54%  GoF=   338.13  nGoF=    64.30  ( 32 reflections,  87 extinct) [same extinctions as:I 2 2 2]
  (# 72) I b a m       : Rwp= 74.13%  GoF=   353.50  nGoF=    47.79  ( 23 reflections,  99 extinct) [same extinctions as:I b a 2]
  (# 72) I m c b       : Rwp= 73.52%  GoF=   348.04  nGoF=    51.53  ( 25 reflections,  97 extinct) [same extinctions as:I 2 c b]
  (# 72) I c m a       : Rwp= 74.95%  GoF=   359.44  nGoF=    51.01  ( 24 reflections,  97 extinct) [same extinctions as:I c 2 a]
  (# 73) I b c a       : Rwp= 74.99%  GoF=   361.16  nGoF=    42.54  ( 20 reflections, 103 extinct)
  (# 73) I c a b       : Rwp= 74.99%  GoF=   361.16  nGoF=    42.54  ( 20 reflections, 103 extinct) [same extinctions as:I b c a]
  (# 74) I m m a       : Rwp= 73.52%  GoF=   346.76  nGoF=    59.78  ( 29 reflections,  91 extinct) [same extinctions as:I 2 m b]
  (# 74) I m m b       : Rwp= 73.52%  GoF=   346.76  nGoF=    59.78  ( 29 reflections,  91 extinct) [same extinctions as:I 2 m b]
  (# 74) I b m m       : Rwp= 74.10%  GoF=   351.89  nGoF=    56.07  ( 27 reflections,  93 extinct) [same extinctions as:I b m 2]
  (# 74) I c m m       : Rwp= 74.10%  GoF=   351.89  nGoF=    56.07  ( 27 reflections,  93 extinct) [same extinctions as:I b m 2]
  (# 74) I m c m       : Rwp= 72.53%  GoF=   339.35  nGoF=    56.25  ( 28 reflections,  93 extinct) [same extinctions as:I m a 2]
  (# 74) I m a m       : Rwp= 72.53%  GoF=   339.35  nGoF=    56.25  ( 28 reflections,  93 extinct) [same extinctions as:I m a 2]
Restoring best spacegroup: P 21 c n

Add SO4 and Pb to the crystal structure

First create the atomic scattering powers, then

[7]:
pb = ScatteringPowerAtom("Pb", "Pb", 1.0)
s = ScatteringPowerAtom("S", "S", 1.5)
o = ScatteringPowerAtom("O", "O", 2.0)

# When manually creating atomic scattering power, they must be added
# to the Crystal. This is done automatically when importing a Molecule.
c.AddScatteringPower(pb)
c.AddScatteringPower(s)
c.AddScatteringPower(o)

c.AddScatterer(Atom(0.25,0.25,0.25,"Pb", pb))
c.AddScatterer(MakeTetrahedron(c,"SO4",s,o,1.5))

# Let's see what is the resulting crystal contents
print(c)
UnitCell : (P m c n)
    Cell dimensions :  5.39782   6.95807   8.47841  90.00000  90.00000  90.00000
List of scattering components (atoms): 6
Pb               at :  0.2500 0.2500 0.2500, Occup=1.0000 * 0.5000, ScattPow:Pb              , Biso=    1.0000
S                at : -0.0000 0.0000-0.0000, Occup=1.0000 * 0.5000, ScattPow:S               , Biso=    1.5000
O1               at : -0.0000 0.0000 0.1769, Occup=1.0000 * 1.0000, ScattPow:O               , Biso=    2.0000
O2               at : -0.0000 0.2033-0.0589, Occup=1.0000 * 1.0000, ScattPow:O               , Biso=    2.0000
O3               at :  0.2270-0.1017-0.0589, Occup=1.0000 * 0.5000, ScattPow:O               , Biso=    2.0000
O4               at : -0.2270-0.1017-0.0589, Occup=1.0000 * 0.5000, ScattPow:O               , Biso=    2.0000

Occupancy = occ * dyn, where:
        - occ is the 'real' occupancy
        - dyn is the dynamical occupancy correction, indicating  either
          an atom on a special position, or several identical atoms
          overlapping (dyn=0.5 -> atom on a symetry plane / 2fold axis..
                               -> OR 2 atoms strictly overlapping)

 Total number of components (atoms) in one unit cell : 32
 Chemical formula: O3 Pb0.5 S0.5
 Weight: 167.635 g/mol

Create the neutron powder diffraction data and fit the profile

The same steps as for the X-ray data are performed.

However the peak width is larger so that must be fixed to start

[8]:
pn = PowderPattern()
if not os.path.exists("pbso4-n.dat"):
    os.system("curl -o pbso4-n.dat https://raw.githubusercontent.com/vincefn/objcryst/master/Fox/example/tutorial-pbso4/neutron.dat")
pn.ImportPowderPatternFullprof("pbso4-n.dat")
pn.GetRadiation().SetRadiationType(RadiationType.RAD_NEUTRON)
pn.SetWavelength(1.909)
pn.SetMaxSinThetaOvLambda(0.3)
pdiffn = pn.AddPowderPatternDiffraction(c)

#
pdiffn.GetProfile().GetPar("W").SetValue(0.001)


pn.FitScaleFactorForIntegratedRw()

# Plot
pn.plot(diff=True, fig=None, hkl=True)

# Fit profile - we keep the unit cell fixed as it was already refined
pn.quick_fit_profile(auto_background=True,plot=True, init_profile=True, cell=False, verbose=True)
pn.quick_fit_profile(plot=False, init_profile=False, cell=False, asym=True, displ_transl=True,
                     backgd=False, verbose=False)

print("Fit result: Rw=%6.2f%% Chi2=%10.2f  GoF=%8.2f  LLK=%10.3f" %
      (pn.rw * 100, pn.chi2, pn.chi2/pn.GetNbPointUsed(), pn.llk))
Imported powder pattern: 2920 points, 2theta= 10.000 -> 155.950, step= 0.050
No background, adding one automatically
Selected PowderPatternDiffraction:    with Crystal:
Profile fitting finished.
Remember to use SetExtractionMode(False) on the PowderPatternDiffraction object
to disable profile fitting and optimise the structure.
Fit result: Rw=  9.81% Chi2=   4134.04  GoF=    1.42  LLK=   282.992

Create a MonteCarlo object and add objects (crystal, powder patterns) for optimisation

[9]:
mc = MonteCarlo()
mc.AddRefinableObj(c)
mc.AddRefinableObj(px)
mc.AddRefinableObj(pn)

Disable profile fitting before Monte-Carlo

..or else the crystal structure will not be optimised

Note that the following display will be live-updated during the optimisation done below (the last plot is always updated).

[10]:
pdiff.SetExtractionMode(False)
pdiffn.SetExtractionMode(False)

px.FitScaleFactorForRw()
pn.FitScaleFactorForRw()

pn.plot(fig=None,diff=False,hkl=True)
px.plot(fig=None,diff=False,hkl=True)

Display the 3D crystal structure

Note: this requires installing ``ipywidgets`` and ``py3Dmol`` (as of 2021/05 the conda-forge version is obsolete, so just install using pip). Otherwise You will just get a warning message

This will be updated live during the optimisation, and also when using RestoreParamSet() to restore some specific solutions (and generally everytime the underlying Crystal’s UpdateDisplay() function is called). Just scroll back to see what is being done in the widget.

The display() is only really necessary to make sure the widget appears in the notebook. In fact if c.widget_3d() is the last command in the notebook cell, the display is done automatically. See the ipywidgets documentation if you want to understand this in more details.

Note that bonds may disappear during optimisation, because they are automatically assigned by the javascript viewer, which is quite strict about allowed distances. In the final solution some bonds in the middle of the chain are often missing, though you can see the atoms are reasonably close. But rest assured that any bond defined in the object still exists as defined in pyobjcryst !

[11]:
display(c.widget_3d())

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Run multiple optimisations

We also enable the automatic least squares every 150k trials, which allows a better convergence

We perform 3 runs, each of 1 million trials using parallel tempering, with default parameters (which should be adequate for all problems). Normally for this structure it would be better to use 2 millions trials so that the correct solution is found during almost every run.

Each run starts from a randomised configuration.

[12]:
mc.GetOption("Automatic Least Squares Refinement").SetChoice(2)
print("LSQ option: ", mc.GetOption("Automatic Least Squares Refinement").GetChoiceName(2))

# 3D structure view which will be live-updated with the best
# configuration of the current run
display(c.widget_3d())

# Small widget to see the progress of the optimisation, with the current run
# best log-likelihood, the run number and remaining number of trials.
display(mc.widget())

# The powder pattern plot a few cells above should also be updated for each run best solution
mc.MultiRunOptimize(nb_run=3, nb_step=1e5)
print("Final LLK: %.2f" % mc.GetLogLikelihood())
LSQ option:  Every 150000 trials, and at the end of each run

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Final LLK: 3048.41

List solutions

All solutions are stored in a “Parameter Set” which can be restored (assuming that the objects - crystal structure and powder pattern are not altered e.g. by changing the list of atoms, the profile, or the fixed parameters etc…).

This will only record changes of parameters such as atom coordinates, but will not record other changes such as a different spacegroup, or a change of the Scatterers (number of atoms or molecules) inside a Crystal. It can only be used to browse results obtained at the end of MultiRunOptimize().

At the end of the optimisation the best solution is automatically restored.

[13]:
for i in range(mc.GetNbParamSet()):
    idx = mc.GetParamSetIndex(i)
    cost = mc.GetParamSetCost(i)
    name = mc.GetFullRefinableObj().GetParamSetName(idx)
    print("%3d: LLK=%10.2f, name=%s"%(idx, cost, name))
  0: LLK=   3813.00, name=Best Configuration
  1: LLK=   3879.00, name=Run #3
  2: LLK=   3813.00, name=Run #2
  3: LLK=   3889.00, name=Run #1

Restore a chosen solution (set of parameters)

Restoring a solution will also update the 3D crystal view above.

[14]:
pn.plot(fig=None, diff=True)
px.plot(fig=None, diff=True)
mc.RestoreParamSet(3, update_display=True)

Save results to CIF and Fox (.xmlgz) formats

[15]:
# Save result so it can be opened by Fox
xml_cryst_file_save_global('result-pbso4.xmlgz')
# Also export to the CIF format
c.CIFOutput("result-pbso4.cif")