Isotope-dependent neutron scttring lengths missing
Opened this issue · 4 comments
In the case of neutron diffraction, the isotope matters a lot since they have completely different scattering lengths. For this application, it would be important to make this package isotope-aware. One option could maybe be to replace https://github.com/DanPorter/Dans_Diffraction/blob/master/Dans_Diffraction/data/Dans%20Element%20Properties.txt by using https://github.com/pkienzle/periodictable/tree/master/periodictable instead.
Hi thamnos, thanks very much for your interest in Dans_Diffraction!
That's a great idea to implement neutron scattering lengths for isotopes. It should be fairly easy to to implement so I'll have a look and see what I can do.
That's great, thank you!
Maybe one more note: It is quite common that certain atoms are not one isotope or the other but a random mixture. This is especially true for "exchangeable hydrogens", i.e. N-H and O-H, but it is also impossible to purchase 100.0% pure 11B, for example. Just so that you have that on your radar; I guess it can be easily solved using occupancies.
Also, another note regarding neutron scattering lengths: They can be complex numbers (e.g., B) and I do believe you have to include the imaginary part (connected to absorption) in the scattering calculations; it disappears "at the end" when you compute the intensity by taking the absolute value squared of the amplitude. I assume this is the same for resonant X-ray scattering?
Hi thamnos. I've just pushed a new branch with some changes to add complex neutron scattering lengths and support for isotopes.
I've been struggling a bit to get to grips with the "periodictable" package but I used it to make a table of isotopes. In the future I may add it as an import.
Complex neutron scattering lengths can be obtained using the new function:
b_Ti = dif.fc.neutron_scattering_length('46-Ti')
Or, isotopes can be specified in place of elements in the crystal structure:
xtl = dif.structure_list.LiCoO2()
xtl.Atoms.changeatom(0, type='7-Li')
xtl.generate_structure()
I've put a new example file to try: examples/example_complex_neutron_scattering.py
To add concentrations of different isotopes you'd have to add multiple isotopes at the same atomic site with different occupancies.
Please have a look and a play with the new functions and let me know what you think.