Function symmetry::sym_elements

Function Documentation

void symmetry::sym_elements(int natoms, const std::vector<int> &nat, const std::vector<std::vector<double>> &coord, const std::vector<std::string> &symb, double delta, int &ng, int &ni, int &nsg, int &ncr, int &nsr, int &np, std::vector<std::vector<double>> &symn, std::vector<std::vector<int>> &nsym, int nout, int &nprm, std::vector<std::vector<int>> &nper, int &nseq, std::vector<int> &nccl, std::vector<std::vector<int>> &nscl)

Detects symmetry elements and operations in a molecule.

This function analyzes the molecular structure to identify symmetry elements such as rotation axes, reflection planes, and inversion centers. It determines the point group by finding all symmetry operations and their associated elements.

Parameters:
  • natoms – Number of atoms in the molecule

  • nat – Vector of atomic numbers for each atom

  • coord – 3D coordinates of atoms (vector of vectors, size 3 x natoms)

  • symb – Vector of element symbols (unused in current implementation)

  • delta – Tolerance for symmetry detection (distance threshold)

  • ng – Output: Total number of symmetry operations (group order)

  • ni – Output: Number of inversion operations (0 or 1)

  • nsg – Output: Number of symmetry planes (mirror planes)

  • ncr – Output: Number of proper rotation axes

  • nsr – Output: Number of improper rotation axes

  • np – Output: Order of the principal rotation axis

  • symn – Output: Symmetry element normals/directions (3 x max_sym)

  • nsym – Output: Symmetry operation details (max_sym x 5)

  • nout – Output control level (0: silent, 1: basic, 2: detailed)

  • nprm – Output: Number of permutations found

  • nper – Output: Permutation matrix (natoms x max_perm)

  • nseq – Output: Number of equivalence classes

  • nccl – Output: Size of each equivalence class

  • nscl – Output: Members of each equivalence class