{# COMPOUNDS #}

{{ 'Compounds'|trans }} ({{ Entity.entityData.compounds|length }})

{% if Entity.entityData.compounds %} {% macro fpList(key, label, value) %}
  • {% endmacro %} {% macro compoundPicto(compound) %} {% set hazards = { 'is_corrosive': {'code': '05', 'alt': 'Corrosive'}, 'is_serious_health_hazard': {'code': '08', 'alt': 'Serious Health Hazard'}, 'is_explosive': {'code': '01', 'alt': 'Explosive'}, 'is_flammable': {'code': '02', 'alt': 'Flammable'}, 'is_gas_under_pressure': {'code': '04', 'alt': 'Gas under pressure'}, 'is_hazardous2env': {'code': '09', 'alt': 'Hazardous to environment'}, 'is_hazardous2health': {'code': '07', 'alt': 'Hazardous to health'}, 'is_oxidising': {'code': '03', 'alt': 'Oxidising'}, 'is_toxic': {'code': '06', 'alt': 'Toxic'} } %} {% for property, data in hazards %} {% if attribute(compound, property) %} {{ data.alt }} {% endif %} {% endfor %} {% set hazards2 = { 'is_radioactive': {'icon': 'radiation', 'alt': 'Radioactive'}, 'is_antibiotic_precursor': {'icon': 'bacterium', 'alt': 'Antibiotic precursor'}, 'is_drug_precursor': {'icon': 'pills', 'alt': 'Drug precursor'}, 'is_explosive_precursor': {'icon': 'explosion', 'alt': 'Explosive precursor'}, 'is_cmr': {'icon': 'skull-crossbones', 'alt': 'Carcinogenic, mutagenic and reprotoxic'}, 'is_controlled': {'icon': 'shield', 'alt': 'Controlled substance'}, 'is_nano': {'icon': 'atom', 'alt': 'Nanomaterial'}, } %} {% for property, data in hazards2 %} {% if attribute(compound, property) %} {# wrapped in a to allow the tooltip to appear on hover #} {% endif %} {% endfor %} {% endmacro %} {% for fp in Entity.entityData.compounds %}
    {{ fp.name|default('Name unset'|trans) }} {{ _self.compoundPicto(fp) }}
      {{ _self.fpList('cas' ~ fp.id, 'CAS', fp.cas_number) }} {{ _self.fpList('iupac_name_' ~ fp.id, 'IUPAC Name', fp.iupac_name) }} {{ _self.fpList('inchi_' ~ fp.id, 'InChI', fp.inchi) }} {{ _self.fpList('inchi_key' ~ fp.id, 'InChIKey', fp.inchi_key) }} {{ _self.fpList('smiles' ~ fp.id, 'SMILES', fp.smiles) }} {{ _self.fpList('molecular_formula' ~ fp.id, 'Molecular formula'|trans, fp.molecular_formula) }}
    • {% if fp.smiles %} {{ 'Search similar compounds'|trans }} {% endif %} {{ 'View in JSON'|trans }} {% if fp.pubchem_cid %} {{ 'View on PubChem'|trans }} {% endif %}
    {% endfor %} {% endif %}
    {# ADD COMPOUND LINK #}