PoreAna 0.2
  • API
  • Sample
  • Density
  • Diffusion (Bin)
  • Diffusion (MC)
  • Further Properties
  • Site
    • Page
        • Sample.init_diffusion_mc
          • Sample.init_diffusion_mc()
    • Sample.init_diffusion_mc
      • Sample.init_diffusion_mc()
    Source

    Sample.init_diffusion_mc¶

    Sample.init_diffusion_mc(link_out, len_step, bin_num=100, len_frame=2e-12, direction=2)¶

    Enable diffusion sampling routine with the MC Alogrithm.

    This function sample the transition matrix for the diffusion calculation with the Monte Carlo diffusion methode for a cubic simulation box. The sample of the transition matrix is to be run on the cluster due to a high time and resource consumption. The output, a data object, is then used to calculate the self-diffusion using further calculation functions for the MC Diffusion methode.

    It is necessary to caculate the transition matrix for different step length and so for different lag times. A lagtime \(\Delta t_{\alpha}\) is defined by

    \[\Delta t_{\alpha} = t_{i,\alpha} - t_{j,\alpha}\]

    with \(i\) and \(j\) as the current state of the system at two different times and \(\alpha\) as past time between the two states. To sample the transition matrix the frame length \(t\) has to be specifiy and this frame length is for all lag times the same. The variation of the lag time is happend by adapting the step length \(s\) which indicates the interval between the frames. The lag time is than calculated by

    \[\Delta t_{\alpha} = t \cdot s\]

    After the sampling a model class has to set and then the MC calculation can run. Subsequently the final mean diffusion coefficient can be determined with a extrapolation to \(\Delta t_{\alpha} \rightarrow \infty\). For the etxrapolation we need the mean diffusion over the bins for different chosen lag times. That’s why we have to calculate the results and the transition matrix for several lag times. More information about post processing and the extrapolation that you can find in poreana.diffusion.mc_fit().

    The direction of descretization can be also choosen using the input variable \(\mathrm{direction}\). The simulation box can be divided in every spatial direction and so the transition matrix is sampled in the chosen direction and the diffusion is calculated in this direction.

    Parameters:
    link_outstring

    Link to hdf5, obj or yml data file

    len_stepinteger

    Length of the step size between frames

    bin_numinteger, optional

    Number of bins to be used

    len_framefloat, optional

    Length of a frame in seconds

    directioninteger, optional

    Direction of descretization of the simulation box (0 (x-axis); 1 (y-axis); 2 (z-axis))

    Back to top

    © Copyright 2021, Hamzeh Kraus.
    Created using Sphinx 7.4.6.