compound_card.html 28.5 KB
Newer Older
1
{% extends "base.html" %}
2
{% load customtags %}
3

4
5
6
7
8
{% block extra_js %}
<script src="/static/chartjs/Chart.bundle.js"></script>
<script src="/static/js/ippidb-charts.js" type="text/javascript"></script>
{% endblock %}

9
10
{% block title %}compound {{ compound.id }} detail{% if compound.common_name %}
({{compound.common_name}}){% endif %}{% endblock %}
11
12

{% block content %}
13
14
15
16
17
18
19
20
21
22
23
24
25
<div id="mainnav">
  <nav class="secondary-nav">
    <div class="inner-wrap nav flex-column nav-pills" style="display: inline;" id="tab" role="tablist">
      <a class="second_nav active" id="compound-tab" data-toggle="pill" href="#compound" role="tab"
        aria-controls="compound" aria-expanded="true">Compound</a>
      <a class="second_nav " id="physicochemistry-tab" data-toggle="pill" href="#physicochemistry" role="tab"
        aria-controls="physicochemistry" aria-expanded="true">Physicochemistry</a>
      <a class="second_nav " id="pharmacology-tab" data-toggle="pill" href="#pharmacology" role="tab"
        aria-controls="pharmacology" aria-expanded="true">Pharmacology</a>
      <a class="second_nav " id="drugsimilarity-tab" data-toggle="pill" href="#drugsimilarity" role="tab"
        aria-controls="drugsimilarity" aria-expanded="true">Drug similarity</a>
    </div>
  </nav>
26
</div>
27
28
29
30
31
32
<div class="inner-wrap">
  <nav class="breadcrumb breadNav" role="navigation">
    <div class="breadNav-label">You are here</div>
    <div aria-labelledby="breadNav-label">
      {% block breadcrumb %} <a href="/compounds/" class="breadNav-link">Query compounds</a> > Compound
      {{ compound.id }}{% endblock %}
33
    </div>
34
  </nav>
35
  <div class="container-fluid inner-wrap compound_header_title" id="compound_header_title">
36
    <div class="row {% if compound.is_validated is False %}bg_warning{% endif %}">
37
      {% include "compound_smiles_draw.html" with id=compound.id smile=compound.canonical_smile width=250 height=250%}
38
      <div style="display: flex;
39
      align-items: center;">
40
41
42
        {% if compound.replaced_with is not None %}
        <h1 class="page-title-warning" style="margin: 0;">Compound {{ compound.id }} - This compound is replaced with <a href="/compounds/{{ compound.replaced_with.id }}">compound {{ compound.replaced_with.id }}</a> </h1>
        {% elif compound.is_validated is False %}
43
44
        <h1 class="page-title-warning" style="margin: 0;">Compound {{ compound.id }} - This compound has not been
          validated by a curator yet, data might be incomplete or
45
          inaccurate</h1>
46
47
        {% else %}
        <h1 class="page-title" style="margin: 0;">Compound {{ compound.id }}</h1>
48
49
        {% endif %}
      </div>
50
    </div>
51
52
53
54
  </div>
  <div class="top">

  </div>
55
  <div class="row" style="display: inline-block;height:auto; margin-right: 15px; margin-left: 15px;">
56
57
58
59
60
    <div class="tab-content" id="tabContent">
      <div class="tab-pane fade show active" id="compound" role="tabpanel" aria-labelledby="compound-tab">
        <div class="card">
          <div class="card-body">
            {% include "compound_l_item.html" with compound=compound show_detail=True %}
61
          </div>
62
        </div>
63
64
65
66
      </div>
      <div class="tab-pane fade" id="physicochemistry" role="tabpanel" aria-labelledby="physicochemistry-tab">
        <div class="row d-flex justify-content-center">
          <div class="col-sm-12 col-md-9" style="margin: 10px;">
