Illegal Compute XRD Command

Hi all,
im using LAMMPS (24 Dec 2015)

what am i doing wrong?

compute 1 all xrd 1.541838 C H C O N H N H O H C C C 2Theta

I’ve 13 atom-types…do i need any additional lammps-package? The doc doesnt tell me.

thx in advance,
best regards.
frank.

Hi Frank

You need to add values for 2Theta. For example,

compute 2 all xrd 1.541838 Al O 2Theta 10 100

Also, compute xrd and compute saed are part of the user package USER-DIFFRACTION. So make sure that is installed first.

Shawn

Hi shawn,
The doc says:The option defaults are 2Theta = 1 179 (degrees), c = 1 1 1, LP = 1, no manual flag, no echo flag.

ill try it again with user package installed.
Thanks a lot.

Hi Frank

You need to add values for 2Theta. For example,

compute 2 all xrd 1.541838 Al O 2Theta 10 100

Also, compute xrd and compute saed are part of the user package USER-DIFFRACTION. So make sure that is installed first.

Shawn

hi Frank,

The default values are active if you do not use any keywords. If you use a keyword, such as 2Theta, the compute expects the associated values.

Shawn

thx, shawn

hi Frank,
The default values are active if you do not use any keywords. If you use a keyword, such as 2Theta, the compute expects the associated values.
Shawn

Btw, the compute still doesnt work. I always get a segmentation fault. Does it only work for metals like shown in examples/USER/diffraction/ ? Because Im tryin to apply it to a polymer-system. Debyer has no problems with my input-file, but i’d prefer to use lammps for that.
Here’s my error:

Hi Frank,

I’ve used it for polymer systems without any issues. Segmentation faults can be tricky to debug. In my experience I sometimes get them when the compute runs out of memory. Memory issues for compute xrd occurs when your simulation has lots of atoms and more importantly when you explore lots of RELP. But, from your output your system doesn’t seem very big. If possible, can you please send a simplified input script that reproduces the problem?

Also do note, that compute xrd creates x-ray diffraction line profiles in a manner that is different than programs like Debyer because it does not use the Debye scattering equation. They will converge to the same result, but compute xrd will likely be more expensive. If you or someone would like help integrating a compute version of the Debye scattering equation, I would be happy to help as much as I can.

A short summary of the differences and pros/cons below:

Compute XRD-

Solves the structure factor equations on a mesh grid of reciprocal space (RELP) then spherical integrates the intensities relating to various scattering angles.

Pros: Computes 3D intensity data providing a wealth of information on orientation

Cons: More computationally expensive

Debye Scattering Equation

Based on an analytical spherical integration of the structure factor equations. So directly computes intensity vs. scattering angle.

Pros: Less computationally expensive

Cons: Loose 3D data

Shawn