These examples show how to specify a reactivity rule on reactants and/or products: reaction products accepted only if the reactivity rule is satisfied. Rules are defined as chemical terms and evaluated by the Chemical Terms Evaluator. See the Reaction rules section of the Reactor Manual for the syntax of these rules.
The reactivity rule in this example is defined in an RDF tag of the reaction file and describes amine-type nitrogens: a N atom is taken as an amine-type nitrogen if and only if it is either an amine or a hydrazine(N2) but not a hydrazine(N1) and not an amide.
hydrazine
The reaction file amine+isocyanate.rdf contains the reactivity rule in the REACTIVITY
RDF tag (you can see it in MView by setting Table / Show Fields):
Our reactant files are amines.smiles and isocyanates.smiles:
Look at the amines: The first and the second amine satisfy the condition, the next two are not attached to a hydrogen therefore do not satisfy the reaction equation itself, the remaining two do not satisfy the reactivity rule above. In the examples below, Reactor is run with multiple reactants in sequential mode: the first amine is paired with the first isocyanate, then the second amine with the second isocyanate, and so on.
Run Reactor by:
react -r amine+isocyanate.rdf amines.smiles isocyanates.smiles -t reaction
The result is:
Nc1ccccc1OC(F)F.CCOC(=O)CCCN=C=O>>CCOC(=O)CCCNC(=O)Nc1ccccc1OC(F)F
N[C@H]1CCOC1=O.CCOc1ccc(N=C=O)c(c1)N(=O)=O>>CCOc1ccc(NC(=O)N[C@H]2CCOC2=O)c(c1)N(=O)=O
You can see that only the first two amines have been processed:
For comparison, run Reactor without reaction rules (option -n
):
react -r amine+isocyanate.rdf amines.smiles isocyanates.smiles -t reaction -n r
We have 4
result rows corresponding to the first two and the last two amines, since the reaction equation is not satisfied for the third and the fourth amines:
Nc1ccccc1OC(F)F.CCOC(=O)CCCN=C=O>>CCOC(=O)CCCNC(=O)Nc1ccccc1OC(F)F
N[C@H]1CCOC1=O.CCOc1ccc(N=C=O)c(c1)N(=O)=O>>CCOc1ccc(NC(=O)N[C@H]2CCOC2=O)c(c1)N(=O)=O
c1ccc2[nH]ccc2c1.C[C@H](n-c-o)c1cccc2ccccc12>>C[C@H](NC(=O)[nH]1ccc2ccccc12)c3cccc4ccccc34
CC(=O)NC1CCCCC1.O=C=N[C@@H]1C[C@H]1c2ccccc2>>CC(=O)N(C1CCCCC1)C(=O)N[C@@H]2C[C@H]2c3ccccc3
In our next example the reaction is stored in acid-halide+nucleophile.rdf and the corresponding conditionial rule is applied to nucleophiles, the second reactant of the reaction:
!match(ratom(3), "[#6][N,O,S:1][N,O,S:2]", 1) && !match(ratom(3), "[N,O,S:1][C,P,S]=[N,O,S]", 1)
The reaction with the rule is shown below:
The two matching conditions say that the reaction center of the nucleophile (reactant atom with map 3
) should not match the atom with map 1
in any of the following molecule structures:
The reactant files are acid-halides.smiles and nucleophiles.smiles. Four sample molecules from each are shown below:
Run Reactor in combinatorial mode (-m comb
), extract the first product (-x 1
):
react -r acid-halide+nucleophile.rdf acid-halides.smiles nucleophiles.smiles -m comb -x 1 -o acid-halide+nucleophile_result.smiles
The result is stored in acid-halide+nucleophile_result.smiles. Some sample products are shown below:
By default, Reactor filters product repetitions resulting from processing symmetric reaction centers. To increase efficiency, it is sometimes useful to allow product repetitions by skipping this duplicate check with the -w
option. Run Reactor with this option:
react -r acid-halide+nucleophile.rdf acid-halides.smiles nucleophiles.smiles -m comb -x 1 -w -o acid-halide+nucleophile_result_dup.smiles
Observe, that the result file with duplicates acid-halide+nucleophile_result_dup.smiles contains 190
structures, while the result file without duplicates acid-halide+nucleophile_result.smiles contains only 130
structures.
Now run Reactor without reaction rules (option -n
):
react -r acid-halide+nucleophile.rdf acid-halides.smiles nucleophiles.smiles -m comb -x 1 -n r -o acid-halide+nucleophile_result_norules.smiles
The result is stored in acid-halide+nucleophile_result_norules.smiles.
Observe, that with the application of reaction rules we have 130
products in acid-halide+nucleophile_result.smiles, while ignoring reaction rules results in 180
products in acid-halide+nucleophile_result_norules.smiles.
A generalization of the amine+isocyanate reaction in our first reactivity rule example can be obtained by the application of the matching rule in our second reactivity rule example:
The reaction file is isocyanate+nucleophile.rdf. The reactant files are isocyanates_more.smiles and nucleophiles.smiles. Four sample molecules from each are shown below:
Run Reactor in combinatorial mode (-m comb
):
react -r isocyanate+nucleophile.rdf isocyanates_more.smiles nucleophiles.smiles -m comb -t reaction -o isocyanate+nucleophile_result.smiles
The result is stored in isocyanate+nucleophile_result.smiles. The two sample results below show that the same reactants can be transformed to different products by choosing different reaction centers:
For comparison, run Reactor without reaction rules (option -n
):
react -r isocyanate+nucleophile.rdf isocyanates_more.smiles nucleophiles.smiles -m comb -t reaction -n r -o isocyanate+nucleophile_result_norules.smiles
Compare the number of results: with the application of the rules we have 169
results, while without the rules we have 234
results.
Note, that reactions with rules can be defined either in an RDF/MRV file with the rule specified in an RDF/MRV tag as shown above, or else in the reaction string as shown in the Selectivity rule examples below.
The use and meaning of command-line options in the above commands:
Option | Description | Default |
---|---|---|
-n |
ignore reaction rules ('r', 's', 't', 'rs' or 'rt') | process reaction rules |
-w |
allow duplicate product lists | filter product repetitions |