From 8d2c6548ef9da4aac7632f0ead6815ab104e3552 Mon Sep 17 00:00:00 2001 From: DKL Date: Tue, 14 Jan 2025 12:42:41 +0100 Subject: [PATCH] Fix chem notebook formatting. Signed-off-by: DKL --- .../chemistry_patcid.ipynb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/examples/data_query_chemistry_patcid/chemistry_patcid.ipynb b/examples/data_query_chemistry_patcid/chemistry_patcid.ipynb index 3437211..df2dd2a 100644 --- a/examples/data_query_chemistry_patcid/chemistry_patcid.ipynb +++ b/examples/data_query_chemistry_patcid/chemistry_patcid.ipynb @@ -93,7 +93,7 @@ " CompoundsBySmarts,\n", " CompoundsIn,\n", " DocumentsByIds,\n", - " DocumentsHaving\n", + " DocumentsHaving,\n", ")\n", "from deepsearch.chemistry.queries.molecules import MolId, MolIdType, MolQueryType\n", "from deepsearch.cps.client.components.elastic import ElasticDataCollectionSource\n", @@ -4538,7 +4538,9 @@ "input_smarts = \"[#6]-[#16X3](-[#6]\"\n", "\n", "display(Markdown(\"### SMARTS\"))\n", - "display(Markdown(f\"We will list compounds that are described by SMARTS `{input_smarts}`\"))" + "display(\n", + " Markdown(f\"We will list compounds that are described by SMARTS `{input_smarts}`\")\n", + ")" ] }, { @@ -8949,7 +8951,9 @@ "\n", "patent_ids = [\"US10526338B%\"]\n", "\n", - "compounds = query_chemistry(api, CompoundsIn(documents=DocumentsByIds(publication_ids=patent_ids)), limit=20)\n", + "compounds = query_chemistry(\n", + " api, CompoundsIn(documents=DocumentsByIds(publication_ids=patent_ids)), limit=20\n", + ")\n", "\n", "# Visualize results\n", "results_table = [c.model_dump() for c in compounds]\n", @@ -10275,7 +10279,11 @@ "\n", "input_smiles = \"C1(C(=C)C([O-])=C1C)=O\"\n", "\n", - "compounds = query_chemistry(api, DocumentsHaving(compounds=CompoundsBySubstructure(structure=input_smiles)), limit=20)\n", + "compounds = query_chemistry(\n", + " api,\n", + " DocumentsHaving(compounds=CompoundsBySubstructure(structure=input_smiles)),\n", + " limit=20,\n", + ")\n", "\n", "# Visualize results\n", "results_table = [c.model_dump() for c in compounds]\n",