67
68
            <h5 class="card_title">Physicochemical filters <span class="info_point"
                onclick="showLegend('show_legend_physico')"><i class="fas fa-info-circle"></i></span>
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
            </h5>
            <div id="show_legend_physico" style="display: none; padding:8px;">
              <div class="row d-flex justify-content-center" style="    box-shadow: 0 3px 11px 0 rgba(0, 0, 0, 0.2);
              padding-top: 9px;">
                <div class="col-4">
                  <div style="border: 1px solid #f2f2f2;">
                    <div style=" background-color: #f2f2f2;text-align: center; font-family:'BrandonGrotesqueBld';">
                      Caption
                    </div>
                    <div style="padding: 5px;">
                      <p>For each descriptor:</p>
                      <p><i class="fas fa-square" style="color:#c3e6cb;"></i> Rule violation</p>
                      <p><i class="fas fa-square" style="color:#f5c6cb;"></i> Rule violation</p>
                      <p><i class="far fa-square" style="color:#b6bfc7;"></i> Not in the rule</p>
                    </div>
                  </div>
                </div>
                <div class="col-8">
                  <table class="table table-striped legend_table">
                    <thead>
                      <tr>
                        <th>Descriptor</th>
                        <th>Lipinski's RO5</th>
                        <th>Veber</th>
                        <th>Pfizer's 3/75</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>MW</td>
                        <td>≤ 500 g/mol</td>
                        <td>-</td>
                        <td>-</td>
                      </tr>
                      <tr>
                        <td>AlogP</td>
                        <td>≤ 5</td>
                        <td>-</td>
                        <td>≤ 3</td>
                      </tr>
                      <tr>
                        <td>HBA</td>
                        <td>≤ 10</td>
                        <td>-</td>
                        <td>-</td>
                      </tr>
                      <tr>
                        <td>HBD</td>
                        <td>≤ 5</td>
                        <td>-</td>
                        <td>-</td>
                      </tr>

                      <tr>
                        <td>(HBA + HBD)</td>
                        <td>-</td>
                        <td>≤ 12</td>
                        <td>-</td>
                      </tr>

                      <tr>
                        <td>TPSA</td>
                        <td>-</td>
                        <td>≤ 140 Å<sup>2</sup></td>
                        <td>≥ 75 Å<sup>2</sup></td>
                      </tr>
                      <tr>
                        <td>RB</td>
                        <td>-</td>
                        <td>≤ 10</td>
                        <td>-</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
              </div>
            </div>
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
            <div>
              <table class="table table-sm col-sm-12 col-md-6 card_border" style="text-align: center;">
                <thead>
                  <tr>
                    <th scope="col" class="card_title col_width"></th>
                    <th scope="col" class="card_title col_width">Descriptor</th>
                    <th scope="col" class="card_title col_width">Lipinski's RO5</th>
                    <th scope="col" class="card_title col_width">Veber</th>
                    <th scope="col" class="card_title col_width">Pfizer's 3/75</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <th scope="row">Compliance</th>
                    <td></td>
                    <td class="{% status_class compound.lipinsky %}" title="at least 3 criteria ok"></td>
                    <td class="{% status_class compound.veber %}" title="RB and HBA+HBD or TPSA ok"></td>
                    <td class="{% status_class compound.pfizer %}" title="AlogP and TPSA ok"></td>
                  </tr>
                  <tr>
                    <th scope="row">MW</th>
                    <td>{% if compound.molecular_weight is not None %}
                      {{ compound.molecular_weight }} g/mol
                      {% else %}
                      not available
                      {% endif %}</td>
                    <td class="text-center {% status_class compound.lipinsky_mw %}"
                      title="Molecular weight <= 500g/mol">
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
                    </td>
                    <td class="table-light"></td>
                    <td class="table-light"></td>
                  </tr>
                  <tr>
                    <th scope="row">HBA</th>
                    <td>
                      {{ compound.nb_acceptor_h | default_if_none:"not available" }}</td>
                    <td class="text-center {% status_class compound.lipinsky_hba %}" title="HBA <= 10"></td>
                    <td class="table-light"></td>
                    <td class="table-light"></td>
                  </tr>
                  <tr>
                    <th scope="row">HBD</th>
                    <td>
                      {{ compound.nb_donor_h | default_if_none:"not available" }}</td>
                    <td class="text-center {% status_class compound.lipinsky_hbd %}" title="HBD <= 5"></td>
                    <td class="table-light"></td>
                    <td class="table-light"></td>
                  </tr>
                  <tr>
                    <th scope="row">HBA + HBD</th>
                    <td>{{ compound.hba_hbd | default_if_none:"not available" }}</td>
                    <td class="table-light"></td>
                    <td class="text-center {% status_class compound.veber_hba_hbd %}" title="HBD + HBA <= 12">
