# [lammps-users] Question about the structure factor

Dear LAMMPS users,

I am wondering whether LAMMPS can calculate the structure factor for the simulated system. The structure factor I mean indicates the crystallization of the system, specially when the system transit from liquids to solids. So the structure factor can give us a kind of translational order parameter.

I am not sure which quantity in LAMMPS can show this change or something has the similar function in LAMMPS can be calculated.

Your kind help would be most appreciated.

Best
Yajie

Dear Yajie,

If your system is simple enough, you can calculate the radial distribution function using fix rdf and transform that to get the static structure factor.

Otherwise, you can dump the positions of all the atoms and post-process to get the static structure factor.

Joanne

Yajie,

I’ve actually had good success getting structure factors by doing Fourier transforms of the radial distribution functions. You have to pay attention to some issues like truncation; in a small system, it can be difficult to keep artifacts out of the structure factor, especially at small q. But I don’t think it’s all that dangerous. There’s a recent paper (Troitzsch et al., JPCB 111,8210) that does think it’s dangerous, and gives an outline of how to calculate the structure factor directly, using something like an Ewald sum to deal with small q structure due to the periodic replicas. But their own data shows that if you’re careful, you can get good structure factors from the Fourier transform of the RDF valid down to q=2 A^-1 or so.

Hope this helps,
Chris.

My recollection is you can compute some structure factors without an FFT,
but maybe that assumes some known ordering of the lattice. Kind of
like the centro-symmetry parameter that LAMMPS does have (see compute
centro).

Steve

Thank you very much, Steve. That really makes some sense.

Another question related to the structure analysis is whether LAMMPS can output the density distribution directly?

Best
Yajie

Hi Yajie Lei,

I implemented an order parameter (structure factor) in my previous work to study solid-to-liquid phase transitions using lammps (see link below). I used a post processing step to calculate it based on the atom positions, so the post processing was on files several GBs in size.

http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal&id=PRBMDO000076000022224104000001&idtype=cvips&gifs=Yes

Jaime

if you mean g(r) then look at fix rdf

Steve