compound_l_item.html 5.3 KB
Newer Older
1
2
{% load customtags %}

3
<div class="row m-2 border border-info bg-light border_card" style="box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2);">
4
  {%if show_detail != True %}
5
6
7
8
9
10
11
12
13
14
15
  <div class="col-sm-3 border-info justify-content-center align-content-center {% if compound.replaced_with or compound.is_validated is False %}bg_warning{% endif %}">
    <div class="row">
      <a style="overflow: hidden;" href="/compounds/{{ compound.id }}">{% include "compound_smiles_draw.html" with id=compound.id smile=compound.canonical_smile %}</a>
      <h2 class="position-absolute" style="top:0.3em; left:0.3em;"><span class="badge badge-light"><a href="/compounds/{{ compound.id }}">{{ compound.id }}</a></span>{% if compound.replaced_with is not None %}
        <span style="font-size: 26px; color:#fa8005; font-size: 75%;">replaced with <a href="/compounds/{{ compound.replaced_with.id }}">{{ compound.replaced_with.id }}</a></span>{% elif compound.is_validated is False %}<span
            style="font-size: 26px; color:#fa8005;">not validated</span>{% endif %}</h2>
      {% if compound.tanimoto != None %}
      <h2 class="position-absolute" style="top:0.3em; right:0.3em;" title="tanimoto similarity value"><span class="badge badge-light text-warning">{{ compound.tanimoto }}</span></h2>
      {% endif %}
    </div>
    <h4 class="pt-2 compound_list_title">Chemistry rules</h4>
16
    <div class="row m-1">
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
      <table class="table table-sm col-sm-12 col-md-6 card_border m-1" style="text-align: center;">
        <thead>
          <tr>
            <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>
            <td>{% rule_status_icon compound.lipinsky "Lipinski's RO5" %}</td>
            <td>{% rule_status_icon compound.veber "Veber" %}</td>
            <td>{% rule_status_icon compound.pfizer "Pfizer" %}</td>
          </tr>
        </tbody>
      </table>
    </div>
Hervé  MENAGER's avatar
Hervé MENAGER committed
34
  </div>
35
36
  {% endif %}
  <div class="{%if show_detail != True %}col-sm-9{% else %}col-sm-12{% endif %}">
37
    <h4 class="pt-2 compound_list_title">Identifiers</h4>
Hervé  MENAGER's avatar
Hervé MENAGER committed
38
    <ul class="list-group">
39
40
41
      {% if compound.common_name %}
      <li class="list-group-item">Common name: {{ compound.common_name }}</li>
      {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
42
      {% if compound.canonical_smile %}
43
      <li class="list-group-item">Canonical SMILES: <pre style="overflow: scroll;">{{ compound.canonical_smile }}</pre></li>
Hervé  MENAGER's avatar
Hervé MENAGER committed
44
45
      {% endif %}
      {% if compound.iupac_name %}
46
      <li class="list-group-item">IUPAC name: <pre style="overflow: scroll;">{{ compound.iupac_name }}</pre></li>
Hervé  MENAGER's avatar
Hervé MENAGER committed
47
      {% endif %}
48
      {% if compound.inchi %}
49
      <li class="list-group-item">InChi: <pre style="overflow: scroll;">{{ compound.inchi }}</pre></li>
50
51
      {% endif %}
      {% if compound.inchikey %}
52
      <li class="list-group-item">InChiKey: <pre style="overflow: scroll;">{{ compound.inchikey }}</pre></li>
53
      {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
54
    </ul>
55
    {%if compound.pubchem_id or compound.chembl_id or compound.chemspider_id or compound.ligand_id %}
56
    <h4 class="pt-2 compound_list_title">External links</h4>
57
    {% include "compound_db_links.html" %}
58
    {% endif %}
59
    {%if show_detail == True and compound.inchikey %}
60
    <h4 class="pt-2 compound_list_title">External search</h4>
61
62
    {% include "compound_dbsearch_links.html" %}
    {% endif %}
63
    {% if compound.biblio_refs %}
64
    <h4 class="pt-2 compound_list_title">Bibliography ({{compound.biblio_refs.count}})</h4>
65
    <table class="table m-1 card_border">
66
      <thead>
67
        <tr class="table-row">
68
69
70
71
72
73
          <th scope="col">Publication</th>
          <th scope="col" title="Compound name in publication">Name</th>
        </tr>
      </thead>
      <tbody>
        {% for biblio_ref in compound.biblio_refs %}
74
        <tr class="table-row">
75
76
77
78
79
80
          <td scope="col">{% include "biblio_citation.html" with bibliography=biblio_ref.bibliography%}</td>
          <td scope="col">{{ biblio_ref.compound_name }}</td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
81
82
83
    <h4 class="pt-2 compound_list_title">Pharmacological data</h4>
    {% include "compound_test_counts.html" with compound=compound show_bibrefs=False %}
    <h4 class="pt-2 compound_list_title">Targets</h4>
84
    <table class="table m-1 card_border">
85
      <thead>
86
        <tr class="table-row">
87
88
89
90
91
92
93
94
          <th scope="col">PPI family</th>
          <th scope="col">Best activity</th>
          <th scope="col">Diseases</th>
          <th scope="col" title="Molecular Mechanism of Action">MMoA</th>
        </tr>
      </thead>
      <tbody>
        {% for row in compound.get_target_activities_table %}
95
        <tr class="table-row">
96
          <td scope="col">{{ row.family.name }}</td>
97
          <td scope="col">{{ row.best_activity|floatformat:2 }}</td>
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
          <td scope="col">
            {% for disease in row.diseases %}
            {{ disease.name }}
            {% if not forloop.last %}, {% endif %}
            {% endfor %}
          </td>
          <td scope="col">
            {% for modulation_type in row.modulation_types %}
            {{ modulation_type }}
            {% if not forloop.last %}, {% endif %}
            {% endfor %}
          </td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
114
    {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
115
116
  </div>
</div>