200
                    </td>
201
202
203
204
205
206
                    <td class="table-light"></td>
                  </tr>
                  <tr>
                    <th scope="row">AlogP</th>
                    <td>{{ compound.a_log_p  | default_if_none:"not available" }}</td>
                    <td class="text-center {% status_class compound.lipinsky_a_log_p %}" title="AlogP <= 5">
207
                    </td>
208
209
210
211
212
213
214
215
216
                    <td class="table-light"></td>
                    <td class="text-center {% status_class compound.pfizer_a_log_p %}" title="AlogP <= 3">
                    </td>
                  </tr>
                  <tr>
                    <th scope="row">TPSA</th>
                    <td>{{ compound.tpsa | default_if_none:"not available" }}</td>
                    <td class="table-light"></td>
                    <td class="text-center {% status_class compound.veber_tpsa %}" title="TPSA <= 140">
217
                    </td>
218
                    <td class="text-center {% status_class compound.pfizer_tpsa %}" title="TPSA >= 75">
219
                  </tr>
220
                  <tr>
221
222
223
224
                    <th scope="row">RB</th>
                    <td>{{ compound.nb_rotatable_bonds | default_if_none:"not available"}}</td>
                    <td class="table-light"></td>
                    <td class="text-center {% status_class compound.veber_rb %}" title="RB <= 10">
225
                    </td>
226
227
228
229
                    <td class="table-light"></td>
                  </tr>
                </tbody>
              </table>
230
            </div>
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
          </div>
          <div class="col-sm-12 col-md-9" style="margin: 10px;">
            <h5 class="card_title">Radar chart<span class="info_point" onclick="showLegend('show_legend_radar')"> <i
                  class="fas fa-info-circle"></i></span>
            </h5>
            <div id="show_legend_radar" style="display: none; padding:8px;">
              <div class="row d-flex justify-content-center" style="    box-shadow: 0 3px 11px 0 rgba(0, 0, 0, 0.2);
              padding-top: 9px;">
                <div class="col-8">
                  <div style="border: 1px solid #f2f2f2;">
                    <div style=" background-color: #f2f2f2;text-align: center; font-family:'BrandonGrotesqueBld';">
                      Caption
                    </div>
                    <div style="padding: 5px;">
                      <p><i class="fas fa-draw-polygon" style="color:#ff6384;"></i> Descriptor's value for the
                        compound</p>
                      <p><i class="fas fa-draw-polygon" style="color:#36a2eb;"></i> Descriptor's threshold</p>
                      <p>Those thresholds correspond either to the limits of both the Lipinski's RO5 and Veber's rule,
                        or to the rule of thumb of Ritchie for the number of aromatic rings - Ar, and the mean values
                        usually observed among drugs for Fsp3 and the number of chiral centers - R/S.</p>
