Skip to content

Commit

Permalink
Fix chem notebook formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdinkla committed Jan 14, 2025
1 parent 2638ced commit 9835695
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions examples/data_query_chemistry_patcid/chemistry_patcid.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
")"
]
},
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 9835695

Please sign in to comment.