forked from rasbt/smilite
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.html
1455 lines (683 loc) · 35.8 KB
/
README.html
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<style>
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
}
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #737373;
background-color: white;
margin: 10px 13px 10px 13px;
}
table {
margin: 10px 0 15px 0;
border-collapse: collapse;
}
td,th {
border: 1px solid #ddd;
padding: 3px 10px;
}
th {
padding: 5px 10px;
}
a {
color: #0069d6;
}
a:hover {
color: #0050a3;
text-decoration: none;
}
a img {
border: none;
}
p {
margin-bottom: 9px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #404040;
line-height: 36px;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #ccc;
}
blockquote {
padding: 13px 13px 21px 15px;
margin-bottom: 18px;
font-family:georgia,serif;
font-style: italic;
}
blockquote:before {
content:"\201C";
font-size:40px;
margin-left:-10px;
font-family:georgia,serif;
color:#eee;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
font-style: italic;
}
code, pre {
font-family: Monaco, Andale Mono, Courier New, monospace;
}
code {
background-color: #fee9cc;
color: rgba(0, 0, 0, 0.75);
padding: 1px 3px;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre {
display: block;
padding: 14px;
margin: 0 0 18px;
line-height: 16px;
font-size: 11px;
border: 1px solid #d9d9d9;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background-color: #fff;
color:#737373;
font-size: 11px;
padding: 0;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:10px auto;
}
}
@media print {
body,code,pre code,h1,h2,h3,h4,h5,h6 {
color: black;
}
table, pre {
page-break-inside: avoid;
}
}
</style>
<title><p>Copyright 2014 Sebastian Raschka <br><br></p>
<h1>smilite</h1>
<p>smilite is a</title>
</head>
<body>
<p>Copyright 2014 Sebastian Raschka <br><br></p>
<h1>smilite</h1>
<p>smilite is a Python module to download and analyze SMILE strings (Simplified Molecular-Input Line-entry System) of chemical compounds from ZINC (a free database of commercially-available compounds for virtual screening, <a href="http://zinc.docking.org">http://zinc.docking.org</a>). <br/>
Now supports both Python 3.x and Python 2.x.</p>
<p><br><br>
<img src="https://raw.github.com/rasbt/smilite/master/images/smilite_overview.png" alt="" /><br/>
<br><br></p>
<h4>Sections</h4>
<p>• <a href="#installation">Installation</a><br>
• <a href="#simple_cmd_scripts">Simple command line online query scripts</a><br>
- <a href="#lookup_zincid">lookup_zincid.py</a><br>
- <a href="#lookup_smile_str">lookup_smile_str.py</a><br>
• <a href="#csv_scripts">CSV file command line scripts</a><br>
- <a href="#gen_zincid">gen_zincid_smile_csv.py (downloading SMILES)</a><br>
- <a href="#comp_smile">comp_smile_strings.py (checking for duplicates within 1 file)</a><br>
- <a href="#comp_2_smile">comp_2_smile_files.py (checking for duplicates across 2 files)</a><br>
• <a href="#sqlite_scripts">SQLite file command line scripts</a><br>
- <a href="#lookup1id">lookup_single_id.py</a><br>
- <a href="#lookupsmile">lookup_smile.py</a><br>
- <a href="#add_to_sqlite">add_to_sqlite.py</a><br>
- <a href="#sqlite_to_csv">sqlite_to_csv.py</a><br>
• <a href="#documentation">Documentation</a><br>
- <a href="#general_func">General functions</a><br>
- <a href="#csvfile_func">CSV file functions</a><br>
- <a href="#sqlite_func">SQLite functions</a><br></p>
<p>• <a href="#contact">Contact</a><br>
• <a href="#changelog">Changelog</a><br></p>
<p><br>
<br></p>
<p><a name="installation"></a></p>
<h1>Installation</h1>
<p>You can use the following command to install smilite:<br/>
<code>pip install smilite</code><br/>
or <br/>
<code>easy_install smilite</code></p>
<p>Alternatively, you download the package manually from the Python Package Index <a href="https://pypi.python.org/pypi/smilite">https://pypi.python.org/pypi/smilite</a>, unzip it, navigate into the package, and use the command:</p>
<p><code>python3 setup.py install</code></p>
<p><br>
<br></p>
<p><a name="simple_cmd_scripts"></a></p>
<h1>Simple command line online query scripts</h1>
<p>If you downloaded the smilite package from <a href="https://pypi.python.org/pypi/smilite">https://pypi.python.org/pypi/smilite</a> or <a href="https://github.com/rasbt/smilite">https://github.com/rasbt/smilite</a>, you can use the command line scripts I provide in the <code>scripts/cmd_line_online_query_scripts</code> dir.</p>
<p><br>
<br></p>
<p><a name="lookup_zincid"></a></p>
<h3>lookup_zincid.py</h3>
<p>Retrieves the SMILE string and simplified SMILE string for a given ZINC ID<br>
from the online ZINC database.
</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 lookup_zincid.py ZINC_ID</code>
<br><br></p>
<p><strong>Example (retrieve data from ZINC):</strong><br/>
<code>[shell]>> python3 lookup_zincid.py ZINC01234567</code>
<br><br></p>
<p><strong>Output example:</strong></p>
<pre>
ZINC01234567
C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O
CC1CCCCN1CCCC(C2CCCCC2)(C3CCCCC3)O
</pre>
<p>Where<br/>
- 1st row: ZINC ID <br/>
- 2nd row: SMILE string <br/>
- 3rd row: simplified SMILE string</p>
<p><br>
<br></p>
<p><a name="lookup_smile_str"></a></p>
<h3>lookup_smile_str.py</h3>
<p>Retrieves the corresponding ZINC_IDs for a given SMILE string<br>
from the online ZINC database.
</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 lookup_smile_str.py SMILE_str</code>
<br><br></p>
<p><strong>Example (retrieve data from ZINC):</strong><br/>
<code>[shell]>> python3 lookup_smile_str.py "C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O"</code>
<br><br></p>
<p><strong>Output example:</strong></p>
<pre>
ZINC01234567
ZINC01234568
ZINC01242053
ZINC01242055</pre>
<p><br>
<br></p>
<p><a name="csv_scripts"></a></p>
<h1>CSV file command line scripts</h1>
<p>If you downloaded the smilite package from <a href="https://pypi.python.org/pypi/smilite">https://pypi.python.org/pypi/smilite</a> or <a href="https://github.com/rasbt/smilite">https://github.com/rasbt/smilite</a>, you can use the command line scripts I provide in the <code>scripts/csv_scripts</code> dir.</p>
<p><br>
<br></p>
<p><a name="gen_zincid"></a></p>
<h3>gen_zincid_smile_csv.py (downloading SMILES)</h3>
<p>Generates a ZINC_ID,SMILE_STR csv file from a input file of
ZINC IDs. The input file should consist of 1 columns with 1 ZINC ID per row.</p>
<p><strong>Usage:</strong> <br/>
<code>[shell]>> python3 gen_zincid_smile_csv.py in.csv out.csv</code></p>
<p><strong>Example:</strong> <br/>
<code>[shell]>> python3 gen_zincid_smile_csv.py ../examples/zinc_ids.csv ../examples/zid_smiles.csv</code></p>
<p><strong>Screen Output:</strong></p>
<pre>
Downloading SMILES
0% 100%
[########## ] | ETA[sec]: 106.525 </pre>
<p><br>
<strong>Input example file format:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/zinc_ids.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/zinc_ids.csv">zinc_ids.csv</a></p>
<p><br></p>
<p><strong>Output example file format:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/zid_smiles.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/zid_smiles.csv">zid_smiles.csv</a></p>
<p><br>
<br></p>
<p><a name="comp_smile"></a></p>
<h3>comp_smile_strings.py (checking for duplicates within 1 file)</h3>
<p>Compares SMILE strings within a 2 column CSV file (ZINC_ID,SMILE_string) to identify duplicates. Generates a new CSV file with ZINC IDs of identified
duplicates listed in a 3rd-nth column(s).</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 comp_smile_strings.py in.csv out.csv [simplify]</code></p>
<p><strong>Example 1:</strong><br/>
<code>[shell]>> python3 gen_zincid_smile_csv.py ../examples/zinc_ids.csv ../examples/zid_smiles.csv</code></p>
<p><br></p>
<p><strong>Input example file format:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/zid_smiles.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/zid_smiles.csv">zid_smiles.csv</a></p>
<p><br></p>
<p><strong>Output example file format 1:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/comp_smiles.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/comp_smiles.csv">comp_smiles.csv</a></p>
<p><br></p>
<p>Where<br/>
- 1st column: ZINC ID<br/>
- 2nd column: SMILE string<br/>
- 3rd column: number of duplicates<br/>
- 4th-nth column: ZINC IDs of duplicates</p>
<p><br></p>
<p><strong>Example 2:</strong><br/>
<code>[shell]>> python3 comp_smile_strings.py ../examples/zid_smiles.csv ../examples/comp_simple_smiles.csv simplify</code></p>
<p><br></p>
<p><strong>Output example file format 2:</strong>
<img src="https://raw.github.com/rasbt/smilite/master/images/comp_simple_smiles.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/comp_simple_smiles.csv">comp_simple_smiles.csv</a></p>
<p><br>
<br></p>
<p><a name="comp_2_smile"></a></p>
<h3>comp_2_smile_files.py (checking for duplicates across 2 files)</h3>
<p>Compares SMILE strings between 2 input CSV files, where each file consists of rows with 2 columns ZINC_ID,SMILE_string to identify duplicate SMILE string across both files.<br/>
Generates a new CSV file with ZINC IDs of identified duplicates listed in a 3rd-nth column(s).</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 comp_2_smile_files.py in1.csv in2.csv out.csv [simplify]</code></p>
<p><strong>Example:</strong><br/>
<code>[shell]>> python3 comp_2_smile_files.py ../examples/zid_smiles2.csv ../examples/zid_smiles3.csv ../examples/comp_2_files.csv</code></p>
<p><br></p>
<p><strong>Input example file 1:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/zid_smiles2.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/zid_smiles2.csv">zid_smiles2.csv</a></p>
<p><br></p>
<p><strong>Input example file 2:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/zid_smiles3.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/zid_smiles3.csv">zid_smiles3.csv</a></p>
<p><br></p>
<p><strong>Output example file format:</strong> <br/>
<img src="https://raw.github.com/rasbt/smilite/master/images/comp_2_files.png" alt="" /><br/>
<a href="https://raw.github.com/rasbt/smilite/master/examples/comp_2_files.csv">comp_2_files.csv</a></p>
<p><br></p>
<p>Where:<br/>
- 1st column: name of the origin file<br/>
- 2nd column: ZINC ID<br/>
- 3rd column: SMILE string<br/>
- 4th-nth column: ZINC IDs of duplicates</p>
<p><br>
<br></p>
<p><a name="sqlite_scripts"></a></p>
<h1>SQLite file command line scripts</h1>
<p>If you downloaded the smilite package from <a href="https://pypi.python.org/pypi/smilite">https://pypi.python.org/pypi/smilite</a> or <a href="https://github.com/rasbt/smilite">https://github.com/rasbt/smilite</a>, you can use the command line scripts I provide in the <code>scripts/sqlite_scripts</code> dir.</p>
<p><br>
<br></p>
<p><a name="lookup1id"></a></p>
<h3>lookup_single_id.py</h3>
<p>Retrieves the SMILE string and simplified SMILE string for a given ZINC ID<br/>
from a previously built smilite SQLite database or from the online ZINC database.</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 lookup_single_id.py ZINC_ID [sqlite_file]</code>
<br><br></p>
<p><strong>Example1 (retrieve data from a smilite SQLite database):</strong><br/>
<code>[shell]>> python3 lookup_single_id.py ZINC01234567 ~/Desktop/smilite_db.sqlite</code>
<br><br></p>
<p><strong>Example2 (retrieve data from the ZINC online database):</strong><br/>
<code>[shell]>> python3 lookup_single_id.py ZINC01234567</code>
<br><br></p>
<p><strong>Output example:</strong></p>
<pre>
ZINC01234567
C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O
CC1CCCCN1CCCC(C2CCCCC2)(C3CCCCC3)O
</pre>
<p>Where<br/>
- 1st row: ZINC ID <br/>
- 2nd row: SMILE string <br/>
- 3rd row: simplified SMILE string</p>
<p><br>
<br></p>
<p><a name="lookupsmile"></a></p>
<h3>lookup_smile.py</h3>
<p>Retrieves the ZINC ID(s) for a given SMILE sting or simplified SMILE string
from a previously built smilite SQLite database.</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 lookup_smile.py sqlite_file SMILE_STRING [simplify]</code>
<br><br></p>
<p><strong>Example1 (search for SMILE string):</strong><br/>
<code>[shell]>> python3 lookup_smile.py ~/Desktop/smilite.sqlite "C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O"</code>
<br><br></p>
<p><strong>Example2 (search for simplified SMILE string):</strong><br/>
<code>[shell]>> python3 lookup_smile.py ~/Desktop/smilite.sqlite "CC1CCCCN1CCCC(C2CCCCC2)(C3CCCCC3)O" simple</code>
<br><br></p>
<p><strong>Output example:</strong></p>
<pre>
ZINC01234567
C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O
CC1CCCCN1CCCC(C2CCCCC2)(C3CCCCC3)O
</pre>
<p>Where<br/>
- 1st row: ZINC ID <br/>
- 2nd row: SMILE string <br/>
- 3rd row: simplified SMILE string</p>
<p><br>
<br></p>
<p><a name="add_to_sqlite"></a></p>
<h3>add_to_sqlite.py</h3>
<p>Reads ZINC IDs from a CSV file and looks up SMILE strings and simplified SMILE strings
from the ZINC online database. Writes those SMILE strings to a smilite SQLite database.
A new database will be created if it doesn't exist, yet.</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 add_to_sqlite.py sqlite_file csv_file</code>
<br><br></p>
<p><strong>Example:</strong><br/>
<code>[shell]>> python3 add_to_sqlite.py ~/Desktop/smilite.sqlite ~/Desktop/zinc_ids.csv</code>
<br><br></p>
<p><strong>Input CSV file example format:</strong></p>
<pre>
ZINC01234567
ZINC01234568
...
</pre>
<p><br><br>
An example of the smilite SQLite database contents after successful insertion is shown in the image below.
<img src="https://raw.github.com/rasbt/smilite/master/images/add_to_sqlite_1.png" alt="https://raw.github.com/rasbt/smilite/master/images/add_to_sqlite_1.png" /></p>
<p><br>
<br></p>
<p><a name="sqlite_to_csv"></a></p>
<h3>sqlite_to_csv.py</h3>
<p>Writes contents of an SQLite smilite database to a CSV file.</p>
<p><strong>Usage:</strong><br/>
<code>[shell]>> python3 sqlite_to_csv.py sqlite_file csv_file</code>
<br><br></p>
<p><strong>Example:</strong><br/>
<code>[shell]>> python3 sqlite_to_csv.py ~/Desktop/smilite.sqlite ~/Desktop/zinc_smiles.csv</code>
<br><br></p>
<p><strong>Input CSV file example format:</strong></p>
<pre>
ZINC_ID,SMILE,SIMPLE_SMILE
ZINC01234568,C[C@@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O,CC1CCCCN1CCCC(C2CCCCC2)(C3CCCCC3)O
ZINC01234567,C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O,CC1CCCCN1CCCC(C2CCCCC2)(C3CCCCC3)O
</pre>
<p><br><br>
An example of the CSV file contents opened in an spreadsheet program is shown in the image below.
<img src="https://raw.github.com/rasbt/smilite/master/images/sqlite_to_csv_2.png" alt="https://raw.github.com/rasbt/smilite/master/images/sqlite_to_csv_2.png" /></p>
<p><br>
<br></p>
<p><a name="documentation"></a></p>
<h1>Documentation</h1>
<p>After you installed the smilite module, you can import it in Python via <code>import smilite</code>.
The current functions include:</p>
<p><br>
<br></p>
<p><a name="general_func"></a></p>
<h3>General functions</h3>
<p><br></p>
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">def</span> <span style="color: #0066BB; font-weight: bold">get_zinc_smile</span>(zinc_id):
<span style="color: #DD4422">"""</span>
<span style="color: #DD4422"> Gets the corresponding SMILE string for a ZINC ID query from</span>
<span style="color: #DD4422"> the ZINC online database. Requires an internet connection.</span>
<span style="color: #DD4422"> Keyword arguments:</span>
<span style="color: #DD4422"> zinc_id (str): A valid ZINC ID, e.g. 'ZINC00029323'</span>
<span style="color: #DD4422"> Returns the SMILE string for the corresponding ZINC ID.</span>
<span style="color: #DD4422"> E.g., 'COc1cccc(c1)NC(=O)c2cccnc2'</span>
<span style="color: #DD4422"> """</span>
</pre></div>
<p><br></p>
<!-- HTML generated using hilite.me -->
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">def</span> <span style="color: #0066BB; font-weight: bold">get_zincid_from_smile</span>(smile_str):
<span style="color: #DD4422">"""</span>
<span style="color: #DD4422"> Gets the corresponding ZINC ID(s) for a SMILE string query from</span>
<span style="color: #DD4422"> the ZINC online database. Requires an internet connection.</span>
<span style="color: #DD4422"> Keyword arguments:</span>
<span style="color: #DD4422"> smile_str (str): A valid SMILE string, e.g. 'C[C@H]1CCCC[NH+]1CC#CC(c2ccccc2)(c3ccccc3)O' </span>
<span style="color: #DD4422"> Returns the SMILE string for the corresponding ZINC ID(s) in a list.</span>
<span style="color: #DD4422"> E.g., ['ZINC01234567', 'ZINC01234568', 'ZINC01242053', 'ZINC01242055']</span>
<span style="color: #DD4422"> """</span>
</pre></div>
<p><br></p>
<div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">def</span> <span style="color: #0066BB; font-weight: bold">simplify_smile</span>(smile_str):