Dynamic properties calculation

Hi experts,
I have a question regarding the calculation of dynamic parameters by Dynasor. Is it possible to configure the dynasor inputs so that it only calculates a specific dynamic variable, i.e. intermediate scattering function ( total, partial and self part), and does not calculate other parameters?
The second question is, does dynasor run in parallel?
Best regards,
Akram

Is it possible to configure the dynasor inputs so that it only calculates a specific dynamic variable i.e. intermediate scattering function

No, once e.g. the intermediate scattering functions is calculated the dynamical structure factor S(q,w) is obtained my a Fourier transform which is very fast so dynasor will always output S(q,w) as well.

If you have velocities in the trajectory then automatically the velocity current-correlations will be calculated.

The second question is, does dynasor run in parallel?

Yes you can see it from dynasor --help

  --threads=THREADS     Number of threads to use. The default value is taken
                        from OMP_NUM_THREADS if it is set,  otherwise it is
                        set to the number of available cpus.

But note that the parallellization rarely scales well with number of cores, I think its due to other parts of the code (e.g. reading trajectory) being the bottle-neck.
Note also that you can always parallelize yourself over independent MD simulations to improve statistics of the correlation functions.

1 Like

Dear erikfransson,
Thank you very much for your reply.
I have run a simulation where the trajectory file contains 700,000 steps with 14,000 atoms ( type of atoms=3 & Time step=1 fs ). Although I have set the maximum number of frames to 400,000 and the simulation is done with 24 cores, it has taken a long time and still has not output after 10 hours.
The input of the dynasor is as follows:
dynasor -f atoms.dump.lammpstrj --om=output.m --k-max=30 --k-bins=100 --max-frames=400000 --nt=800 --dt=500 -n index.file --calculate-self
best regards,
Akram

Yes calculating the self-part is quite slow in dynasor, it is something we are working on to fix.

I would recommend you run it with much smaller number of max-frames, e.g. 1000, just to check how long it takes an then you can extrapolate how long 400,000 frames will take.
You can also run with --verbose to see get a continous update on how far the calculation have come.

But as mentioned above, the best thing for performance is probably to reduce max-frames significantly and instead run dynasor analysis over multiple (10-100) independent MD simulations.

Is the time between your snapshots 500fs?

1 Like

Yes, I had set the dump command in the nvt ensemble to calculate the trajectory file as follows so the time between the snapshots is 500fs: (units :metal)
dump 1 all custom 500 atoms.dump.lammpstrj id type xs ys zs

Dear erikfransson,
Anyway, thank you very much for developing such a package. This package is like a saving angel that frees us from very complex calculations that are sometimes very difficult to understand and at the same time is very user-friendly and understandable.
Best regards,
Akram

Glad you like it :slight_smile:

1 Like