kekule_display.html 508 Bytes
Newer Older
Hervé  MENAGER's avatar
Hervé MENAGER committed
1
2
3
4
5
6
7
8
9
10
11
12
13
<script>
    Kekule.Indigo.enable();
    function kekule_display(smiles_id, viewer_id) {
      var smi = document.getElementById(smiles_id).value;
      var chemViewer = new Kekule.ChemWidget.Viewer(document.getElementById(viewer_id));
      chemViewer.setEnableToolbar(false)
                .setEnableDirectInteraction(false)
                .setEnableEdit(false)
                .setToolButtons([]);
      var mol = Kekule.IO.loadFormatData(smi, "smi"); 
      chemViewer.setChemObj(mol);
    }
</script>