Collections:
indigo.calculate() - Calculates Chemical Properties
How to calculate chemical properties of a given structure with the indigo.calculate() method?
✍: FYIcenter.com
If you want to calculate chemical properties like mass and weight
of a given chemical structure
you can use the indigo.calculate() method on the Ketcher Indigo interface.
Here is an HTML document that shows you how to export the chemical structure from the Ketcher editor and calculate its properties.
<html> <!-- indigo-calculate-properties.html Copyright (c) FYIcenter.com. --> <head> <title>Calculate Chemical Properties</title> </head> <body> <p>Create a chemical structure, then click generate button below the editor:</p> <iframe id=frmKetcher src="/ketcher/index.html" style="width: 680px; height: 400px;"></iframe> <p><button onclick="generate();">Calculate Chemical Properties</button></p> <p>SMILES:</p> <pre id=smiles style="background-color: #ddd;"></pre> <p>Properties:</p> <pre id=output style="background-color: #ddd;"></pre> <script> var ketcher = null; function generate() { frm = document.getElementById("frmKetcher"); ketcher = frm.contentWindow.ketcher; indigo = ketcher.indigo; promiseSmiles = ketcher.getSmiles(); promiseOutput = promiseSmiles.then(consumeSmiles, consumeSmiles); promiseOutput.then(consumeOutput, consumeOutput); } function consumeSmiles(result) { document.getElementById("smiles").innerHTML = result; return indigo.calculate(result); } function consumeOutput(result) { document.getElementById("output").innerHTML = JSON.stringify(result, undefined, 2); } </script> </body> </html>
Open the above HTML document on your local Web server. Draw a chemical reaction in the editor.
Click "Calculate Chemical Properties" button, you will see that the SMILES representation of the reaction and its chemical properties are displayed:
SMILES: C1C=CC=CC=1>>C1C=CC=CC=1 Properties: { "molecular-weight": "[78.1118417] > [78.1118417]", "most-abundant-mass": "[78.0469501] > [78.0469501]", "monoisotopic-mass": "[78.0469501] > [78.0469501]", "mass-composition": "[C 92.26 H 7.74] > [C 92.26 H 7.74]", "gross": "[C6 H6] > [C6 H6]" }
⇒ indigo.generateImageAsBase64() - Generate Image as Base64
2023-11-09, 754🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1002211 Names: InChIKey: GYQJMOSZNHFJLQ-XQTDGIQOS A-OSMILES: CC[C@@H]2CN(C...
Molecule Summary: ID: FYI-1005788 Names: InChIKey: DQJQIZXJXVRRSY-ONEGZZNKS A-NSMILES: CC/C=C/CCCCCC...
Molecule Summary: ID: FYI-1006678 Names: InChIKey: CDLSCSXOZKFNDL-UHFFFAOYS A-NSMILES: C=CC(C)(C)c3c...
Molecule Summary: ID: FYI-1000306 SMILES: COCCNC(=O)C(=O)N/N=C/c1c ccc(c1OC)OCReceived at FYIcenter....
Molecule Summary: ID: FYI-1000948 SMILES: COC(=O)C1=CC=C(OCC2=CN(N =N2)C2=CC=C(Br)C=C2)C=C1Received ...