Giter Club home page Giter Club logo

Comments (4)

DanPorter avatar DanPorter commented on June 26, 2024 1

Hi @thomasaarholt, thanks for commenting! This is indeed a strange issue.

I won't upload Sirius' cif without permission, but will ask. I've uploaded a very simple structure with no symmetry, only 1 element and I still see variations in the intensity:
trial_structure.cif.txt

This evening I have had a close look through the differences in intensity calculation between my code, Vesta and CrystalDiffract. The documentation for Vesta is excellent and I can see there are a few differences. I'm still struggling to work out how CrystalDiffract works as I can't produce anything similar yet, although the documentation mentions something about normalising by the density.

One difference between x-ray scattering intensities in Dans_Diffraction is a slight difference in the analytical coefficients used to calculate the x-ray scattering factor -I use the values from the international tables of crystallography and Vesta uses values from the paper by Waasmaier and Kirfel (Acta Cryst 1995). On testing, this made very little difference however.

Another difference is in the method of calculating the Debye-Waller factor (accounting for the thermal motion of atoms). I haven't compared the calculation methods yet but if I set the Uiso value in the above CIF to 0 (or very very small), I suddenly calculate the same intensities.

So some progress... do let me know how you get on with other programs!

from dans_diffraction.

thomasaarholt avatar thomasaarholt commented on June 26, 2024

Oddly enough, today I am wondering the same thing. We just had a master student come in and complain that various softwares are giving different relative intensities for peaks simulated with Vesta (here, the plot and table disagree as well) and PowderCell (20 year old software).

This raises the question of what is causing the difference, and is of particular import when trying to fit a pattern to a powder diffraction of an unknown structure.

If you attach the above Rutile Cif here, I can provide equivalent tables from the other softwares.

from dans_diffraction.

DanPorter avatar DanPorter commented on June 26, 2024

After investigating the rutile.cif structure:

  • The values I/Imax e.g. (110) = 95.07 come from choosing a different Imax. I find the largest reflection to be the (002), rather than the (110)
  • Even once this is changed however, the values are still slightly different.
  • I compared your values to another piece of common crystallographic software - Vesta, but now things are even more confusing as they came up with a third answer!

My current hypothesis is that the difference arises from the definition of the x-ray scattering factor. My code uses the analytical approximation from the International Tables of Crystallography, though other methods of interpolation are possible. I will investigate this more closely later this week if I get some time.

from dans_diffraction.

DanPorter avatar DanPorter commented on June 26, 2024

I've been very busy recently but I have now had a closer look through the differences in intensity calculation between my code, Vesta and CrystalDiffract. The documentation for Vesta is excellent and I can see there are a few differences. I'm still struggling to work out how CrystalDiffract works as I can't produce anything similar. The CrystalDiffract documentation mentions something about normalising by the density, but I still haven't reproduced their numbers.

One difference between x-ray scattering intensities in Dans_Diffraction is a slight difference in the analytical coefficients used to calculate the x-ray scattering factor. I use the values from the international tables of crystallography and Vesta uses values from the paper by Waasmaier and Kirfel (Acta Cryst 1995). On testing however, this made very little difference and does not account for the differences in intensity we see.

Another difference is in the method of calculating the Debye-Waller factor (accounting for the thermal motion of atoms). In the original CIFs supplied by Sirius (attached: Rutile.cif.txt, Spinel - Ono 08.cif.txt) there were no thermal parameters specified, and the default choosen is different between VESTA and Dans Diffraction, and probably CrystalDiffract. My code takes a value of u_iso=0.0 as default, VESTA takes B=1.0. If I set the same value, I got almost the exact match. Comparing the methods of calcualtion it turned out I had made a slight mistake in my calculation of the Debye-Waller factor.

I have now updated Dans_Diffraction with these corrections and version 1.9.9 is now available on GitHub. I have included an example script that compares the intensities: example_intensity_comparison.py

I have also comapred intensities across a wider range of software using the trial_structure above. The results are tabulated below:
X-Ray Intensities - trail_strucuture.cif
Energy = 8.0480 keV, wl = 1.5406 A
(h,k,l) two-theta ITA Waasmaier Vesta CrystalDiffract CCTBX Mercury
[1, 0, 0] 31.2487 411.85 412.09 412.09 34.21 412.09 411.85
[1, 1, 0] 44.7775 301.35 301.26 301.26 20.70 301.26 301.35
[1, 1, 1] 55.6136 231.05 230.89 230.89 13.75 230.89 231.05
[2, 0, 0] 65.1847 181.84 181.82 181.82 9.62 181.82 181.84
[2, 1, 0] 74.0607 146.03 146.11 146.11 7.01 146.11 146.03
[2, 1, 1] 82.5568 119.24 119.36 119.36 5.29 119.36 119.24

Here we can see that some codes by default use the ITA x-ray scattering analytical coefficients (Mercury) and others use the Waasmaier + Kirfel coefficients (Vesta, CCTBX).

from dans_diffraction.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.