compound_l_item.html 4.68 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
  <div class="col-sm-3 border-info d-flex justify-content-center align-content-center {% if compound.replaced_with or compound.is_validated is False %}bg_warning{% endif %}">
6
    <a style="overflow: hidden;" href="/compounds/{{ compound.id }}">{% include "compound_smiles_draw.html" with id=compound.id smile=compound.canonical_smile %}</a>
7
8
9
    <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>
10
    {% if compound.tanimoto != None %}
11
    <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>
12
    {% endif %}
13
14
15
16
17
    <h2 class="position-absolute" style="top:270px; left:0.3em;"><span class="badge badge-light">
      {% rule_status_icon compound.lipinsky "Lipinski's RO5" %}
      {% rule_status_icon compound.veber "Veber" %}
      {% rule_status_icon compound.pfizer "Pfizer" %}
    </h2>
Hervé  MENAGER's avatar
Hervé MENAGER committed
18
  </div>
19
20
  {% endif %}
  <div class="{%if show_detail != True %}col-sm-9{% else %}col-sm-12{% endif %}">
21
    <h4 class="pt-2 compound_list_title">Identifiers</h4>
Hervé  MENAGER's avatar
Hervé MENAGER committed
22
    <ul class="list-group">
23
24
25
      {% if compound.common_name %}
      <li class="list-group-item">Common name: {{ compound.common_name }}</li>
      {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
26
      {% if compound.canonical_smile %}
27
      <li class="list-group-item">Canonical SMILES: <pre style="overflow: scroll;">{{ compound.canonical_smile }}</pre></li>
Hervé  MENAGER's avatar
Hervé MENAGER committed
28
29
      {% endif %}
      {% if compound.iupac_name %}
30
      <li class="list-group-item">IUPAC name: <pre style="overflow: scroll;">{{ compound.iupac_name }}</pre></li>
Hervé  MENAGER's avatar
Hervé MENAGER committed
31
      {% endif %}
32
      {% if compound.inchi %}
33
      <li class="list-group-item">InChi: <pre style="overflow: scroll;">{{ compound.inchi }}</pre></li>
34
35
      {% endif %}
      {% if compound.inchikey %}
36
      <li class="list-group-item">InChiKey: <pre style="overflow: scroll;">{{ compound.inchikey }}</pre></li>
37
      {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
38
    </ul>
39
    {%if compound.pubchem_id or compound.chembl_id or compound.chemspider_id or compound.ligand_id %}
40
    <h4 class="pt-2 compound_list_title">External links</h4>
41
    {% include "compound_db_links.html" %}
42
    {% endif %}
43
    {%if show_detail == True and compound.inchikey %}
44
    <h4 class="pt-2 compound_list_title">External search</h4>
45
46
    {% include "compound_dbsearch_links.html" %}
    {% endif %}
47
    {% if compound.biblio_refs %}
48
    <h4 class="pt-2 compound_list_title">Bibliography ({{compound.biblio_refs.count}})</h4>
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
    <table class="table">
      <thead>
        <tr>
          <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 %}
        <tr>
          <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>
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    <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>
    <table class="table">
      <thead>
        <tr>
          <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 %}
        <tr>
          <td scope="col">{{ row.family.name }}</td>
81
          <td scope="col">{{ row.best_activity|floatformat:2 }}</td>
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
          <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>
98
    {% endif %}
Hervé  MENAGER's avatar
Hervé MENAGER committed
99
100
  </div>
</div>