diff --git a/jupyter/02_calculators.ipynb b/jupyter/02_calculators.ipynb index 527aa8e..4f53094 100644 --- a/jupyter/02_calculators.ipynb +++ b/jupyter/02_calculators.ipynb @@ -12,17 +12,12 @@ }, { "cell_type": "code", - "execution_count": null, "id": "4651ecec-55a8-48d2-a76e-a5c8487ef569", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:37:44.342663665Z", - "start_time": "2026-03-16T07:37:44.281900876Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "from chemaxon import import_mol, logp, logd, pka, hlb\n", + "from numpy.random.mtrand import normal\n", + "from rdkit.Chem.rdchem import Conformer\n", "\n", "mol = import_mol('CC(=O)NC1=CC=C(O)C=C1') # paracetamol\n", "\n", @@ -30,19 +25,14 @@ "print('logD[pH 9.0]:', logd(mol, ph=9.0))\n", "print('pKa: ', pka(mol))\n", "print('hlb: ', hlb(mol))" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "a23b02ed-fe3b-419e-95e2-a2fee78abb3f", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:30:40.398412454Z", - "start_time": "2026-03-16T07:30:38.972522816Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "from chemaxon import import_mol, pka\n", "\n", @@ -50,26 +40,26 @@ "\n", "pka_result = pka(mol)\n", "pka_result.structure" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "657e9aeb-8a20-47cd-8443-3df87c474e07", "metadata": {}, - "outputs": [], "source": [ "import sys\n", "\n", "!{sys.executable} -m pip install matplotlib" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "51086e75-7995-4010-96ef-b96444770342", "metadata": {}, - "outputs": [], "source": [ "from chemaxon import logd_ph_range, PhRange\n", "import matplotlib.pyplot as pyplt\n", @@ -79,7 +69,9 @@ "pyplt.title(\"logD by pH\")\n", "pyplt.xlabel(\"pH\")\n", "pyplt.ylabel(\"logD\")" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -93,10 +85,8 @@ }, { "cell_type": "code", - "execution_count": null, "id": "bc97b4ee-ecc0-41da-b0c1-de15e3dde46b", "metadata": {}, - "outputs": [], "source": [ "from chemaxon import evaluate\n", "\n", @@ -106,7 +96,9 @@ "print('Fsp3: ', evaluate(mol, \"fsp3()\"))\n", "print('logP: ', evaluate(mol, \"logP()\"))\n", "print('logS: ', evaluate(mol, \"logS()\"))" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -118,14 +110,14 @@ }, { "cell_type": "code", - "execution_count": null, "id": "edca4a1e-dda0-41e4-9a3c-1062765dcb24", "metadata": {}, - "outputs": [], "source": [ "warfarin = import_mol(\"warfarin\")\n", "import_mol(evaluate(warfarin, \"molFormat(genericTautomer(), 'smarts')\"))" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -137,64 +129,54 @@ }, { "cell_type": "code", - "execution_count": null, "id": "abf54870-2e45-4bb6-a317-95cb3006ce92", "metadata": { "scrolled": true }, - "outputs": [], "source": [ "import sys\n", "\n", "!{sys.executable} -m pip install pandas matplotlib" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "a72c8cd9-154c-450e-80a4-58ad8a44d92c", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:44:59.388750945Z", - "start_time": "2026-03-16T07:44:59.329950593Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "import pandas\n", "\n", "mols = pandas.read_table('nci1000.smiles', names=['SMILES', 'NCI_ID'])\n", "mols" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "4e7eace2-925b-4b32-b8f4-cde853fbf7ff", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:30:08.992554897Z", - "start_time": "2026-03-16T07:30:04.107512383Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "mols['LOGP'] = mols.apply(lambda row: round(logp(import_mol(row['SMILES'])), 2), axis = 'columns')\n", "mols['LOGD[3.0]'] = mols.apply(lambda row: logd(import_mol(row['SMILES']), ph=3.0), axis = 'columns')\n", "mols['LOGD[7.4]'] = mols.apply(lambda row: logd(import_mol(row['SMILES']), ph=7.4), axis = 'columns')\n", "mols['LOGD[11.0]'] = mols.apply(lambda row: logd(import_mol(row['SMILES']), ph=11.0), axis = 'columns')\n", "mols" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "1eb642b1-4087-4f7e-90f6-6d0cc6891abe", "metadata": {}, - "outputs": [], "source": [ "mols.hist(['LOGP', 'LOGD[3.0]', 'LOGD[7.4]', 'LOGD[11.0]'], bins=50)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -214,15 +196,8 @@ }, { "cell_type": "code", - "execution_count": null, "id": "283cae5aef6dbd02", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:51:06.979709769Z", - "start_time": "2026-03-16T07:51:06.856689261Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "from chemaxon import herg_classification, herg_activity, bbb, cns_mpo\n", "\n", @@ -232,19 +207,14 @@ "print('HERG activity: ', herg_activity(mol).value)\n", "print('BBB score: ', bbb(mol).score)\n", "print('CNS MPO score: ', cns_mpo(mol).score)" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "b919537734868299", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:47:48.713812526Z", - "start_time": "2026-03-16T07:47:46.021149489Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "mols_admet = pandas.read_table('nci50.smiles', names=['SMILES', 'NCI_ID'])\n", "\n", @@ -254,7 +224,9 @@ "mols_admet['CNS MPO score'] = mols_admet.apply(lambda row: cns_mpo(import_mol(row['SMILES'])).score, axis = 'columns')\n", "\n", "mols_admet" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -266,18 +238,13 @@ }, { "cell_type": "code", - "execution_count": null, "id": "e832650c7a89f47f", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T07:49:29.758151366Z", - "start_time": "2026-03-16T07:49:29.706743346Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "mols_admet.filter(items=['SMILES', 'NCI_ID', 'HERG classification', 'HERG activity']).query('`HERG classification` == \"TOXIC\"')" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "markdown", @@ -289,15 +256,8 @@ }, { "cell_type": "code", - "execution_count": null, "id": "4d623f46db883daf", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T08:32:16.587113874Z", - "start_time": "2026-03-16T08:32:16.546646690Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "from chemaxon import isoelectric_point\n", "\n", @@ -308,19 +268,14 @@ "print('Isoelectric point of glycine: ', res.isoelectric_point)\n", "print('Charge distributions: \\n', res.charge_distributions)\n", "print()" - ] + ], + "outputs": [], + "execution_count": null }, { "cell_type": "code", - "execution_count": null, "id": "efa7a82fc57b8f03", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T09:02:42.633423104Z", - "start_time": "2026-03-16T09:02:42.579911400Z" - } - }, - "outputs": [], + "metadata": {}, "source": [ "from chemaxon import PhRange\n", "\n", @@ -332,34 +287,182 @@ "\n", "df = pandas.DataFrame(rows)\n", "df" - ] + ], + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "markdown", + "source": "### **Conformer calculation**", + "id": "93caaa3fa88c81a2" }, { + "metadata": {}, "cell_type": "code", - "execution_count": null, - "id": "07b2160b-1162-4c08-afa5-40d0197fccec", + "source": [ + "#helper function to show the result of the conformer and tautomer calculation\n", + "def display_result(result: list):\n", + " for res in result:\n", + " display(res[0])\n", + " print(res[1])\n", + " \n", + "from chemaxon import import_mol, conformers\n", + "\n", + "mol = import_mol(\"OC1CC(O)CCC1\")\n", + "result = conformers(mol)\n", + "display_result(result)" + ], + "id": "153fe02e877229e7", + "outputs": [], + "execution_count": null + }, + { "metadata": {}, + "cell_type": "code", + "source": [ + "from chemaxon import ConformerOptions, ConformerForceField, ConformerEnergyUnit, ConformerOptimization\n", + "\n", + "options = ConformerOptions()\n", + "options.max_number_of_conformers = 3\n", + "options.energy_unit = ConformerEnergyUnit.KJ_PER_MOL\n", + "options.force_field = ConformerForceField.MMFF94\n", + "options.optimization_limit = ConformerOptimization.VERY_STRICT\n", + "result = conformers(mol, options=options)\n", + "display_result(result)" + ], + "id": "52a2f4bedcb9ef20", "outputs": [], - "source": [] + "execution_count": null }, { + "metadata": {}, + "cell_type": "markdown", + "source": "### **Solubility calculation**", + "id": "22c3ba6d23fe3dfe" + }, + { + "metadata": {}, "cell_type": "code", - "execution_count": null, - "id": "8b391de8a48db2d5", - "metadata": { - "ExecuteTime": { - "end_time": "2026-03-16T09:01:30.686598128Z", - "start_time": "2026-03-16T09:01:30.503011191Z" - } - }, + "source": [ + "from chemaxon import import_mol, solubility\n", + "\n", + "mol_str = \"CC(=O)OC1=CC=CC=C1C(O)=O\"\n", + "mol = import_mol(mol_str)\n", + "solubility(mol)" + ], + "id": "e1eef8678004a2da", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", + "source": [ + "from chemaxon import solubility_ph_range, PhRange\n", + "from chemaxon.calculations.solubility import SolubilityUnit\n", + "\n", + "result = solubility_ph_range(mol, PhRange(0.0, 14.0, 1.0), unit = SolubilityUnit.MOL_PER_L)\n", + "rows = []\n", + "for res in result:\n", + " rows.append({'pH': res.ph, 'Solubility': res.solubility})\n", + "\n", + "df = pandas.DataFrame(rows)\n", + "df" + ], + "id": "4e923e7caab4bc93", "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "markdown", + "source": "### **Tautomer calculation**", + "id": "b5175c4fd4d84274" + }, + { + "metadata": {}, + "cell_type": "code", + "source": [ + "from chemaxon import import_mol, all_tautomers, dominant_tautomer_distribution, canonical_tautomer, major_tautomer, TautomerAdvancedOptions\n", + "\n", + "mol = import_mol(\"OC1=NC=CC2=CC=NC=C12\")\n", + "result = all_tautomers(mol)\n", + "for res in result:\n", + " display(res)" + ], + "id": "f3af005d1832bb69", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", + "source": [ + "mol = import_mol(\"CC1=CNCC(O)=C1\")\n", + "result = dominant_tautomer_distribution(mol)\n", + "display_result(result)" + ], + "id": "b5c1b85e30fa50a8", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", + "source": [ + "mol = import_mol(\"OC1N(S)CC=CC1=O\")\n", + "canonical_tautomer(mol, normal=True)" + ], + "id": "e973360c5ab8dba0", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", + "source": [ + "mol = import_mol(\"OC1=NC=CC2=CC=NC=C12\")\n", + "major_tautomer(mol, ph=14.0)" + ], + "id": "29d55dab2d287549", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", + "source": [ + "mol = import_mol(\"CC(=O)\\C=C(/O)CC1=CC=CC=C1\")\n", + "advanced_options = TautomerAdvancedOptions()\n", + "advanced_options.protect_double_bond_stereo = True\n", + "major_tautomer(mol, options=advanced_options)" + ], + "id": "e6001e311478c464", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", + "source": "", + "id": "f9dbdbb6dd0578db", + "outputs": [], + "execution_count": null + }, + { + "metadata": {}, + "cell_type": "code", "source": [ "#!{sys.executable} -m pip install matplotlib\n", "\n", "import matplotlib\n", "\n", "df.plot(x='pH', y='Charge distribution', kind='line', marker='o', title='Charge Distribution vs pH for Glycine', grid=True)" - ] + ], + "id": "191f6fbd86484972", + "outputs": [], + "execution_count": null } ], "metadata": { diff --git a/jupyter/09_reactor.ipynb b/jupyter/09_reactor.ipynb new file mode 100644 index 0000000..38ab588 --- /dev/null +++ b/jupyter/09_reactor.ipynb @@ -0,0 +1,651 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "c14515e93baf5370", + "metadata": {}, + "source": [ + "### **Reactor**" + ] + }, + { + "cell_type": "code", + "id": "c817e7513f5c6d3c", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:28.068750Z", + "start_time": "2026-05-18T13:12:28.055630Z" + } + }, + "source": [ + "#Helper function to show the reactor results\n", + "\n", + "def display_result(result: list):\n", + " for r in range(len(result)):\n", + " print(r + 1, \". result\", sep=\"\")\n", + " for i in range(len(result[r].product_sets)):\n", + " print(\" \", i + 1, \". product set:\", sep=\"\")\n", + " for j in range(len(result[r].product_sets[i].products)):\n", + " print(\" \", j + 1, \". product\", sep=\"\")\n", + " display(result[r].product_sets[i].products[j])" + ], + "outputs": [], + "execution_count": 35 + }, + { + "metadata": { + "SqlCellData": { + "variableName$1": "df_sql1" + } + }, + "cell_type": "code", + "outputs": [], + "execution_count": null, + "source": "%%sql\n", + "id": "28cacdcac20b0577" + }, + { + "cell_type": "code", + "id": "eb1f9f42-ff7d-49dc-80a3-af87bb62f52d", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:07:26.255453Z", + "start_time": "2026-05-18T13:07:26.163179Z" + } + }, + "source": [ + "from chemaxon import import_mol, export_mol, single_input, parallel, Mode, ReactorOptions, ResultType, ReactionRules\n", + "\n", + "reactants1 = [import_mol(\"CC(O)=O\"), import_mol(\"CCC(O)=O\")]\n", + "reactants2 = [import_mol(\"CO\"), import_mol(\"CCCCO\")]\n", + "reaction = import_mol(\"[H:5][O:4][CH:1]=[O:2].[H:7][O:6][CH3:8]>>[CH3:8][O:6][CH:1]=[O:2]\")\n", + "display(reaction)" + ], + "outputs": [ + { + "data": { + "text/plain": [ + "Molecule(_source='[H:5][O:4][CH:1]=[O:2].[H:7][O:6][CH3:8]>>[CH3:8][O:6][CH:1]=[O:2]', _format='', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(9, 10))), atoms=(Atom(symbol='H', atom_number=1, mass_number=0, mapping=5, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=4, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=1, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=2, bonds=(Bond(type=2, atoms=(2, 3)),)), Atom(symbol='H', atom_number=1, mass_number=0, mapping=7, bonds=(Bond(type=1, atoms=(4, 5)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=6, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=8, bonds=(Bond(type=1, atoms=(5, 6)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=8, bonds=(Bond(type=1, atoms=(7, 8)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=6, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=1, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(9, 10)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=2, bonds=(Bond(type=2, atoms=(9, 10)),))), native_handle=197, _to_str=, properties={})" + ], + "image/svg+xml": "H5O41O2H7O6CH38CH38O61O2+\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 24 + }, + { + "cell_type": "code", + "id": "465167d7-198a-4717-b9ac-d30cb0c627e2", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:31.421163Z", + "start_time": "2026-05-18T13:12:31.381652Z" + } + }, + "source": [ + "result = single_input(reaction, [reactants1[0], reactants2[0]])\n", + "display_result([result])" + ], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 4)), Bond(type=1, atoms=(3, 4))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 4)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 4)), Bond(type=1, atoms=(3, 4))))), native_handle=274, _to_str=, properties={})" + ], + "image/svg+xml": "CH3OH3CO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 36 + }, + { + "cell_type": "code", + "id": "bc00c94a-a31a-4afa-b670-66a77a8c6e55", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:36.495551Z", + "start_time": "2026-05-18T13:12:36.303127Z" + } + }, + "source": [ + "result = parallel(Mode.SEQUENTIAL, reaction, [reactants1, reactants2])\n", + "display_result(result)" + ], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 4)), Bond(type=1, atoms=(3, 4))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 4)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 4)), Bond(type=1, atoms=(3, 4))))), native_handle=281, _to_str=, properties={})" + ], + "image/svg+xml": "CH3OH3CO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(2, 3)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(7, 8))))), native_handle=284, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 37 + }, + { + "cell_type": "code", + "id": "0f6bc873-2fd3-4a89-89f6-7c019f9cb4ab", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:39.565737Z", + "start_time": "2026-05-18T13:12:39.475707Z" + } + }, + "source": [ + "result = parallel(Mode.COMBINATORIAL, reaction, [reactants1, reactants2])\n", + "display_result(result)" + ], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 4)), Bond(type=1, atoms=(3, 4))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 4)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 4)), Bond(type=1, atoms=(3, 4))))), native_handle=292, _to_str=, properties={})" + ], + "image/svg+xml": "CH3OH3CO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 7)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 7)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 7)), Bond(type=1, atoms=(6, 7))))), native_handle=295, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "3. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 5)), Bond(type=1, atoms=(4, 5))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 5)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(2, 3)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 5)), Bond(type=1, atoms=(4, 5))))), native_handle=298, _to_str=, properties={})" + ], + "image/svg+xml": "CH3OH3CO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(2, 3)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(7, 8))))), native_handle=301, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 38 + }, + { + "cell_type": "code", + "id": "afaee5f6-ff1d-445b-b1ba-5eabc8dee808", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:46.315266Z", + "start_time": "2026-05-18T13:12:46.211055Z" + } + }, + "source": [ + "all_reactants = [[reactants1[0], reactants1[1]], [reactants1[0], reactants2[1]]]\n", + "result = parallel(Mode.SEQUENTIAL, reaction, all_reactants)\n", + "print(\"Results without reaction rules\")\n", + "display_result(result)\n", + "\n", + "print(\"Results with reaction rules\")\n", + "rules = ReactionRules()\n", + "rules.reactivity = \"match(reactant(1), alcohol) or match(reactant(1), phenol)\"\n", + "result = parallel(Mode.SEQUENTIAL, reaction, all_reactants, rules=rules)\n", + "display_result(result)" + ], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Results without reaction rules\n", + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 5)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=2, atoms=(4, 6))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 5)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=2, atoms=(4, 6)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 5)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(4, 6)),))), native_handle=307, _to_str=, properties={})" + ], + "image/svg+xml": "CH3OCH3OO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(2, 3)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(7, 8))))), native_handle=310, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Results with reaction rules\n", + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=2, atoms=(2, 3)), Bond(type=1, atoms=(2, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(2, 3)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 8)), Bond(type=1, atoms=(7, 8))))), native_handle=317, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 39 + }, + { + "cell_type": "code", + "id": "fe6b91db-2f30-4293-836e-708d320dedba", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:52.154959Z", + "start_time": "2026-05-18T13:12:52.077864Z" + } + }, + "source": [ + "options = ReactorOptions()\n", + "options.reverse = True\n", + "options.result_type = ResultType.REACTION\n", + "reverse_reactants = [[import_mol(\"COC(C)=O\"), import_mol(\"CCCCOC(C)=O\")]]\n", + "result = parallel(Mode.SEQUENTIAL, reaction, reverse_reactants, options=options)\n", + "display_result(result)" + ], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=1, atoms=(2, 3)), Bond(type=2, atoms=(2, 4)), Bond(type=1, atoms=(5, 6)), Bond(type=2, atoms=(5, 7)), Bond(type=1, atoms=(5, 8)), Bond(type=1, atoms=(9, 10))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=1, atoms=(2, 3)), Bond(type=2, atoms=(2, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 3)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(2, 4)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=2, atoms=(5, 7)), Bond(type=1, atoms=(5, 8)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(5, 7)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 8)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)),))), native_handle=324, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3OCH3OHOCH3HO+\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)), Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=2, atoms=(5, 7)), Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(8, 10)), Bond(type=1, atoms=(8, 11)), Bond(type=1, atoms=(12, 13)), Bond(type=1, atoms=(13, 14)), Bond(type=1, atoms=(14, 15)), Bond(type=1, atoms=(15, 16))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=1, atoms=(1, 2)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 2)), Bond(type=1, atoms=(2, 3)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=2, atoms=(5, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(5, 7)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(8, 10)), Bond(type=1, atoms=(8, 11)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(8, 10)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 11)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)), Bond(type=1, atoms=(13, 14)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(13, 14)), Bond(type=1, atoms=(14, 15)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(14, 15)), Bond(type=1, atoms=(15, 16)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)),))), native_handle=326, _to_str=, properties={})" + ], + "image/svg+xml": "H3COCH3OCH3OHOCH3HO+\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 40 + }, + { + "cell_type": "code", + "id": "bcae6f33-85c4-410d-b5ce-dbe37d9cb77e", + "metadata": { + "ExecuteTime": { + "end_time": "2026-05-18T13:12:57.487807Z", + "start_time": "2026-05-18T13:12:57.323528Z" + } + }, + "source": [ + "reaction = import_mol(\"[H:5][O:4][CH:1]=[O:2].[H:7][O:6][CH3:8]>>[CH3:8][O:6][CH:1]=[O:2]\")\n", + "all_reactant = [[import_mol(\"OC(=O)CCCCC(CCC(O)=O)CC(O)=O\")], [import_mol(\"CCO\")]]\n", + "options = ReactorOptions()\n", + "print(\"Ratio 1:1\")\n", + "options.ratio = [1, 1]\n", + "result = parallel(Mode.SEQUENTIAL, reaction, all_reactant, options=options)\n", + "display_result(result)\n", + "\n", + "print(\"Ratio 1:2\")\n", + "options.ratio = [1, 2]\n", + "result = parallel(Mode.SEQUENTIAL, reaction, all_reactant, options=options)\n", + "display_result(result)\n", + "\n", + "print(\"Ratio 1:3\")\n", + "options.ratio = [1, 3]\n", + "result = parallel(Mode.SEQUENTIAL, reaction, all_reactant, options=options)\n", + "display_result(result)" + ], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio 1:1\n", + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 18)), Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 12)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(9, 11)), Bond(type=1, atoms=(12, 13)), Bond(type=1, atoms=(13, 14)), Bond(type=2, atoms=(13, 15)), Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(17, 18))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 18)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(2, 3)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 12)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(9, 11)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(9, 11)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 12)), Bond(type=1, atoms=(12, 13)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)), Bond(type=1, atoms=(13, 14)), Bond(type=2, atoms=(13, 15)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(13, 14)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(13, 15)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(16, 17)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(17, 18)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 18)), Bond(type=1, atoms=(17, 18))))), native_handle=335, _to_str=, properties={})" + ], + "image/svg+xml": "OHOOHOOCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 2. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(7, 12)), Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(10, 11)), Bond(type=1, atoms=(10, 18)), Bond(type=1, atoms=(12, 13)), Bond(type=1, atoms=(13, 14)), Bond(type=2, atoms=(13, 15)), Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(17, 18))), atoms=(Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 3)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(7, 12)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(10, 11)), Bond(type=1, atoms=(10, 18)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(10, 11)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 12)), Bond(type=1, atoms=(12, 13)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)), Bond(type=1, atoms=(13, 14)), Bond(type=2, atoms=(13, 15)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(13, 14)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(13, 15)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(16, 17)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(17, 18)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(10, 18)), Bond(type=1, atoms=(17, 18))))), native_handle=336, _to_str=, properties={})" + ], + "image/svg+xml": "HOOOHOOCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 3. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(7, 13)), Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=1, atoms=(10, 11)), Bond(type=2, atoms=(10, 12)), Bond(type=1, atoms=(13, 14)), Bond(type=2, atoms=(14, 15)), Bond(type=1, atoms=(14, 18)), Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(17, 18))), atoms=(Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 3)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(7, 13)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)), Bond(type=1, atoms=(10, 11)), Bond(type=2, atoms=(10, 12)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(10, 11)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(10, 12)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 13)), Bond(type=1, atoms=(13, 14)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(13, 14)), Bond(type=2, atoms=(14, 15)), Bond(type=1, atoms=(14, 18)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(14, 15)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(16, 17)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(17, 18)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(14, 18)), Bond(type=1, atoms=(17, 18))))), native_handle=337, _to_str=, properties={})" + ], + "image/svg+xml": "HOOOHOOCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio 1:2\n", + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 17)), Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 11)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(9, 10)), Bond(type=1, atoms=(9, 20)), Bond(type=1, atoms=(11, 12)), Bond(type=1, atoms=(12, 13)), Bond(type=2, atoms=(12, 14)), Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(19, 20))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 17)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(2, 3)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 11)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(9, 10)), Bond(type=1, atoms=(9, 20)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(9, 10)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 11)), Bond(type=1, atoms=(11, 12)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(11, 12)), Bond(type=1, atoms=(12, 13)), Bond(type=2, atoms=(12, 14)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(12, 14)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(16, 17)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 17)), Bond(type=1, atoms=(16, 17)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(18, 19)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(19, 20)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 20)), Bond(type=1, atoms=(19, 20))))), native_handle=343, _to_str=, properties={})" + ], + "image/svg+xml": "OOOHOCH3OH3CO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 2. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 17)), Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 12)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(9, 11)), Bond(type=1, atoms=(12, 13)), Bond(type=2, atoms=(13, 14)), Bond(type=1, atoms=(13, 20)), Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(19, 20))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 17)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(2, 3)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 12)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(9, 11)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)),)), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(9, 11)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 12)), Bond(type=1, atoms=(12, 13)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)), Bond(type=2, atoms=(13, 14)), Bond(type=1, atoms=(13, 20)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(13, 14)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(16, 17)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 17)), Bond(type=1, atoms=(16, 17)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(18, 19)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(19, 20)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(13, 20)), Bond(type=1, atoms=(19, 20))))), native_handle=344, _to_str=, properties={})" + ], + "image/svg+xml": "OHOOOCH3OH3CO\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " 3. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(7, 12)), Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(10, 11)), Bond(type=1, atoms=(10, 17)), Bond(type=1, atoms=(12, 13)), Bond(type=2, atoms=(13, 14)), Bond(type=1, atoms=(13, 20)), Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(16, 17)), Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(19, 20))), atoms=(Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 1)), Bond(type=2, atoms=(1, 2)), Bond(type=1, atoms=(1, 3)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(1, 2)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(1, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(7, 12)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=1, atoms=(9, 10)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 10)), Bond(type=2, atoms=(10, 11)), Bond(type=1, atoms=(10, 17)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(10, 11)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 12)), Bond(type=1, atoms=(12, 13)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 13)), Bond(type=2, atoms=(13, 14)), Bond(type=1, atoms=(13, 20)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(13, 14)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(16, 17)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(10, 17)), Bond(type=1, atoms=(16, 17)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(18, 19)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(19, 20)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(13, 20)), Bond(type=1, atoms=(19, 20))))), native_handle=345, _to_str=, properties={})" + ], + "image/svg+xml": "HOOOOCH3OCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio 1:3\n", + "1. result\n", + " 1. product set:\n", + " 1. product\n" + ] + }, + { + "data": { + "text/plain": [ + "Molecule(_source='\\n\\n', _format='mrv', _to_svg=, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 16)), Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 11)), Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(9, 10)), Bond(type=1, atoms=(9, 19)), Bond(type=1, atoms=(11, 12)), Bond(type=2, atoms=(12, 13)), Bond(type=1, atoms=(12, 22)), Bond(type=1, atoms=(14, 15)), Bond(type=1, atoms=(15, 16)), Bond(type=1, atoms=(17, 18)), Bond(type=1, atoms=(18, 19)), Bond(type=1, atoms=(20, 21)), Bond(type=1, atoms=(21, 22))), atoms=(Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)), Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(0, 16)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(0, 1)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 2)), Bond(type=1, atoms=(2, 3)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(2, 3)), Bond(type=1, atoms=(3, 4)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(3, 4)), Bond(type=1, atoms=(4, 5)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(4, 5)), Bond(type=1, atoms=(5, 6)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(5, 6)), Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(6, 11)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 7)), Bond(type=1, atoms=(7, 8)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(7, 8)), Bond(type=1, atoms=(8, 9)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(8, 9)), Bond(type=2, atoms=(9, 10)), Bond(type=1, atoms=(9, 19)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(9, 10)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(6, 11)), Bond(type=1, atoms=(11, 12)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(11, 12)), Bond(type=2, atoms=(12, 13)), Bond(type=1, atoms=(12, 22)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=2, atoms=(12, 13)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(14, 15)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(14, 15)), Bond(type=1, atoms=(15, 16)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(0, 16)), Bond(type=1, atoms=(15, 16)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(17, 18)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(17, 18)), Bond(type=1, atoms=(18, 19)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(9, 19)), Bond(type=1, atoms=(18, 19)))), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(20, 21)),)), Atom(symbol='C', atom_number=6, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(20, 21)), Bond(type=1, atoms=(21, 22)))), Atom(symbol='O', atom_number=8, mass_number=0, mapping=0, bonds=(Bond(type=1, atoms=(12, 22)), Bond(type=1, atoms=(21, 22))))), native_handle=351, _to_str=, properties={})" + ], + "image/svg+xml": "OOOCH3OH3COCH3O\n" + }, + "metadata": {}, + "output_type": "display_data", + "jetTransient": { + "display_id": null + } + } + ], + "execution_count": 41 + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.14.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}