Skip to content

Commit

Permalink
iupac name and molecule name addition on read.html
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavin2897 committed Oct 28, 2024
1 parent c32e8cd commit 548a32c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
15 changes: 12 additions & 3 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% set data_dict = {'inchi': pkg.get('inchi'), 'smiles': pkg.get('smiles'), 'inchi_key': pkg.get('inchi_key'), 'exact_mass' : pkg.get('exactmass'), 'molecular_formula': pkg.get('molecular_formula') } %}

{% set dest_url = h.url_for('rdkit_visuals.display_image', package_name = pkg.get('id'), _external=True) %}
{% set molecule_formula = h.molecule_data(package_name = pkg.get('id')) %}
{# {% set molecule_formula = h.molecule_data(package_name = pkg.get('id')) %} #}
{% set molecule_formula,exact_mass,inchi,iupac_name,molecule_name = h.get_molecule_data(package_id = package_result[0]['id']) %}
{% set alter_names = h.alternate_names(package_name = pkg.get('id')) %}}


Expand Down Expand Up @@ -55,6 +56,20 @@ <h3>{{ _('Chemical Info') }}</h3>
<table class="table">
<tbody>

{% if molecule_name %}
<tr>
<th width="25%" scope="row" class="dataset-label">{{ _("Molecule Name") }}</th>
<td width="50%" class="dataset-details">{{ molecule_name }}</td>
</tr>
{% endif %}

{% if IUpacName %}
<tr>
<th scope="row" class="dataset-label">{{ _("IUPAC Name") }}</th>
<td class="dataset-details"> {{ IUpacName }}</td>
</tr>
{% endif %}

{% if data_dict.inchi %}
<tr>
<th width="25%" scope="row" class="dataset-label">{{ _("InChI") }}</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,29 @@ <h3>{{ _('Chemical Info') }}</h3>
<table class="table">
<tbody>

{% if data_dict.inchi %}
{% if molecule_name %}
<tr>
<th width="25%" scope="row" class="dataset-label">{{ _("InChI") }}</th>
<td width="50%" class="dataset-details">{{ data_dict.inchi }}</td>
<th width="25%" scope="row" class="dataset-label">{{ _("Molecule Name") }}</th>
<td width="50%" class="dataset-details">{{ molecule_name }}</td>
</tr>
{% endif %}


{% if iupac_name %}
<tr>
<th width="25%" scope="row" class="dataset-label">{{ _("IUPAC Name") }}</th>
<td width="50%" class="dataset-details">{{ iupac_name }}</td>
</tr>
{% endif %}

{% if molecule_name %}
{% if data_dict.inchi %}
<tr>
<th width="25%" scope="row" class="dataset-label">{{ _("Molecule Name") }}</th>
<td width="50%" class="dataset-details">{{ molecule_name }}</td>
<th width="25%" scope="row" class="dataset-label">{{ _("InChI") }}</th>
<td width="50%" class="dataset-details">{{ data_dict.inchi }}</td>
</tr>
{% endif %}


{% if data_dict.smiles %}
<tr>
<th scope="row" class="dataset-label">{{ _("SMILES") }}</th>
Expand Down

0 comments on commit 548a32c

Please sign in to comment.