Cartesian.symmetrize(max_n=10, tolerance=0.3, epsilon=0.001)

Returns a symmetrized molecule

The equivalent atoms obtained via get_equivalent_atoms() are rotated, mirrored... unto one position. Then the average position is calculated. The average position is rotated, mirrored... back with the inverse of the previous symmetry operations, which gives the symmetrized molecule. This operation is repeated iteratively max_n times at maximum until the difference between subsequently symmetrized structures is smaller than epsilon.

  • max_n (int) – Maximum number of iterations.
  • tolerance (float) – Tolerance for detecting symmetry. Gets passed as Argument into PointGroupAnalyzer.
  • epsilon (float) – If the elementwise absolute difference of two subsequently symmetrized structures is smaller epsilon, the iteration stops before max_n is reached.

The returned dictionary has three possible keys:

sym_mol: A symmetrized molecule Cartesian

eq_sets: A dictionary of indices mapping to sets of indices, each key maps to indices of all equivalent atoms. The keys are guaranteed to be not symmetry-equivalent.

sym_ops: Twofold nested dictionary. operations[i][j] gives the symmetry operation that maps atom i unto j.

Return type: