{% include "core/basic_elements/label.html" %} {% if molecule is None %} {% if many_molecules %} {% alert theme="danger" message="This section assumes all individual components are their own molecule, which means it will incorrectly split up salts and make things like Na+ or Cl- their own entries. Until this is fixed, avoid using the create_many form for such compounds." %} {% endif %} {% if allow_custom_input %} {# Custom Text input #}
{% htmx_text_input name=custom_input_name show_label=show_option_labels label=custom_input_label placeholder=custom_input_placeholder %}
{% endif %} {% if allow_reference_input %} {# Reference Text input (e.g. searching by ID or CAS number) #}
{% htmx_text_input name=reference_input_name show_label=show_option_labels label=reference_input_label placeholder=reference_input_placeholder %}
{% endif %} {% if allow_text_input %} {# Text-based input for smiles/sdf/ichi/etc... #}
{% htmx_text_area name=text_input_name show_label=show_option_labels label=text_input_label placeholder="Paste in SMILES, INCHI, MOL text, or any other supported format." %}
{% endif %} {% if allow_sketcher_input %} {# Molecule Sketcher (ChemDraw.js or Ketcher.js) #}
{% if show_option_labels %}{% endif %}
{% endif %} {% if load_button %}
{% if many_molecules %} {% htmx_button method_name="load_many_molecules" label="Load Molecules" input_name=name icon="upload" %} {% else %} {% htmx_button method_name="load_molecule" label="Load Molecule" input_name=name icon="upload" %} {% endif %}
{% endif %} {% elif molecule == False %} {% alert theme="danger" message="Failed to load the Molecule. This typically happens due invalid chemistry, such as missing formal charges. Contact our team with your molecule so that we can help troubleshoot and prevent errors like this in the future." %}
Refresh the page to restart the form
{% else %} {% if many_molecules %} {% alert theme="success" message="Molecules successfully loaded! Refresh this page if you wish to restart." %} {% else %} {% alert theme="success" message="Molecule successfully loaded! Refresh this page if you wish to restart." %} {# canvas #}
{% if molecule_matches %}
{% endif %} {% endif %} {# TODO: button name="unset_molecule" theme="secondary" icon="refresh" #} {% endif %}