News:

SMF - Just Installed!

Main Menu

MSD calculation

Started by Junran Lu, April 21, 2018, 03:35:08 AM

Previous topic - Next topic

Junran Lu

Hi Professor David:

In the diffusion modeling for single component (such as N2), there are four .dat file generated, namely, msd_self_N2_0.dat, msd_self_total_0.dat, msd_onsager_N2_0_N2_0.dat and msd_onsager_total.dat. And I want to calculate the diffusion coefficient of N2, which one .dat file could be used?
Moreover, for multiple components, if I want calculate the diffusion coefficient for each one, should I use the corresponding msd_self_total_0/1/2.dat ?

Thanks very much!
Best wishes!

David Dubbeldam

#1
The files with 'self' are self-diffusion, the 'total' file is self-diffusion of the total fluid (so independent of the component type). So for a single component run the output for the component and the total is the same. For a multi-component mixture they differ. The files with 'onsager' in the name contain mixture Onsager coefficients.
Note the files contains in the columns:
1: correlation time in picoseconds.
2: MSD averaged over x,y,z (number of dimensions = 3).
3: MSD in the x-direction  (number of dimensions = 1).
4: MSD in the y-direction (number of dimensions = 1).
5: MSD in the z-direction (number of dimensions = 1).
6: number the times this point has been computed.

The source for this is `src/sample.c'.

Junran Lu

Professor David , Thank you very much! :)

Junran Lu

#3
Dear Professor David:

In the resulting file of MSD calculation, the printed time-interval increased with different period in the msd_*.dat file. Such as the first 25 printed time with  internal of 0.0005 Ps, and the next 24 printed time with  internal of 0.0125 Ps, and more, the next following 24 printed time with internal of 0.3125 Ps .......7.8125 Ps,195.312 Ps, and the final 8 printed time with  internal of 4882.81 Ps. And there are any settings to keep the interval as a constant?
Besides, the total printed time (43945.3 Ps) is not equal to the time step (0.0005 Ps) multiplied the NumberOfCycles (100000000). The following is the input file of on the MSD calculation. And more, is there any restrictions on the NumberOfInitializationCylces and NumberOfEquilibrationCycles when setting?

#########################################
Simulationtype                MolecularDynamics
NumberOfCycles              100000000
NumberOfInitializationCylces 500000
NumberOfEquilibrationCycles 10000
PrintEvery                            10000
RestartFile                            No

Ensemble                             NVT
Forcefield                             local
Cutoff                                  12.0
Timestep                              0.0005

Framework                           0
FrameworkName                   ZIF-8
Unitcell                                2 2 4
RemoveAtomNumberCodeFromLabel yes

ExternalTemperature           298.0
ComputeMSD                     yes
PrintMSDEvery                    10000

Component   MoleculeName   N2
                   StarteingBead   0
                   MoleculeDefinition  TraPPE
                   TranslationProbability  1.0
                   RotationProbability  1.0
                   ReinsertionProbability  1.0
                   CreatNumberOfMolecules 5
#########################################

Looking forward to your reply!
Best wishes!

David Dubbeldam

#4
See the manual for these options.

'ComputeMSDConventional'  for conventional MSD, and 'ComputeMSD' for order-n MSD (works in log-scale).

Correlation times are usually much smaller than total simulation time, because you need to average a lot to get good statistics. You could only have one measurement of a correlation time equal to your simulation length and that point would be useless.

Junran Lu

Professor David, Thanks very much! I will have a try following your advice!