-
Notifications
You must be signed in to change notification settings - Fork 0
/
guide
66 lines (40 loc) · 1.21 KB
/
guide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
to run jupyter notebook
jupyter notebook
to run rdkit with python notebook::
conda activate my-rdkit-env
jupyter notebook
on ipynb---- new python(rdkit-env file)
to verify the running of rdkit:
RUN:
from IPython.display import SVG
from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
# Create mol object from smiles string
mol = Chem.MolFromSmiles('c1cccnc1O')
molSize=(450,150)
mc = Chem.Mol(mol.ToBinary())
if not mc.GetNumConformers():
#Compute 2D coordinates
rdDepictor.Compute2DCoords(mc)
# init the drawer with the size
drawer = rdMolDraw2D.MolDraw2DSVG(molSize[0],molSize[1])
#draw the molcule
drawer.DrawMolecule(mc)
drawer.FinishDrawing()
# get the SVG string
svg = drawer.GetDrawingText()
# fix the svg string and display it
display(SVG(svg.replace('svg:','')))
how to set up the system---
install conda
install rdkit using conda
follow this blog ----------------- http://davies-lee.com/index.php/2018/10/06/rdkit-in-jupyter-notebooks/
install sklearn in the venv:
pip install scikit-learn
install imbalance in the venv:
pip install imbalanced-learn
install matplotlib:
pip install matplotlib
install seaborn:
pip install seaborn