## from_reaction_smiles()


The stereo reaction graph of an atom-mapped reaction SMILES (P62).


Usage

``` python
from_reaction_smiles(
    smiles,
    *,
    charge=None,
    spin=None,
)
```


Atom k is the atom with the k-th smallest map number. Each side is perceived as [from_smiles](from_smiles.md#protomol.from_smiles) does; [without_stereo](without_stereo.md#protomol.without_stereo) gives the [ReactionGraph](ReactionGraph.md#protomol.ReactionGraph). As a reader it also sets the `ts` slots by the TS-slot rules, as [low_t](low_t.md#protomol.low_t) does (P84); where they allow two (the twisted TSs of a rotation), the slot is their LS undetermined.

``` python
>>> rxn = from_reaction_smiles("[H:1][H:2].[O:3][H:4]>>[H:1].[H:2][O:3][H:4]")
>>> rxn.symbols
```

('H', 'H', 'O', 'H')

``` python
>>> rxn.breaking, rxn.forming
```

(((0, 1),), ((1, 2),))


## Parameters


`smiles: str`  
A reaction SMILES "reactants\>\>products" with no agents, in which every atom, H included, is written and mapped, and both sides have the same map numbers.

`charge: int | None = None`  
Checked against the sum of formal charges on each side; default: that sum.

`spin: int | None = None`  
Unpaired electrons (2S); default: the lower of the two sides' radical electron counts ([from_smiles](from_smiles.md#protomol.from_smiles)'s default).


## Raises


`GraphError`  
For a SMILES that isn't a reaction SMILES or that RDKit can't parse, agents, an unmapped atom or implicit H, a map number used twice on a side, sides with different map numbers, symbols or charges, or a charge or spin [from_smiles](from_smiles.md#protomol.from_smiles) rejects.
