Collections:
Call getInchi() and generateInchIKey() Methods
How to generate the InChI and InChIKey with the ketcher.getInchi() and ketcher.generateInchIKey() methods?
✍: FYIcenter.com
InChI (International Chemical Identifier) and InChIKey (InChI Key) are identifiers of molecule structures, originally developed by Initially developed by the International Union of Pure and Applied Chemistry (IUPAC) and National Institute of Standards and Technology (NIST).
To generate InChI and InChIKey from the molecule structure in the Ketcher, you can use the getInchi() and generateInchIKey() methods provided by the Ketcher API as shown in below:
<html> <!-- generate-molecule-InChI-InChIKey.html Copyright (c) FYIcenter.com. --> <head> <title>Generate Molecule InChI and InChIKey</title> </head> <body> <p>Create a molecule 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();">Generate InChI and InChIKey</button></p> <p>Output:</p> <pre id=output style="background-color: #ddd;"></pre> <script> var ketcher = null; var display = document.getElementById("output"); function generate() { frm = document.getElementById("frmKetcher"); ketcher = frm.contentWindow.ketcher; display.innerHTML = ""; generateInChI(); generateInChIKey(); } function generateInChI() { let promise = ketcher.getInchi(); promise.then( function(value) { display.innerHTML = display.innerHTML+"\nInChI:\n"+value+"\n"; }, function(error) { display.innerHTML = display.innerHTML+"\nInChI:\n"+error.toString()+"\n"; } ); } function generateInChIKey() { let promise = ketcher.generateInchIKey(); promise.then( function(value) { display.innerHTML = display.innerHTML+"\nInChIKey:\n"+value+"\n"; }, function(error) { display.innerHTML = display.innerHTML+"\nInChIKey:\n"+error.toString()+"\n"; } ); } </script> </body> </html>
Open the above HTML document on your local Web server. Draw a simple molecule structure in the editor.
Click "Generate InChI and InChIKey" button, you will see that InChI and InChIKey are generated and displayed correctly.
⇒ generateImage() - Generate Image from Structure
2023-12-14, 489🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1001420 SMILES: Received at FYIcenter.com on: 2022-07-23
Molecule Summary: ID: FYI-1003639 Names: InChIKey: CBYLJZWDXSXAIE-BQYQJAHWS A-NSMILES: CCCCCC/C=C/CC...
What Is RXN file format? RXN, stands for Reaction, is a reaction file format extended from the MDL M...
Molecule Summary: ID: FYI-1001076 SMILES: CC(C)C1=NC(=NC(=C1/C=C/[ C@H](C[C@H](CC(=O)O)O)O) C2=CC=C(C=...
Molecule Summary: ID: FYI-1002782 Names: InChIKey: XNAFHPAONUQCQY-LTGZKZEYS A-NSMILES: Cc1cc(N(=O)=O...