cgexplore.utilities.rattle

cgexplore.utilities.rattle(molecule, stdev=0.001, seed=None)[source]

Randomly displace atoms.

This code is mimicking what is done in ase.Atoms.rattle(). Thank you to them!

Parameters:
  • molecule (Molecule) – The molecule to manipulate.

  • stdev (float) – The standard deviation of the displacement.

  • seed (int | None) – The seed for the random number generator.

Returns:

An stk molecule.

Return type:

Molecule