Skip to content

Commit

Permalink
Merge pull request #207 from datamol-io/fix-small-changes
Browse files Browse the repository at this point in the history
fix small typos
  • Loading branch information
mercuryseries authored Jul 16, 2023
2 parents 6ec1615 + f1c6681 commit fc0431b
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion datamol/conformers/_conformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def generate(

if energies is not None:
minE = np.min(energies)
# Add the energy as a property to each conformers
# Add the energy as a property to each conformer
[
(
conf.SetDoubleProp(f"rdkit_{forcefield}_energy", energy),
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/Aligning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# Aligning Molecules\n",
"\n",
"One of the most important things enabling us to have success in drug discovery is understanding structure-activity relationship (SAR). This is a foundation that explains how the structure of a molecule relates to its biological activity. Here is an excerpt from [CDDVault](https://info.collaborativedrug.com/tofu-content-what-is-sar#:~:text=Structure%20Activity%20Relationships%20(SAR)%20can,to%20further%20characterize%20existing%20molecules.) that explains the importance of SAR in drug discovery: \n",
"One of the most important things enabling us to have success in drug discovery is understanding structure-activity relationship (SAR). This is a foundation that explains how the structure of a molecule relates to its biological activity. Here is an excerpt from [CDDVault](https://info.collaborativedrug.com/tofu-content-what-is-sar#:~:text=Structure%20Activity%20Relationships%20%28SAR%29%20can,to%20further%20characterize%20existing%20molecules.) that explains the importance of SAR in drug discovery: \n",
"\n",
"”SAR depends on the recognition of which structural characteristics correlate with chemical and biological reactivity. Thus the ability to draw conclusions about an unknown compound depends upon both the structural features that can be characterized as well as the database of molecules against which they are compared. When combined with appropriate professional judgment, SAR can be a powerful tool for understanding functional implications when similarities are found. For example, in the case of risk assessment of uncharacterized compounds, data from the most sensitive toxicological endpoints should be included in the analysis, such as carcinogenicity or cardiotoxicity.”\n",
"\n",
Expand All @@ -16,13 +16,13 @@
"1. Aligning molecules makes it easier to visualize and highlight substructures\n",
"2. It can help you identify and understand any shared structures between drug candidates\n",
"3. It can help you identify any potential activity patterns\n",
" 1. For example, when analyzing [activity cliffs](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6740043/#:~:text=Activity%20cliffs%20(ACs)%20are%20generally,that%20strongly%20influence%20biological%20activity.) - “defined as pairs or groups of structurally similar compounds that are active against the same target but have large differences in potency. Activity cliffs capture chemical modifications that strongly influence biological activity”. An example of some compounds with activity cliffs and their structural differences highlighted are shown below: \n",
" 1. For example, when analyzing [activity cliffs](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6740043/#:~:text=Activity%20cliffs%20%28ACs%29%20are%20generally,that%20strongly%20influence%20biological%20activity.) - “defined as pairs or groups of structurally similar compounds that are active against the same target but have large differences in potency. Activity cliffs capture chemical modifications that strongly influence biological activity”. An example of some compounds with activity cliffs and their structural differences highlighted are shown below: \n",
"\n",
"![Untitled](images/Aligning_1.png)\n",
"\n",
"[Source](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6740043/#:~:text=Activity%20cliffs%20(ACs)%20are%20generally,that%20strongly%20influence%20biological%20activity.)\n",
"[Source](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6740043/#:~:text=Activity%20cliffs%20%28ACs%29%20are%20generally,that%20strongly%20influence%20biological%20activity.)\n",
"\n",
"**Note:** The concept of an activity cliff seems simple in this example, however, in practice it is extremely complicated to represent them computationally and derive a systematic approach for identification. Read more about the evolving concept of activity cliffs [here](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6740043/#:~:text=Activity%20cliffs%20(ACs)%20are%20generally,that%20strongly%20influence%20biological%20activity.). \n",
"**Note:** The concept of an activity cliff seems simple in this example, however, in practice it is extremely complicated to represent them computationally and derive a systematic approach for identification. Read more about the evolving concept of activity cliffs [here](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6740043/#:~:text=Activity%20cliffs%20%28ACs%29%20are%20generally,that%20strongly%20influence%20biological%20activity.). \n",
"\n",
"As an example to show you how alignment makes visualization easier, please see the image below. The alignment of this sample dataset makes it extremely easy to identify the core structure of 3 rings which are common in all compounds. \n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/Conformers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"metadata": {},
"outputs": [],
"source": [
"# EMbed conformers\n",
"# Embed conformers\n",
"confs = rdDistGeom.EmbedMultipleConfs(m2, numConfs=50, params=params)"
]
},
Expand Down Expand Up @@ -294,7 +294,7 @@
" ff = rdForceFieldHelpers.UFFGetMoleculeForceField(m2, confId=conf.GetId())\n",
" energies.append(ff.CalcEnergy())\n",
"energies = np.array(energies)\n",
"# Add the energy as a property to each conformers\n",
"# Add the energy as a property to each conformer\n",
"[conf.SetDoubleProp(\"rdkit_uff_energy\", energy) for energy, conf in zip(energies, m2.GetConformers())]\n",
"\n",
"# Now we reorder conformers according to their energies,\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/Descriptors.ipynb

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/tutorials/Fragment.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tutorials/Preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"- ***reionize -*** reionization of the molecule (protonation following the acidity order)\n",
" - If one or more acidic functionalities are present in the molecule, this option ensures the correct neutral/ionized state for such functional groups. Molecules are uncharged by adding and/or removing hydrogens. For zwitterions, hydrogens are moved to eliminate charges where possible. However, in cases where there is a positive charge that is not neutralizable, an attempt is made to also preserve the corresponding negative charge\n",
" - Read more [here](https://molvs.readthedocs.io/en/latest/guide/standardize.html#reionize-acids)\n",
"- ***uncharge* -** charge removal\n",
"- ***uncharge -*** charge removal\n",
" - This option neutralizes the molecule by reversing the protonation state of protonated and deprotonated groups if present (e.g. a carboxylate is re-protonated to the corresponding carboxylic acid).\n",
" - In cases where there is a positive charge that is not neutralizable, an attempt is made to also preserve the corresponding negative charge to ensure a net zero charge.\n",
"- ***stereo -*** stereochemistry proper reassignment if missing.\n",
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/Reactions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
}
],
"source": [
"# Define a reaction from rxn block finle\n",
"# Define a reaction from rxn block file\n",
"rxn = dm.reactions.rxn_from_block_file(\"data/ReactionBlock.rxn\", sanitize=True)\n",
"rxn"
]
Expand Down Expand Up @@ -101,7 +101,7 @@
}
],
"source": [
"# Apply reaction and snitize the products\n",
"# Apply reaction and sanitize the products\n",
"prod_mols = dm.reactions.apply_reaction(\n",
" rxn=rxn,\n",
" reactants=(dm.to_mol(\"CC(=O)O\"), dm.to_mol(\"NC\")),\n",
Expand Down Expand Up @@ -247,7 +247,7 @@
}
],
"source": [
"# One reaction to attach multiple specified attchment points\n",
"# One reaction to attach multiple specified attachment points\n",
"rxn2 = dm.reactions.rxn_from_smarts(\"[1*][*:1].[2*][*:4].([1*][*:2].[2*][*:3])>>([*:1][*:2].[*:3][*:4])\")\n",
"res2 = dm.reactions.apply_reaction(rxn2, (frag1, frag2, scaffold), product_index=0)\n",
"dm.to_image(res2)"
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/Visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"id": "2e18c4fc-3d31-42ec-973c-8e422d045723",
"metadata": {},
"source": [
"This tutorial will highligh the major viz related features of Datamol."
"This tutorial will highlight the major viz related features of Datamol."
]
},
{
Expand Down Expand Up @@ -449,8 +449,8 @@
"metadata": {},
"source": [
"#### Lasso Highlighting\n",
"The code below will show how the lasso highlight function should be used. The signature for this function is\n",
"```\n",
"The code below will show how the lasso highlight function should be used. The signature for this function is:\n",
"```python\n",
"def lasso_highlight_image(\n",
" target_molecule: Union[str, dm.Mol],\n",
" search_molecules: Union[str, List[str], dm.Mol, List[dm.Mol]],\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ All `datamol` functions are available under `dm`.

## Lazy loading

datamol uses lazy loading to dynamically expose all its API without imposing a long import time during `import datamol as dm`. In case of trouble you can always disable lazy loading by setting `DATAMOL_DISABLE_LAZY_LOADING="1"`. Please report any issue [on the datamol repo](https://github.com/datamol-io/datamol/issues).
datamol uses lazy loading to dynamically expose all its API without imposing a long import time during `import datamol as dm`. In case of trouble you can always disable lazy loading by setting the environment variable `DATAMOL_DISABLE_LAZY_LOADING` to `1`. Please report any issue [on the datamol repo](https://github.com/datamol-io/datamol/issues).

0 comments on commit fc0431b

Please sign in to comment.