Usage examples Reactor
A UNIX command that reads reactants from the mols.sdf file, processes the reaction defined in the r.rxnfile and writes the resulting reaction molecules to the standard output in smiles format:
react -r r.rxn mols.sdf
The same but returns only the second and the third products (note that 2,3should be written without white space in between):
react -r r.rxn -x 2,3 mols.sdf
This example specifies the reaction with reactivity rule and the reactants on the command line, extracts the first product:
react -r "[Cl:4][C:3]=O.[#7:2][H:1]>>[#7:2][C:3]=O.[Cl:4][H:1]..r:charge(ratom(4)) > -1.2" \
"CCCC(Cl)=O" "NCCC1CCCCC1" -x 1
The same with an additional selectivity rule and tolerance:
react -r "[Cl:4][C:3]=O.[#7:2][H:1]>>[#7:2][C:3]=O.[Cl:4][H:1]..r:charge(ratom(4)) > -1.2..s:psa(product(0))..t:1.5" \
"CCCC(Cl)=O" "NCCC1CCCCC1" -x 1
A UNIX command that reads reactants from the mols.sdf file, processes the reaction defined in the r.rxn file and writes the product molecules in the file named products.sdfto be created in the same directory:
react -r r.rxn mols.sdf -f sdf -o products.sdf
The same with verbose output, returning only one product list, then displaying the result in MarvinView:
react -r r.rxn mols.sdf -p 1 -f sdf -o products.sdf -v
mview products.sdf
Assume that the reaction file r.rdf contains a selectivity rule. Product lists are sorted by decreasing selectivity, all product lists are accepted (-n tignores selectivity tolerance). The result is displayed using MarvinView:
react -r r.rdf -n t r1.mol r2.mol | mview -
Note that such piping does not work in Windows.
Processes a reversed reaction and ignoring both reactivity and selectivity rules:
react -r r.rdf -n rs -s r1.mol r2.mol -o products.sdf
Performs a reaction on multiple reactants in combinatorial mode, returns the first two product lists sorted by selectivity, for each reactant pairs:
react -r r.rdf -m comb -p 2 r1.sdf r2.sdf -o products.sdf
The same without preloading input molecules into memory (-e, --file-storage). This slows reaction processing and is necessary only if there are a lot of input molecules (thousands) in which case the JVM would run out of memory by holding all input molecules:
react -r r.rdf -e -m comb -p 2 r1.sdf r2.sdf -o products.sdf
Create product IDs from reaction and reactant IDs. The reaction ID is R1. Read the reactant IDs from the ID and CD_ID tags for the first and the second reactants, respectively, write the generated ID to the PID tag in the product SDF.
react -r r1.rdf -f sdf a1.sdf a2.sdf -i R1 -R ID,CD_ID -P PID