box_muller

atomate2.common.jobs.anharmonicity.box_muller(eig_vals, eig_vecs, temp, rng)[source]

Get a normally distributed random variable displacement.

Uses the Box-Muller transform (https://en.wikipedia.org/wiki/Box-Muller_transform)

Parameters:
  • eig_vals (np.ndarray) – Vector of harmonic eigenvalues (with first 3 removed for translational modes)

  • eig_vecs (np.ndarray) – Matrix of harmonic eigenvectors (with first 3 removed for translational modes)

  • temp (float) – Temperature in K to find velocity and displacement at

  • rng (np.random.Generator) – Seeded random number generator

Returns:

Array with iid normally distributed displacements

Return type:

np.ndarray