251
252
253
                    </div>
                  </div>
                </div>
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
                <div class="col-4">
                  <table class="table table-striped legend_table">
                    <thead>
                      <tr>
                        <th>Short name</th>
                        <th>Threshold</th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>MW</td>
                        <td>≤ 500 g/mol</td>
                      </tr>
                      <tr>
                        <td>AlogP</td>
                        <td>≤ 5</td>
                      </tr>
                      <tr>
                        <td>HBD</td>
                        <td>≤ 5</td>
                      </tr>
                      <tr>
                        <td>HBA</td>
                        <td>≤ 10</td>
                      </tr>
                      <tr>
                        <td>TPSA</td>
                        <td>≤ 140 Å<sup>2</sup></td>
                      </tr>
                      <tr>
                        <td>RB</td>
                        <td>≤ 10</td>
                      </tr>
                      <tr>
                        <td>ArRing</td>
                        <td>≤ 4</td>
                      </tr>
                      <tr>
                        <td>Fsp3</td>
                        <td>≥ 0.4</td>
                      </tr>
                      <tr>
                        <td>R/S</td>
                        <td>≥ 1</td>
                      </tr>
                    </tbody>
                  </table>
                </div>
302
              </div>
303
            </div>
304
305
306
307
308
309
310
311
312
313
314
315
            <div class="card_border">
              {% if compound.molecular_weight is not None %}
              <canvas id="radar" data-radarh="500px" data-radarw="500px"></canvas>
              <script>
                $('a.second_nav').on('shown.bs.tab', function (e) {
                  drawCompoundDescriptorRadarChart('radar', {{ compound.molecular_weight }}, {{ compound.a_log_p }}, {{ compound.nb_donor_h }}, {{ compound.nb_acceptor_h }}, {{ compound.tpsa }}, {{ compound.nb_rotatable_bonds }}, {{ compound.nb_benzene_like_rings }}, {{ compound.fsp3 }}, {{ compound.nb_chiral_centers }});          
                });
              </script>
              {% else %}
              <p class="text-secondary">Compound properties unavailable</p>
              {% endif %}
            </div>
316
          </div>
317
        </div>
318
        {% if pca_biplot_data %}
319
        <div class="row d-flex justify-content-center">
320
          <div class="col-sm-12 col-md-9">
321
322
            <h5 class="card_title">PCA : iPPI-DB chemical space</h5>
            <div class="card_border">
323

324
325
326
327
              <canvas id="pca_biplot"></canvas>
              <script>
                drawCompoundsBiplotChart('pca_biplot', prepareCompoundFamilyBiplotData({{ compound.id }}, '{{ compound.best_activity_ppi_family_name|default_if_none:"No target family identified" }}', {{ pca_biplot_data | safe }}), 'physicochemistry');
              </script>
328
            </div>
329
          </div>
330
          <div class="col-sm-12 col-md-7">
331
332
333
            <h5 class="card_title">PCA : Correlation circle</h5>
            <div class="card_border">
              <img src="data:image/png;base64,{{ pca_biplot_cc }}" style="width: 100%; height:auto" \>
334
            </div>
335
          </div>
336
        </div>
337
        {% endif %}
338
339
      </div>
      <div class="tab-pane fade" id="pharmacology" role="tabpanel" aria-labelledby="pharmacology-tab">
340
        {% if le_lle_biplot_data %}
341
342
        <div class="row d-flex justify-content-center">
          <div class="col-sm-12 col-md-9" style="margin: 10px;">
343
            <h5 class="card_title">Efficiencies: iPPI-DB biplot LE versus LLE <span class="info_point"
344
                onclick="showLegend('show_legend_LLE')"> <i class="fas fa-info-circle fa-sm"></i></span></h5>
345
346
347

            <div id="show_legend_LLE" style="display: none; padding:8px; margin-left: auto;
            margin-right: auto;">
348
              <div class="row d-flex justify-content-center" style="box-shadow: 0 3px 11px 0 rgba(0, 0, 0, 0.2);
349
            padding-top: 9px;">
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
                <div class="col-12" style="margin-bottom: 10px;">
                  <div style="border: 1px solid #f2f2f2;">
                    <div style=" background-color: #f2f2f2;text-align: center; font-family:'BrandonGrotesqueBld';">
                      Caption
                    </div>
                    <div style="padding: 5px;">
                      <ul>
                        <li>LE: Ligand Efficiency</li>
                        <img src="/static/images/Other/formLE_petit.png">
                        <li>LLE: Lipophilic Efficiency</li>
                        <img src="/static/images/Other/formLLE_petit.png">
                      </ul>
                      <p>
                        For the calculation of the efficiencies, we select a reference activity such that Ki and Kd
                        are favored over IC50 and EC50 and biochemical assays over cellular assays.
                      </p>
                    </div>
