fluopy.kappa_squared¶
Compute rotational effects expressed by κ².
Functions¶
Simulate rotational motion and return dipole orientations over the lifetime. |
|
|
Calculate dipole orientation factor κ² for arrays of vectors. |
|
Calculate the time-averaged κ² using trapezoidal integration. |
Sample from the distribution of κ² values utilizing Gaussian kernel-density |
Module Contents¶
- fluopy.kappa_squared.simulate_rotational_motion(tau_rot: float, tau_life: float, dt: float = 1e-12, seed: fluopy.fluopy_types.RandomGeneratorSeed = None) tuple[numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64]][source]¶
Simulate rotational motion and return dipole orientations over the lifetime.
- Parameters:
tau_rot – The rotational diffusion time constant in s.
tau_life – The lifetime of the dipole in s.
dt – The time step for the simulation in s.
seed – Seed.
- Returns:
Two arrays containing the dipole orientations over time for two dipoles. Of length int(tau_life / dt).
- Return type:
tuple[npt.NDArray[np.float64], npt.NDArray[np.float64]]
- fluopy.kappa_squared.kappa_squared(d: numpy.typing.ArrayLike, a: numpy.typing.ArrayLike, r: numpy.typing.ArrayLike) numpy.typing.NDArray[numpy.float64][source]¶
Calculate dipole orientation factor κ² for arrays of vectors.
- Parameters:
d – Donor dipole vectors of shape (N, 3).
a – Acceptor dipole vectors of shape (N, 3).
r – Unit vector from donor to acceptor of shape (N, 3).
- Returns:
The value of κ² calculated from the input vectors.
- Return type:
npt.NDArray[np.float64]
- fluopy.kappa_squared.integral_kappa_squared(traj1: numpy.typing.ArrayLike, traj2: numpy.typing.ArrayLike, dt: float, r: numpy.typing.ArrayLike | None = None) float[source]¶
Calculate the time-averaged κ² using trapezoidal integration.
- Parameters:
traj1 – Array of dipole orientations for the first dipole. Shape (N, 3).
traj2 – Array of dipole orientations for the second dipole. Shape (N, 3).
dt – The time step for the simulation in s.
r – Unit vector from donor to acceptor. If None, assumes z-axis [0, 0, 1].
- Returns:
The time-averaged value of κ².
- Return type:
float
- fluopy.kappa_squared.sample_kappa_squared_distribution(k2_values: numpy.typing.ArrayLike, size: int = 100, seed: fluopy.fluopy_types.RandomGeneratorSeed = None) numpy.typing.NDArray[numpy.float64][source]¶
Sample from the distribution of κ² values utilizing Gaussian kernel-density estimation and logit transformation.
- Parameters:
k2_values – Array of κ² values between 0 and 4.
size – Number of samples to generate.
seed – A seed to initialize the BitGenerator.
- Returns:
Samples from the κ² distribution.
- Return type:
npt.NDArray[np.float64]