Calculate dynamic structure factor

Dear all:

I have saved more than 20G binary trajectory data for my simulation of a polymer ( 2 Million configurations of the polymer of length 1024. )

Now I want to calculate the dynamic structure factor S(k,t)

S(k,t)=1/N \sum_{n,m} < exp{ ik [ r_n(t) - r_m(0) ] } >

This seems to be a very big calculation. E.g. if I want to calculate S(k, t=10), I have to use all the configurations of time interval of 10, which are
t=0 and t=10,
t=1 and t=11,
t=2 and t=12,
t=3 and t=13,
.
.
.
t=2M-10 and t=2M.

In order to do this, the only way I can think of is to put all the data into memory, but it is more than 20G.

Does anybody know that there is command to calculate this in LAMMPS, or there is some other open source for this kind of calculation?

Thanks!!

Aiqun Huang

Hello,

you don't need to keep all the data in memory at once. Dynamic structure factor can be represented as a temporal Fourier transform of an intermediate scattering function, which, in turn, needs for its calculation only one complex number for each moment of time (one for each wave vector). So you can read your trajectory one configuration at a time, calculate these complex numbers (spatial Fourier transforms of an instantaneous density function) for all the wavevectors you need, then re-read the coordinates (you don't need the processed configuration anymore). You may find the equations, e.g., in http://iopscience.iop.org/0953-8984/13/34/320 . Some time ago I wrote the program for just this purpose based on the mentioned paper, but it's poorly written and was never actually prepared for public distribution. If you're interested, I'll see if I can make it available.

Regards,
Oleg.

14.10.2013, 22:45, "Aiqun Huang" <[email protected]...>:

Hello,

nMoldyn
http://dirac.cnrs-orleans.fr/plone/software/nmoldyn
should do what you want -- although it is best known to calculate the
dynamics structure factor as you would measure it with neutron
scattering, it has an option to weigh all atoms equally.

Another option might be SASSENA
http://www.sassena.org/
Although I am not sure if you can weigh all atoms equally rather than
with their neutron scattering length, I would be very surprised if you
couldn't.

I've installed nMoldyn and found it quite painful -- but you can get a
Ubuntu Live DVD which has (among other things) nMoldyn preinstalled:
http://www.ill.eu/instruments-support/computing-for-science/cs-software/all-software/illcs-livedvd/

Hope that helps,
Sebastian.

... I want to calculate the dynamic structure factor S(k,t) ...
Does anybody know ... some other open source for this kind of
calculation?

- --
Dr. Sebastian Busch
University of Oxford
Department of Biochemistry
Laboratory of Molecular Biophysics
South Parks Road, Oxford, OX1 3QU, UK
+44 1865 61 33 11
[email protected]...
http://www2.bioch.ox.ac.uk/mclaingroup/Sebastian.html