## enantiomer()


The mirror image: every chiral LS inverted, atom indices kept.


Usage

``` python
enantiomer(gra: G) -> G
 
enantiomer(gra: ReactionGraph | StereoReactionGraph) -> ReactionGraph | StereoReactionGraph
 
enantiomer(gra: AnyGraph) -> AnyGraph
```


[Tetrahedral](Tetrahedral.md#protomol.Tetrahedral), [AtropBond](AtropBond.md#protomol.AtropBond), [TrigonalBipyramidal](TrigonalBipyramidal.md#protomol.TrigonalBipyramidal) and [Octahedral](Octahedral.md#protomol.Octahedral) LS with a parity flip it, and so do the slots of a reaction graph's stereo changes; [PlanarBond](PlanarBond.md#protomol.PlanarBond) and [SquarePlanar](SquarePlanar.md#protomol.SquarePlanar) (their own mirror images) and undetermined LS are kept as they are. A graph without stereo fields is returned unchanged. Being index-aligned, the result needs no atom map: the geometry reflected through a plane is a geometry of it. A trivial site's fixed LS (a CH3 carbon's) is inverted too, as reading the reflected geometry would give it (P75); it describes the same configuration, so compare results by canonical JSON, not `==`.

``` python
>>> from protomol import from_smiles
>>> gra = from_smiles("C[C@H](O)/C=C/C")
>>> canonical_json(enantiomer(gra)) == canonical_json(
...     from_smiles("C[C@@H](O)/C=C/C")
... )
```

True

``` python
>>> enantiomer(enantiomer(gra)) == gra
```

True
