xraypy / xraylarch

Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging, and more.
https://xraypy.github.io/xraylarch
Other
133 stars 64 forks source link

Add functionality for generating quick first shell EXAFS models #514

Open maurov opened 5 months ago

maurov commented 5 months ago

As discussed at the latest developers meeting, it would nice to have a function that generates a simple cluster of atoms and runs a FEFF calculation on it. Something like:

first_shell_model(absorbing_atom, scattering_atom, distance_in_ang, coordination=1):

Such function can then be wrapped in a Jupyter notebook and in the Larix GUI. Furthermore, a database of standard configurations should be built out of it.

Ameyanagi commented 5 months ago

I was wondering what would be a good API to deal with elements with multiple sites. For example, Co3O4, has tetrahedral sites and octahedral sites for the Co, which makes the api a little harder.

maurov commented 5 months ago

I was wondering what would be a good API to deal with elements with multiple sites. For example, Co3O4, has tetrahedral sites and octahedral sites for the Co, which makes the api a little harder.

For this case, I would simply do:

 # build the cluster and generate feff.inp
co3o4_td = first_shell_model('Co', 'O', 1.943, coordination=4, run=False)
co3o4_oh = first_shell_model('Co', 'O', 1.912, coordination=6, run=False)
# run FEFF
co3o4_td.run()
co3o4_oh.run()