367
368
369
370
                  </div>
                </div>
              </div>
            </div>
371

372
373
374
375
376
            <div class="card_border">
              <canvas id="le_lle_biplot"></canvas>
              <script>
                drawCompoundsBiplotChart('le_lle_biplot', prepareCompoundFamilyBiplotData({{ compound.id }}, '{{ compound.best_activity_ppi_family_name|default_if_none:"No target family identified" }}', {{ le_lle_biplot_data | safe }}), 'pharmacology');
              </script>
377
            </div>
378
          </div>
379

380
        </div>
381
        {% endif %}
382
383
384
        <div class="row d-flex justify-content-center">
          <div class="col-sm-12 col-md-9" style="margin: 10px;">
            <h5 class="card_title">Summary</h5>
385
            {% include "compound_test_counts.html" with compound=compound show_bibrefs=True %}
386
          </div>
387
        </div>
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
        <div class="row d-flex justify-content-center">
          <div class="col-sm-12 col-md-12" style="margin: 10px;">
            <h5 class="card_title">Pharmacological data</h5>
            <div class="card_border">
              <table class="table table-sm col-sm-12 col-md-12">
                <thead style="text-align: center;">
                  <tr>
                    <th class="card_title" scope="col">Bibliography</th>
                    <th class="card_title" scope="col" title="Compound name in publication">Name</th>
                    <th class="card_title" scope="col">Target</th>
                    <th class="card_title" scope="col">Competition</th>
                    <th class="card_title" scope="col">Assay type</th>
                    <th class="card_title" scope="col">Assay name</th>
                    <th class="card_title" scope="col">Cell line</th>
                    <th class="card_title" scope="col">Activity type</th>
                    <th class="card_title" scope="col">Activity</th>
                  </tr>
                </thead>
                <tbody style="text-align: center;">
                  {% for car in compound.compoundactivityresult_set.all %}
                  <tr {% if car.is_best %}class="table-primary" {% endif %}>
                    <td>{% include "biblio_simplelink.html" with bibliography=car.test_activity_description.biblio %}
                    </td>
                    {% for rcb in car.test_activity_description.biblio.refcompoundbiblio_set.all  %}
                    {% if rcb.compound == compound  %}
                    <td>{{ rcb.compound_name }}</td>
                    {% endif %}
                    {% endfor %}
                    <td>{{ car.test_activity_description.protein_domain_bound_complex.name }} <br /><a
                        href="http://www.uniprot.org/uniprot/{{ car.test_activity_description.protein_domain_bound_complex.protein.uniprot_id }}"
                        target="_blank">{{ car.test_activity_description.protein_domain_bound_complex.protein.uniprot_id }}</a>
                    </td>
                    <td>{{ car.test_activity_description.protein_domain_partner_complex.name }} <br /><a
                        href="http://www.uniprot.org/uniprot/{{ car.test_activity_description.protein_domain_partner_complex.protein.uniprot_id }}"
                        target="_blank">{{ car.test_activity_description.protein_domain_partner_complex.protein.uniprot_id }}</a>
                    </td>
                    <td>{{ car.test_activity_description.get_test_type_display }}</td>
                    <td>{{ car.test_activity_description.test_name }}</td>
                    <td>{{ car.test_activity_description.cell_line.name }}</td>
                    <td>{{ car.get_activity_type_display }}</td>
                    <td>{{ car.activity|floatformat:2 }}</td>
                  </tr>
430
                  {% endfor %}
431
                </tbody>
432
              </table>
433
            </div>
434
          </div>
435
        </div>
436
        {% if compound.cytoxtest_av %}
