compute_scramble

qcelemental.molutil.compute_scramble(nat, do_resort=True, do_shift=True, do_rotate=True, deflection=1.0, do_mirror=False)[source]

Generate a random or directed translation, rotation, and atom shuffling.

Parameters
  • nat (int) – Number of atoms for which to prepare an atom mapping.

  • do_resort (Union[bool, List, ndarray]) – Whether to randomly shuffle atoms (True) or leave 1st atom 1st, etc. (False) or shuffle according to specified (nat, ) indices (e.g., [2, 1, 0])

  • do_shift (Union[bool, List, ndarray]) – Whether to generate a random atom shift on interval [-3, 3) in each dimension (True) or leave at current origin (False) or shift along specified (3, ) vector (e.g., np.array([0., 1., -1.])).

  • do_rotate (Union[bool, List, ndarray]) – Whether to generate a random 3D rotation according to algorithm of Arvo (True) or leave at current orientation (False) or rotate with specified (3, 3) matrix.

  • deflection (float) – If do_rotate, how random a rotation: 0.0 is no change, 0.1 is small perturbation, 1.0 is completely random.

  • do_mirror (bool) – Whether to set mirror reflection instruction. Changes identity of molecule so off by default.

Returns

Fields (shift, rotation, atommap, mirror) as requested: identity, random, or specified.

Return type

AlignmentMill