Output Data Format for further processing and typing in composition

74 views
Skip to first unread message

Bjarke Søgaard Laugesen

unread,
Sep 6, 2018, 6:42:38 AM9/6/18
to diffpy-users
Hi, 
I'm mostly familiar with MATLAB, and for this reason I want to import the generated .gr files into MATLAB. Unfortunately it can't import .gr files. Is there a way to use pdfgetx3 to convert .gr files to .asc files or something else like .txt files?
I haven't been able to find a solution on diffpy.org or in this forum.

Working with a drug like Danazol, is there a more fully describing way of typing in the composition than '--composition=C22H27NO2'? In such a manner that such elements as double bonds will be taken into consideration. 



Cheers


Pavol Juhas

unread,
Sep 6, 2018, 7:06:33 PM9/6/18
to diffpy...@googlegroups.com
On Thu, Sep 06, 2018 at 03:42:38AM -0700, Bjarke Søgaard Laugesen wrote:
> Hi,
> I'm mostly familiar with MATLAB, and for this reason I want to import the
> generated .gr files into MATLAB. Unfortunately it can't import .gr files.
> Is there a way to use pdfgetx3 to convert .gr files to .asc files or
> something else like .txt files?
> I haven't been able to find a solution on diffpy.org or in this forum.

Hi Bjarke, The ".gr" files from pdfgetx3 are text files
with 2 columns for r and G.
They start with a header containing pdfgetx3 parameters.
The data block begins after a line staring with "#L".

This is perhaps more of a Matlab question,
but its readtable function may work out of the box
https://www.mathworks.com/help/matlab/ref/readtable.html.
Otherwise it should be fairly simple to write a loader
function in Matlab that skips after the "#L" line.

> Working with a drug like Danazol, is there a more fully describing way of
> typing in the composition than '--composition=C22H27NO2'? In such a manner
> that such elements as double bonds will be taken into consideration.

No. The double bonds are not considered at all in PDF extraction.
The composition is only used to obtain average scattering factors,
which then normalize raw intensities.
pdfgetx3 however understands parentheses, for example
composition = CH3 (CH2)5 CH3

Hope this helps,

Pavol

--
Dr. Pavol Juhas
Computational Science Initiative
Brookhaven National Laboratory
P.O. Box 5000
Upton, NY 11973-5000

Bjarke Søgaard Laugesen

unread,
Sep 17, 2018, 8:29:39 AM9/17/18
to diffpy-users
Thanks for the answer and the software, it is greatly appreciated.

Despite having searched through the whole forum and different sources I still have a couple of questions:

I'm currently analyzing XRPD with my 1st column of raw data being 2theta.
What I want is to see changes as I'm heating up my sample. Therefor I want to convert approx 17 diffractograms to G(r)/r.
So far I've kept the input parameters to a minimum, using the command -NONE and only typing in the wavelength and chemical composition.
  • Does the software automatically figure out that the 1st column i 2theta, and not Q?
  • If I don't type in any Qmax or Qmaxinst, and the software puts in a value for me (as it is shown in the tutorial using the command -NONE), does it have any consequences?
  • The book 'Underneath the Bragg Peaks' states the G(r) is the reduced PDF whereas g(r) is the PDF. Yet in PDFgetx3 it seems that G(r) is the PDF. Any reason for this?
I hope these questions aren't too inconvenient.

Cheers, Bjarke

Reply all
Reply to author
Forward
0 new messages