Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A colab notebook to compare XRD outputs to predicted powder spectra #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

j-wags
Copy link

@j-wags j-wags commented Aug 7, 2023

Summary

This PR adds a colab-friendly notebook that predicts Cu3P, CuP2, and Cu2P7 spectra from their cif files, and visually compares those spectra to your Saturday Aug 5 XRD data. This notebook may be useful for predicting powder spectra of other compounds and verifying your results.

Screen Shot 2023-08-07 at 10 27 39 PM

Full text

Hi - Thanks for sharing your data, it's been really cool following your efforts this weekend. I met with a friend who does XRD and showed him your data on Saturday, and he used some software to compare to the predicted Cu3P spectra and also determined that you had a problem (which others diagnosed as a backwards ratio of Cu to P).

What bothered me was that all the software he used had super expensive licenses or was really hard to get/install/use.

So I found an open-source python project HEXRD and set it up to run in a colab notebook, in case that gives you an easier way to analyze your data.

A HUGE DISCLAIMER: I'm a computational chemist and I've never dealt with direct processing of XRD data before.

Here's a link to run it on colab if you want to try it out. There's a little spooky magic at the beginning to get conda running, and when the first cell runs successfully it'll say "the kernel crashed", but that just means it worked correctly and you can ignore it.

@j-wags
Copy link
Author

j-wags commented Aug 7, 2023

I've been informed that TTh is dependent on wavelength. I didn't input any wavelength so HEXRD must have been using a default value. Looking again, I saw that you provided the experimental wavelength in your tweet.

wavelengths 1.540562 Å and 1.544390 Å (ratio 0.5).

I'll try setting these when I'm done with work and maybe that will remove the need for the mystery scaling factor.

@j-wags
Copy link
Author

j-wags commented Aug 8, 2023

Yup, that was it. Once I put in the correct energy everything works without any magic scaling factors. I've updated the original post to remove the big warning labels.

This should be ready for people to play with - it'll let anyone do simple visual analysis of powder XRD in their browsers. Let me know if I can explain this better or make anything simpler (I think that folks may be confused about how to get different cif or experimental data files in there, so let me know if that could use more explanation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant