genXrnPattern binary location/installation?

Hi there,
I wanted to use the PXrd function generation under Crystal/Plot Theoretical …
As I attempted to use it, the binary was missing. I tried to look for the information as to where to place it, but so far I am unsuccessful.
Since I am using Linux I assumed it may need to be located in .local/share/OpenChemistry/Avogadro but that did not seem to work.
Would you mind explaining in the documentation how we could use it?
Thanks.

(System Ubuntu 24.04, version 1.102.1).

It’s looking in the same directory as the main binary. It will also check the GENXRDPATTERN_EXECUTABLE environment variable too.

It should check the whole PATH though:

On the roadmap is to clean this up a bit so other programs can supply an XRD pattern (e.g., a Python plugin using pymatgen)

This pull request should also check PATH for the genXrdPattern binary.

1 Like

Thank you for all the update.
Just for the sake of completeness, I tried having it in the same folder but this not working (executable name is correct and I can run it from a terminal)

What’s the error message when you try to use it in Avogadro?

It hasn’t been extensively tested, so it’s possible that it’s failing.

same error, the executable (located in /usr/bin/ next to the avogadro one) could not be found. (even of course after restarting the avogadro, and even running it in a terminal for which the last lines are
Open Babel formats ready: 145
Setting default format to cjson.
current version is newer than latest release
“Error: could not find genXrdPattern executable!”
Error in generateXrdPattern : “Error: could not find genXrdPattern executable!”)

Try the continual build, which should check PATH for the program:

Looks like it should be pretty easy to build a Python script with pyobjcryst as an alternative to the binary. (In other words, I’ll see if I can port this to a Python script.)

Alternatively, I’ll see if I can fork Patrick’s repo and add in some options (e.g., XRD vs. neutron diffraction)