Hey there,

I've recently done a fair amount of searching around to find some kind of
software we can use to create XRD powder pattern plots for Avogadro2.
Unfortunately, it seems that most software for it is proprietary. I did not
find any software that has a 3-clause BSD license.

I did, however, find a GPLv2 library that we can potentially use via an
external executable. The library is ObjCryst++ (
https://github.com/vincefn/objcryst), and it is part of the Fox program
(also in that link). The author is Vincent Favre-Nicolin, who is responsive
to emails (I emailed him about it for some advice).

Now, I can think of two approaches for us to do with this (and I have
already made progress towards the second approach):

1. Use the static Fox-nogui (build-able in the Fox source code) executable
to do the work. You can run "Fox-nogui" with the argument "--cif2pattern"
and specify more command line options (for things such as wavelength,
etc.), and it will take a cif file as input and write the XRD pattern data
to an output file. The only problem with this approach is that it requires
creating files (you can't use stdin and stdout to perform the operations).

A possible modification to approach 1 is this: I could see if Vincent will
let me contribute to the ObjCryst++ source by allowing --cif2pattern to
take stdin input and print to stdout.

2. Write our own static executables using the ObjCryst++ library. I have
already done this successfully for Linux. The benefit is that I have set it
up to use stdin and stdout directly, so no file creation is needed. You can
see the main C++ file that I wrote to do this work here:
https://github.com/psavery/plotXrd/blob/master/genPowderDiffraction.cpp

I was then planning on using VTK in Avogadro2 to generate the plots. I have
already been experimenting with VTK plots a little bit.

Anyways, let me know what your opinions are on the matter. I think this
could be a really cool feature! With a crystal, you could choose to perform
an XRD powder pattern calculation from a drop-down menu, select a few
options (wavelength, peak width, angle range, num points), and then quickly
generate a plot! An example plot for diamond is attached (it matches the
literature).

Patrick
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel

Reply via email to