diffusion_util
Short description
@author: Moritz F P Becker
- pyrid.evaluation.diffusion_util.MSD(position_trace, Delta_t, time_interval, stride, molecule)[source]
Calculates the MSD for each dimension (x,y, and z) of a molecule population.
- Parameters
- position_tracefloat64[t,N,3]
Position data for a molecule population of size N at t different time steps.
- Delta_tint64
Time step.
- time_interavalint64
The time step until which the molecule positions are sampled for the MSD calculation. Note: Currently sampling always starts at time step 0.
- strideint64
Stride with which the molecule positions are sampled.
- moleculestring
Name of the molecule type.
- Returns
- tuple(list(float64[:],float64[:],float64[:]), float64[:])
MSD in each dimension and the corresponding time vector.
- pyrid.evaluation.diffusion_util.P2(orientation_trace, Delta_t, D_rr, time_interval, stride, Simulation, molecule, theory_only=False)[source]
Calculates the rotational time correlation function P2 from the orientation traces of a molecule population as well as the corresponding theoretical prediction for validation purposes.
- Parameters
- orientation_tracefloat64[t,N,4]
Orientations (in quaternion representation) of a molecule population of size N at t different time steps.
- Delta_tfloat64
Time step.
- D_rrfloat64[:,:]
Rotational diffusion tensor.
- time_interavalint64
Target time step. Note: Currently sampling always starts at time step 0.
- strideint64
Stride with which the molecule orientations are sampled.
- Simulationobject
Instance of the Simulation class.
- moleculestring
Molecule type
- theory_onlyboolean
If True, only the theoretical prediction of P2 is returned. Default = False.
- Returns
- tuple(list(float64[:], float64[:], float64[:]), list(float64[:], float64[:], float64[:]), float64[:])
P2 (Simulation), P2 (Theory), time vector
- pyrid.evaluation.diffusion_util.calcP2_anisotropic(time_steps, orientation_trace)[source]
Calculates the rotational time correlation function P2 regarding one rotation axis from the orientations of a molecule population.
- Parameters
- time_stepsint64[:]
Time steps.
- orientation_tracefloat64[t,N]
Orientations regarding one axis of a molecule population of size N at t different time steps.
- Returns
- float64[:]
P2 regarding one rotation axis.
- pyrid.evaluation.diffusion_util.calcP2_anisotropic_Population(time_interval, stride, orientation_trace)[source]
Calculates the rotational time correlation function P2 around each of the three rotation axis of a molecule population.
- Parameters
- time_interavalint64
Target time step. Note: Currently sampling always starts at time step 0.
- strideint64
Stride with which the molecule orientations are sampled.
- orientation_tracefloat64[t,N,4]
Orientations (in quaternion representation) of a molecule population of size N at t different time steps.
- Returns
- tuple(float64[:], float64[:], float64[:])
P2 for each rotation axis.
- pyrid.evaluation.diffusion_util.calc_A_B(u, Drot, D_rr, Delta)[source]
Calculates the parameters A (F) and B (G) used in the theoretical prediction of the rotational time correlation function P2.
- Parameters
- ufloat64[3]
Basis vector.
- Drotfloat64
Rotational diffusion constant.
- D_rrfloat64[3,3]
Rotational diffusion tensor.
- Deltafloat64
Delta.
- Returns
- tuple(float64, float64)
A (F) and B (G).
- pyrid.evaluation.diffusion_util.calc_MSD_population(time_steps, position)[source]
Calculates the Mean Squared Distance (MSD) from the position data (one dimension x, y or z) of a molecule population.
- Parameters
- time_stepsint64[:]
Time steps.
- positionfloat64[t,N]
Position vectors for t timesteps of a molecule population of size N (one dimension x, y or z).
- Returns
- list
MSD in one dimension (x, y or z).