# Command line interface¶

dynasor expects a number of input parameters. To show all available options run

dynasor --help


The parameters are grouped in the categories related to input and output files, q-space sampling, as well as time sampling.

## Input and output files¶

dynasor can be run by simply passing a trajectory and an output file name, using the default values for the sampling parameters

dynasor -f dump.atom --om=output.m --om=output.pickle


where dump.atom represens the name of the trajectory file. dynasor has native support for parsing trajectories in lammps dump format [LAM15]. If libgmx (gromacs lib) is available, dynasor can use it to read gromacs xtc-files. If VMD is available, dynasor can employ the VMD molfileplugin to read other formats (with some limitations) as well.

Output can be written in standard matlab/octave-stype .m-file format and/or in the form of Python pickle-files.

If the system under study contains multiple species, one needs to pass an index file to dynasor or else all atoms will be treated as identical. The molten sodium chloride example demonstrates this feature and should be consulted as an example for the use of an index file. For example, in the case of a small system comtaining eight water molecules one could employ the following index file

[ Hydrogen ]
2 5 8 11 14 17 20 23
3 6 9 12 15 18 21 24
[ Oxygen ]
1 4 7 10 13 16 19 22


Here, the numbers following each tag ([...]) specify the atoms that belong to the respective species.

## q-space sampling parameters¶

The default q-point sampling style is isotropic. Using this style one can specify –k-max and –k-bins, which determine the spherical cutoff in q-space and the number of radial bins, respectively. Note that kmax is given in units of inverse nanometers.

To sample along a specific path in q-space one can run

dynasor ... --k-sampling="line" --k-direction=10,0,0 --k-points=1000


where the q-direction is given in inverse nanometers and is the end point of the path starting from $$\Gamma = [0,0,0]$$. The k-points option specifies the number of q-points along the path.

## Time sampling parameters¶

The two main time sampling parameters are time window (–nt) and maximum number of frames (–dt). The time window (–nt) is the longest time for which correlations are computed and is given in number of frames. The maximum number of frames (–max-frames) sets a limit on how many frames are read from the trajectroy file. For example the command

dynasor ... --nt=500 --max-frames=2000


implies that correlation functions are calculated for frames separated by maximum of 500 frames. This window is moved over the trajectory until it reaches frame number max-frames, if no max-frames is specified the whole trajecotry will be sampled.

It is also possible to explicitly set the time between two frames using the –dt option in order to get everything in the correct units.

## Output options¶

dynasor can provide the following quantities

• Partial van Hove function $$G(r,t)$$
• Partial intermediate scattering function $$F(k,t)$$
• Partial dynamical structure factor $$S(k,\omega)$$
• Longitudinal and transversal partial current correlations $$C(k,t)$$
• Longitudinal and transversal partial current correlations $$C(k,\omega)$$
• Sampling along specific k-direction
• Self part of $$F(k,t)$$ and $$S(k,\omega)$$ ,

Their exact definitions and relations can be found in the theory section. The self part for each of these functions can be calculated by adding the –calculate-self option

dynasor ... --calculate-self