437
438
        <div class="row d-flex justify-content-center">
          <div class="col-sm-12 col-md-12" style="margin: 10px;">
439
            <h5 class="card_title">Cytotoxicity data</h5>
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
            <div class="card_border">
              <table class="table table-sm col-sm-12 col-md-12">
                <thead style="text-align: center;">
                  <tr>
                    <th class="card_title" scope="col">Bibliography</th>
                    <th class="card_title" scope="col" title="Compound name in publication">Name</th>
                    <th class="card_title" scope="col">Assay name</th>
                    <th class="card_title" scope="col">Cell line</th>
                    <th class="card_title" scope="col">Compound concentration (μM)</th>
                    <th class="card_title" scope="col">Toxicity</th>
                  </tr>
                </thead>
                <tbody style="text-align: center;">
                  {% for ccr in compound.compoundcytotoxicityresult_set.all %}
                  <tr>
455
456
                    <td>
                      {% include "biblio_simplelink.html" with bibliography=ccr.test_cytotoxicity_description.biblio %}
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
                    </td>
                    {% for rcb in ccr.test_cytotoxicity_description.biblio.refcompoundbiblio_set.all  %}
                    {% if rcb.compound == compound  %}
                    <td>{{ rcb.compound_name }}</td>
                    {% endif %}
                    {% endfor %}
                    <td>{{ ccr.test_cytotoxicity_description.test_name }}</td>
                    <td>{{ ccr.test_cytotoxicity_description.cell_line.name }}</td>
                    <td>{{ ccr.test_cytotoxicity_description.compound_concentration }}</td>
                    <td>{{ ccr.toxicity|yesno }}</td>
                  </tr>
                  {% endfor %}
                </tbody>
              </table>
            </div>
          </div>
        </div>
474
475
476
        {% endif %}
        {% if compound.pktest_av %}
        <div class="row d-flex justify-content-center">
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
          <div class="col-sm-12 col-md-12" style="margin: 10px;">
            <h5 class="card_title">PK data</h5>
            <div class="card_border">
              <table class="table table-sm col-sm-12 col-md-12">
                <thead style="text-align: center;">
                  <tr>
                    <th class="card_title" scope="col">Bibliography</th>
                    <th class="card_title" scope="col" title="Compound name in publication">Name</th>
                    <th class="card_title" scope="col">Assay name</th>
                    <th class="card_title" scope="col">Administration mode</th>
                    <th class="card_title" scope="col">Dose (mg/kg)</th>
                    <th class="card_title" scope="col">Dose interval (hours)</th>
                    <th class="card_title" scope="col">Tolerated</th>
                    <th class="card_title" scope="col">AUC</th>
                    <th class="card_title" scope="col">Clearance</th>
                    <th class="card_title" scope="col">Cmax</th>
                    <th class="card_title" scope="col">Oral bioavailability</th>
                    <th class="card_title" scope="col">T1/2 (min)</th>
                    <th class="card_title" scope="col">Tmax (min)</th>
                    <th class="card_title" scope="col">Volume distribution (Vd)</th>
                  </tr>
                </thead>
                <tbody style="text-align: center;">
                  {% for cpr in compound.compoundpkresult_set.all %}
                  <tr>
                    <td>{% include "biblio_simplelink.html" with bibliography=cpr.test_pk_description.biblio %}
                    </td>
                    {% for rcb in cpr.test_pk_description.biblio.refcompoundbiblio_set.all  %}
                    {% if rcb.compound == compound  %}
                    <td>{{ rcb.compound_name }}</td>
                    {% endif %}
                    {% endfor %}
                    <td>{{ cpr.test_pk_description.test_name }}</td>
                    <td>{{ cpr.test_pk_description.administration_mode }}</td>
                    <td>{{ cpr.test_pk_description.dose|floatformat:2 }}</td>
                    <td>{{ cpr.test_pk_description.dose_interval }}</td>
                    <td>{{ cpr.tolerated|yesno }}</td>
                    <td>{{ cpr.auc_av|yesno }}</td>
                    <td>{{ cpr.clearance_av|yesno }}</td>
                    <td>{{ cpr.c_max_av|yesno }}</td>
                    <td>{{ cpr.oral_bioavailability }}</td>
                    <td>{{ cpr.t_demi }}</td>
                    <td>{{ cpr.t_max }}</td>
                    <td>{{ cpr.voldistribution_av|yesno }}</td>
                  </tr>
                  {% endfor %}
                </tbody>
              </table>
            </div>
          </div>
        </div>
