## symmetry_number()


The symmetry number: the number of stereo-preserving automorphisms (P89).


Usage

``` python
symmetry_number(g)
```


It is the total, for MESS's `SymmetryFactor` with every rotor at `Symmetry 1` (P64). A reaction graph's is its condensed graph's. Chain LS count, so allene is 4 (D2d). Rings are fluxional (P88), so a ring with a flexible bond is refused until a ring model exists (P90): its fluxional count would not match RRHO on one conformer.

A centre or bond no LS holds is flexible too, so its inversion is counted (P91): isopropyl is 18 and vinyl 2, for a model that spans both forms (MESS's [Umbrella](Umbrella.md#protomol.Umbrella), or the forms as conformers). With RRHO on one well, divide by 2 per umbrella; the result then includes the optical isomers (sec-butyl: 9 / 2).

``` python
>>> from protomol import from_smiles
>>> symmetry_number(from_smiles("C")), symmetry_number(from_smiles("CC"))
```

(12, 18)

``` python
>>> symmetry_number(from_smiles("C=C=C"))
```

4


## Raises


`TypeError`  
If `g` is not a stereo graph (P83).

`GraphError`  
If an LS is undetermined ([stereoisomers](stereoisomers.md#protomol.stereoisomers) gives the determined graphs, whose sigma may differ: meso against dl; an undetermined `ts` slot is allowed), or if a ring of 4 or more atoms has a bond no bond LS holds (PLAN open question 25: use an interim sigma).
