Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hadim committed Oct 27, 2023
1 parent af88fcc commit e281c1a
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 537 deletions.
56 changes: 28 additions & 28 deletions docs/tutorials/design-with-safe.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
],
"source": [
"designer = sf.SAFEDesign.load_default(verbose=True)\n"
"# designer = sf.SAFEDesign.load_default(verbose=True)\n"
]
},
{
Expand All @@ -58,13 +58,13 @@
"metadata": {},
"outputs": [],
"source": [
"candidate_mol = \"O=C(C#CCN1CCCCC1)Nc1ccc2ncnc(Nc3cccc(Br)c3)c2c1\"\n",
"# candidate_mol = \"O=C(C#CCN1CCCCC1)Nc1ccc2ncnc(Nc3cccc(Br)c3)c2c1\"\n",
"\n",
"scaffold = \"[*]N-c1ccc2ncnc(-N[*])c2c1\" # this is for scaffold decoration\n",
"superstructure = \"c1ccc2ncncc2c1\"\n",
"side_chains = '[1*]C(=O)C#CCN1CCCCC1.[2*]c1cccc(Br)c1' # this is for scaffold morphing\n",
"motif = \"[*]-N1CCCCC1\" # this is for motif extension\n",
"linker_generation = [\"[*]-N1CCCCC1\", \"Brc1cccc(Nc2ncnc3ccc(-[*])cc23)c1\"] # this is for linker generation\n"
"# scaffold = \"[*]N-c1ccc2ncnc(-N[*])c2c1\" # this is for scaffold decoration\n",
"# superstructure = \"c1ccc2ncncc2c1\"\n",
"# side_chains = '[1*]C(=O)C#CCN1CCCCC1.[2*]c1cccc(Br)c1' # this is for scaffold morphing\n",
"# motif = \"[*]-N1CCCCC1\" # this is for motif extension\n",
"# linker_generation = [\"[*]-N1CCCCC1\", \"Brc1cccc(Nc2ncnc3ccc(-[*])cc23)c1\"] # this is for linker generation\n"
]
},
{
Expand Down Expand Up @@ -184,7 +184,7 @@
}
],
"source": [
"dm.to_image(dm.to_mol(candidate_mol))\n"
"# dm.to_image(dm.to_mol(candidate_mol))\n"
]
},
{
Expand All @@ -193,7 +193,7 @@
"metadata": {},
"outputs": [],
"source": [
"N_SAMPLES = 100\n"
"# N_SAMPLES = 100\n"
]
},
{
Expand All @@ -219,7 +219,7 @@
}
],
"source": [
"generated = designer.de_novo_generation(sanitize=True, n_samples_per_trial=N_SAMPLES)\n"
"# generated = designer.de_novo_generation(sanitize=True, n_samples_per_trial=N_SAMPLES)\n"
]
},
{
Expand Down Expand Up @@ -1633,7 +1633,7 @@
}
],
"source": [
"dm.to_image(generated[:20])\n"
"# dm.to_image(generated[:20])\n"
]
},
{
Expand Down Expand Up @@ -1710,7 +1710,7 @@
}
],
"source": [
"dm.to_image(scaffold)\n"
"# dm.to_image(scaffold)\n"
]
},
{
Expand All @@ -1727,7 +1727,7 @@
}
],
"source": [
"generated = designer.scaffold_decoration(scaffold=scaffold, n_samples_per_trial=N_SAMPLES, n_trials=2, sanitize=True, do_not_fragment_further=True)\n"
"# generated = designer.scaffold_decoration(scaffold=scaffold, n_samples_per_trial=N_SAMPLES, n_trials=2, sanitize=True, do_not_fragment_further=True)\n"
]
},
{
Expand Down Expand Up @@ -5996,7 +5996,7 @@
}
],
"source": [
"dm.viz.lasso_highlight_image([dm.to_mol(x) for x in generated[:20]], dm.from_smarts(scaffold))\n"
"# dm.viz.lasso_highlight_image([dm.to_mol(x) for x in generated[:20]], dm.from_smarts(scaffold))\n"
]
},
{
Expand Down Expand Up @@ -6061,7 +6061,7 @@
}
],
"source": [
"dm.to_image(superstructure)\n"
"# dm.to_image(superstructure)\n"
]
},
{
Expand All @@ -6078,8 +6078,8 @@
}
],
"source": [
"generated = designer.super_structure(core=superstructure, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, attachment_point_depth=3)\n",
"#generated\n"
"# generated = designer.super_structure(core=superstructure, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, attachment_point_depth=3)\n",
"# #generated\n"
]
},
{
Expand Down Expand Up @@ -7227,7 +7227,7 @@
}
],
"source": [
"dm.to_image(generated[:20])\n"
"# dm.to_image(generated[:20])\n"
]
},
{
Expand Down Expand Up @@ -7279,7 +7279,7 @@
}
],
"source": [
"dm.to_image(motif)\n"
"# dm.to_image(motif)\n"
]
},
{
Expand All @@ -7296,8 +7296,8 @@
}
],
"source": [
"# let's make some long sequence\n",
"generated = designer.motif_extension(motif=motif, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, min_length=25, max_length=80)\n"
"# # let's make some long sequence\n",
"# generated = designer.motif_extension(motif=motif, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, min_length=25, max_length=80)\n"
]
},
{
Expand Down Expand Up @@ -8453,7 +8453,7 @@
}
],
"source": [
"dm.to_image(generated[:20])\n"
"# dm.to_image(generated[:20])\n"
]
},
{
Expand Down Expand Up @@ -8543,7 +8543,7 @@
}
],
"source": [
"dm.to_image(side_chains)\n"
"# dm.to_image(side_chains)\n"
]
},
{
Expand Down Expand Up @@ -10007,8 +10007,8 @@
}
],
"source": [
"generated = designer.scaffold_morphing(side_chains=side_chains, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, random_seed=100)\n",
"dm.to_image(generated[:20])\n"
"# generated = designer.scaffold_morphing(side_chains=side_chains, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, random_seed=100)\n",
"# dm.to_image(generated[:20])\n"
]
},
{
Expand Down Expand Up @@ -10114,7 +10114,7 @@
}
],
"source": [
"dm.to_image(linker_generation)\n"
"# dm.to_image(linker_generation)\n"
]
},
{
Expand Down Expand Up @@ -12321,8 +12321,8 @@
}
],
"source": [
"generated = designer.linker_generation(*linker_generation, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, random_seed=100)\n",
"dm.to_image(generated[:20])\n"
"# generated = designer.linker_generation(*linker_generation, n_samples_per_trial=N_SAMPLES, n_trials=1, sanitize=True, do_not_fragment_further=False, random_seed=100)\n",
"# dm.to_image(generated[:20])\n"
]
}
],
Expand Down
10 changes: 0 additions & 10 deletions scripts/model_trainer.py

This file was deleted.

Loading

0 comments on commit e281c1a

Please sign in to comment.