PDFCalculator - Using CdS tutorial example to calculate different structures

144 views
Skip to first unread message

Beatriz Moreno

unread,
Sep 27, 2015, 10:13:32 PM9/27/15
to diffpy-users
Dear All,
I modified the CdS tutorial example to calculate the PDF of TiO2 (9004141.cif) with PDFCalculator, and it worked perfectly.

Then, I tried to calculate the gold PDF without success. I tried different Au cif files, thinking this might be the problem, but nop.

The gold cif files tried are: 9012953.cif, 9013035.cif, and 1100138.cif.

The result for the gold (r,g) plot was a straight line, downward slope, from 0 to -15, instead of the PDF for Au?

Please, would someone know how to solve this?

I've copied the code below, in case it helps.

Thanks in advance, Beatriz.

from diffpy.Structure import loadStructure

from diffpy.srreal.pdfcalculator import PDFCalculator

from matplotlib.pyplot import plot, show


TiO2 = loadStructure('TiO2_9004141.cif')

pc1 = PDFCalculator()

pc1.rmax = 20

r1, g1 = pc1(TiO2)

plot(r1, g1)

show()


Au = loadStructure('9012953.cif')

pc1 = PDFCalculator()

pc1.rmax = 20

r2, g2 = pc1(Au)

plot(r2, g2)

show()

 

Pavol Juhas

unread,
Sep 28, 2015, 1:34:42 AM9/28/15
to diffpy...@googlegroups.com
On Sun, Sep 27, 2015 at 07:13:32PM -0700, Beatriz Moreno wrote:
...
> Then, I tried to calculate the gold PDF without success. I tried different
> Au cif files, thinking this might be the problem, but nop.
>
> The gold cif files tried are: 9012953.cif, 9013035.cif, and 1100138.cif.
>
> The result for the gold (r,g) plot was a straight line, downward slope,
> from 0 to -15, instead of the PDF for Au?
>
> Please, would someone know how to solve this?
...

> Au = loadStructure('9012953.cif')
> pc1 = PDFCalculator()
> pc1.rmax = 20
> r2, g2 = pc1(Au)

Hi Beatriz,

This happens when CIF file has no values for the displacement
parameters. In such case they are all assumed zero and the
PDF peaks end up with an invalid zero width.

There are 2 options how to correct this:

(A) - reset all ADP-s to some nonzero value:

Au.Uisoequiv = 0.004
r2, g2 = pc1(Au)


(B) - configure PDFCalculator to use a constant width for all peaks,
and thus disregard APDs from the structure file.

from diffpy.srreal.pdfcalculator import ConstantPeakWidth
pc1.peakwidthmodel = ConstantPeakWidth()
# set a uniform constant FWHM for all peaks in the PDF
pc1.peakwidthmodel.width = 0.1
r3, g3 = pc1(Au)


Hope this helps,

Pavol

Beatriz Diaz

unread,
Sep 29, 2015, 12:35:19 AM9/29/15
to diffpy...@googlegroups.com

Hi, Pavol,
Both options worked!
Many thanks! :-)
Beatriz


--
You received this message because you are subscribed to a topic in the Google Groups "diffpy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diffpy-users/MhC3Fyle2JM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to diffpy-users...@googlegroups.com.
To post to this group, send email to diffpy...@googlegroups.com.
Visit this group at http://groups.google.com/group/diffpy-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages