## isomorphism()


An atom map `m` with `relabel(g1, m) == g2`, or None if there is none.


Usage

``` python
isomorphism(
    g1,
    g2,
)
```


Atom k of `g2` is atom `m[k]` of `g1` (the direction of [relabel](relabel.md#protomol.relabel) and of [canonical_form](canonical_form.md#protomol.canonical_form)'s `atom_map`). Test the result with `is not None`: two empty graphs give `()`. Both graphs must be of one type ([GraphError](GraphError.md#protomol.GraphError) otherwise).

``` python
>>> from protomol import from_smiles, relabel
>>> g1, g2 = from_smiles("OC"), from_smiles("CO")
>>> m = isomorphism(g1, g2)
>>> relabel(g1, m) == g2
```

True

``` python
>>> isomorphism(from_smiles("C[C@H](O)F"), from_smiles("C[C@@H](O)F")) is None
```

True
