This repository contains a C program for brute-force determination of molecular symmetry, exact or approximate.
The idea of the algorithm is very simple: the list of the symmetry operations in each point group is unique. The code attemps to locate all symmetry operations, and then compares the list to the tabulated list of point groups. As the result, the algorithm is very robust to small deviations from the exact symmetry, and does not get confused by high-symmetry groups. The downside of this approach is that symmetry analysis is quite expensive, and scales somewhat worse than quadratically with the number of atoms.
The following point groups are currently known to the code: C1, Cs, Ci, C2, C3, C4, C5, C6, C7, C8, D2, D3, D4, D5, D6, D7, D8, C2v, C3v, C4v, C5v, C6v, C7v, C8v, C2h, C3h, C4h, C5h, C6h, C7h, C8h, D2h, D3h, D4h, D5h, D6h, D7h, D8h, D2d, D3d, D4d, D5d, D6d, D7d, D8d, S4, S6, S8, T, Th, Td, O, Oh, C∞v, D∞h, I, Ih, Kh. The program will still be able to generate the lists of symmetry operations for other point groups, but won't be able to name them. In the latter case, please open the issue at https://github.com/MBI-Theory/symmetry, making sure to include the complete input for inclusion in the test set.
To compile the code and run the test test, type "make" in the top-level directory. The are no pre-requisites or dependencies beyond a working C compiler and basic Unix utilities (make, grep, awk, sed, basename). In order to get version strings updated in the code, it may be necessary to execute the commands:
git config --add 'filter.keywords.clean' '.filters/keywords.clean' git config --add 'filter.keywords.smudge' '.filters/keywords.smudge %f' rm symmetry.c git checkout symmetry.cafter cloning the repository.
The following options are recognised by the code (default values in parentheses):
-verbose ( 0) Determines verbosity level All values above 0 are intended for debugging purposes -maxaxisorder ( 20) Maximum order of rotation axis to look for -maxoptcycles ( 200) Maximum allowed number of cycles in symmetry element optimization -- Terminates option processing -same ( 1e-3) Atoms are colliding if distance falls below this value -primary ( 0.05) Initial loose criterion for atom equivalence -final ( 1e-4) Final criterion for atom equivalence -maxoptstep ( 0.5) Largest step allowed in symmetry element optimization -minoptstep ( 1e-7) Termination criterion in symmetry element optimization -gradstep ( 1e-7) Finite step used in numeric gradient evaluation -minchange (1e-10) Minimum allowed change in target function -minchgcycles ( 5) Number of minchange cycles before optimization stops
In addition to the options, at most one file can be specified on the command line. The file is expected to contain structure input in the following format:
Line 1: number-of-atoms Line 2: atomic-number X Y Z Line 3: ...Examples of the input format can be found in the tests/ subdirectory. If no input file is specified, the structure will be read from the standard input.
Prior to January 25, 2000 (v. 1.15 of the original RCS repositiory), the code contained a bug in the logic used to recognize odd-order improper axes. The bug was found by Dr. Thomas Sommerfeld (University if Heidelberg), who is gratefully acknowledged.