528
        {% endif %}
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
      </div>
      <div class="tab-pane fade" id="drugsimilarity" role="tabpanel" aria-labelledby="drugsimilarity-tab">
        <table class="table table-striped" style="border:1px solid #E3E3E3;">
          <thead>
            <tr>
              <th title="Tanimoto index" class="table_title">Ta</th>
              <th class="table_title">Structure</th>
              <th class="table_title">Name</th>
              <th class="table_title">Drugbank ID</th>
            </tr>
          </thead>
          <tbody>
            {% for dbct in compound.sorted_similar_drugbank_compounds %}
            <tr>
              <td>{{ dbct.tanimoto }}</td>
              <td>
                {% include "compound_smiles_draw.html" with id=dbct.drugbank_compound.id smile=dbct.drugbank_compound.canonical_smiles %}
              </td>
              <td>{{ dbct.drugbank_compound.common_name }}</td>
              <td><a target="_blank"
                  href="https://www.drugbank.ca/drugs/{{ dbct.drugbank_compound.id }}">{{ dbct.drugbank_compound.id }}</a>
              </td>
            </tr>
            {% endfor %}
          </tbody>
        </table>
      </div>
556
    </div>
557

558
  </div>
559
</div>
560
561
562
<script id='JSON_LD' type="application/ld+json">

  {
563
"url": "{{ request.build_absolute_uri }}",
564
"inChI": "{{ compound.inchi }}",
565
"name": "{{ compound.iupac_name }}",
566
567
568
569
570
571
572
573
574
"iupacName": "{{ compound.iupac_name }}",
"molecularWeight": {{ compound.molecular_weight }},
"identifier": "{{ compound.id }}",
"inChIKey": "{{ compound.inchi }}",
"@type": "MolecularEntity",
"image": "https://www.ebi.ac.uk/chembl/api/data/image/CHEMBL3623057.svg",
"smiles": [
  "{{ compound.canonical_smile }}"
],
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
{% if compound.pubchem_id %}
"sameAs": "{{ compound.pubchem_url }}",
{% endif %}
{% if compound.chembl_id %}
"sameAs": "{{ compound.chembl_url }}",
{% endif %}
{% if compound.chemspider_id %}
"sameAs": "{{ compound.chemspider_url }}",
{% endif %}
{% if compound.ligand_id %}
"sameAs": "{{ compound.pdbligand_url }}",
{% endif %}
{% if compound.drugbank_id %}
"sameAs": "{{ compound.drugbank_url }}",
{% endif %}
590
591
592
593
"@context": "http://schema.org"
}

</script>
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
<script>
  var showTab = function (hash) {
    window.location.hash = hash;
    window.scrollTo(0, 0);
  };
  $('a.second_nav').on('shown.bs.tab', function (e) {
    showTab(e.target.hash);
    drawSmiles();
  });
  $(document).ready(function () {
    var tabHash = document.location.hash;
    if ($(tabHash).length == 0) {
      tabHash = $('.second_nav.active').attr('href');
      showTab(tabHash);
    }
    $('[href="' + tabHash + '"]').tab('show');
  });
611
612
613
614
615
616
617
618
619
  function showLegend(legend) {
    var x = document.getElementById(legend);
    console.log(x)
    if (x.style.display === "none") {
      x.style.display = "block";
    } else {
      x.style.display = "none";
    }
  }
620
621
</script>
{% endblock %}