glotzerlab / freud

Powerful, efficient particle trajectory analysis in scientific Python.
https://freud.readthedocs.io
BSD 3-Clause "New" or "Revised" License
277 stars 49 forks source link

1-d structure factor calculation #652

Closed ramanishsingh closed 3 years ago

ramanishsingh commented 4 years ago

Is your feature request related to a problem? Please describe. Right now freud does not compute 1-d structure factor. It would be nice to have that feature. The equation of the 1-d structure factor is given here : http://isaacs.sourceforge.net/phys/scatt.html (equation 1).

Describe the solution you'd like Desired solution: A function that takes an mdtraj trajectory and gives out the structure factor (s(q) and q).

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context This repository (MIT License) : https://github.com/mattwthompson/scattering/pulls has some tools to calculate scattering properties of materials. If needed, hints can be taken from this repo.

bdice commented 3 years ago

This demonstrates another approach using OVITO: https://www.ovito.org/forum/topic/calculation-of-the-structure-factor/

  1. Use "Compute Property" to create a property with value 1 for all particles
  2. Use "Spatial Correlation Function" with an appropriate FFT spacing to compute S(q)

image