brucefan1983 / GPUMD

Graphics Processing Units Molecular Dynamics
https://gpumd.org/dev
GNU General Public License v3.0
412 stars 109 forks source link

Add two "compute" of X-diffraction and electron-diffraction spectra, please. #252

Closed grtheaory closed 1 year ago

grtheaory commented 1 year ago

If you have time, consider adding two "compute". The first is the X-ray diffraction pattern of the structure, similar to the "compute xrd"[1-3] in LAMMPS; The second is the electron diffraction pattern of the structure, similar to "compute saed"[2,4] in LAMMPS. X-ray diffraction and electron diffraction spectroscopy are very common methods of material characterization in experiments. These two calculations can be directly compared with experimental maps to obtain basic structural information, which is very useful.

(I will upload all references to the QQ group "GPUMD Learning Exchange group (887975816)") [1] Virtual diffraction analysis of Ni [0 1 0] symmetric tilt grain boundaries. (https://iopscience.iop.org/article/10.1088/0965-0393/21/5/055020) [2] International Tables for Crystallography Volume C: Mathematical and Chemical Tables, 554-95 (2004). [3] Robust Parameterization of Elastic and Absorptive Electron Atomic Scattering Factors. (https://doi.org/10.1107/S0108767395014371)
[4] Relativistic Hartree–Fock X-ray and electron atomic scattering factors at high angles. (https://doi.org/10.1107/S0108767389007567)

brucefan1983 commented 1 year ago

Thanks for the suggestion, perhaps these are something for GPUMD-v3.5 or future versions.

brucefan1983 commented 1 year ago

Erik said this is almost doable in dynasor and he is also improving it. @grtheaory

It is better to leave this for dynasor

erikfransson commented 1 year ago

Just to add to what Zheyong mentioned above, you can compute the static structure S(q) for each atom-type with dynasor, and then obtaining the x-ray or electron beam weighted structure factor (intensity) is just a matter of summing S(q) with different weights.

We are currently working on implementing all the atomic form factors in dynasor and hopefully it will be available soon, but if you want to try it today you can do the weighting manually as a post-processing step.