Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalize documentation (again!) #16

Merged
merged 4 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ micromamba install -c conda-forge medchem

## Getting Started

The best way to get started is by going through the tutorials.
The best way to get started is by going through [**the tutorials**](./tutorials/Basic_Concepts.ipynb).

## Usage Notice

Expand Down
1,525 changes: 269 additions & 1,256 deletions docs/tutorials/Basic_Concepts.ipynb

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/tutorials/Catalogs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,16 @@
"matches = [custom_catalog.HasMatch(x) for x in mols]\n",
"dm.to_image(mols, legends=[f\"Match: {x}\" for x in matches])\n"
]
},
{
"cell_type": "markdown",
"id": "dcef48d4",
"metadata": {},
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
12 changes: 7 additions & 5 deletions docs/tutorials/Chemical_Groups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -588,12 +588,14 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4f369694",
"cell_type": "markdown",
"id": "f446e5b2",
"metadata": {},
"outputs": [],
"source": []
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
10 changes: 10 additions & 0 deletions docs/tutorials/Constraints_Filtering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,16 @@
"\n",
"dm.to_image(mols, legends=legends)"
]
},
{
"cell_type": "markdown",
"id": "2021dfa2",
"metadata": {},
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/Functional_API.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9121,12 +9121,12 @@
},
{
"cell_type": "markdown",
"id": "51768c29",
"id": "8713cdbb",
"metadata": {},
"source": [
"---\n",
"\n",
"The End!"
"-- The End :-)"
]
}
],
Expand Down
10 changes: 10 additions & 0 deletions docs/tutorials/Medchem_Query_Language.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,16 @@
" - OR operator : `OR` or `|` or `||` or `or`\n",
" - NOT operator : `NOT` or `!` or `~` or `not`\n"
]
},
{
"cell_type": "markdown",
"id": "a851c80b",
"metadata": {},
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
10 changes: 10 additions & 0 deletions docs/tutorials/Medchem_Rules.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,16 @@
"# Apply rule #2\n",
"rule_2(mol)"
]
},
{
"cell_type": "markdown",
"id": "eb05d65b",
"metadata": {},
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
10 changes: 10 additions & 0 deletions docs/tutorials/Molecular_Complexity.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,16 @@
"\n",
"dm.to_image(data[\"mol\"].tolist(), legends=legends, mol_size=(300, 200))"
]
},
{
"cell_type": "markdown",
"id": "165a451d",
"metadata": {},
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
10 changes: 10 additions & 0 deletions docs/tutorials/Structural_Filters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3126,6 +3126,16 @@
"\n",
"results.head()"
]
},
{
"cell_type": "markdown",
"id": "3bae7171",
"metadata": {},
"source": [
"---\n",
"\n",
"-- The End :-)"
]
}
],
"metadata": {
Expand Down
8 changes: 8 additions & 0 deletions docs/tutorials/data/Drug_Prodrug_pairs.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Drug,Drug SMILES,Prodrug,Prodrug SMILES
Gabapentin,O=C(O)CC1(CN)CCCCC1,Gabapentin enacarbil,CC(C)C(=O)OC(C)OC(=O)NCC1(CCCCC1)CC(=O)O
Dabigatran,CN1C2=C(C=C(C=C2)C(=O)N(CCC(=O)O)C3=CC=CC=N3)N=C1CNC4=CC=C(C=C4)C(=N)N,Dabigatran etexilate,CCCCCCOC(=O)N=C(C1=CC=C(C=C1)NCC2=NC3=C(N2C)C=CC(=C3)C(=O)N(CCC(=O)OCC)C4=CC=CC=N4)N
Sofosbuvir,OP(OC[C@@H]1[C@@H](O)[C@@](C)(F)[C@H](N2C=CC(NC2=O)=O)O1)(O)=O,Sofosbuvir,C[C@@H](C(=O)OC(C)C)N[P@](=O)(OC[C@@H]1[C@H]([C@@]([C@@H](O1)N2C=CC(=O)NC2=O)(C)F)O)OC3=CC=CC=C3
Tedizolid,O=C4O[C@H](CN4c3cc(F)c(c1ccc(nc1)c2nn(nn2)C)cc3)CO,Tedizolid phosphate,CN1N=NC(=N1)C1=CC=C(C=N1)C1=CC=C(C=C1F)N1C[C@H](COP(O)(O)=O)OC1=O
Isavuconazole,C[C@H]([C@](c1c(F)ccc(F)c1)(O)Cn2ncnc2)c3scc(c4ccc(C#N)cc4)n3,Isavuconazonium,C[C@H]([C@](c1c(F)ccc(F)c1)(O)Cn2nc[n+](C(OC(N(c3ncccc3COC(CNC)=O)C)=O)C)c2)c4scc(c5ccc(C#N)cc5)n4
Aripiprazole,Clc4cccc(N3CCN(CCCCOc2ccc1c(NC(=O)CC1)c2)CC3)c4Cl,Aripiprazole lauroxil,CCCCCCCCCCCC(=O)OCN1C(=O)CCC2=C1C=C(C=C2)OCCCCN3CCN(CC3)C4=C(C(=CC=C4)Cl)Cl
ACT-333679,CC(N(C1=CN=C(C2=CC=CC=C2)C(C3=CC=CC=C3)=N1)CCCCOCC(O)=O)C,Selexipag,CC(C)N(CCCCOCC(=O)NS(=O)(=O)C)C1=CN=C(C(=N1)C2=CC=CC=C2)C3=CC=CC=C3
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ strict: true

nav:
- Overview: index.md
- CLI: cli.md
- Tutorials:
- Basic Concepts: tutorials/Basic_Concepts.ipynb
- Functional API: tutorials/Functional_API.ipynb
Expand All @@ -25,6 +24,7 @@ nav:
- Medchem Query Language: tutorials/Medchem_Query_Language.ipynb
- Molecular Complexity: tutorials/Molecular_Complexity.ipynb
- Constraints Filtering: tutorials/Constraints_Filtering.ipynb
- CLI: cli.md
- API:
- medchem.rules: api/medchem.rules.md
- medchem.structural: api/medchem.structural.md
Expand Down
4 changes: 4 additions & 0 deletions tests/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
NOTEBOOK_PATHS = sorted(list(TUTORIALS_DIR.glob("*.ipynb")))
NOTEBOOK_PATHS = list(filter(lambda x: x.name not in DISABLE_NOTEBOOKS, NOTEBOOK_PATHS))

# Discard some notebooks
NOTEBOOKS_TO_DISCARD = ["Basic_Concepts.ipynb"]
NOTEBOOK_PATHS = list(filter(lambda x: x.name not in NOTEBOOKS_TO_DISCARD, NOTEBOOK_PATHS))


@pytest.mark.parametrize("nb_path", NOTEBOOK_PATHS, ids=[str(n.name) for n in NOTEBOOK_PATHS])
def test_notebook(nb_path):
Expand Down