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