What Is Ketcher Indigo Interface

Q

What is Ketcher Indigo interface?

✍: FYIcenter.com

A

Ketcher Indigo interface is part of the Ketcher JavaScript API that allows you to use some Indigo Toolkit functionalities.

To access Ketcher Indigo interface, you need to access the "ketcher" object as a property of the content "window" object of the "iframe" where the Ketcher is loaded. Then you need to access the "indigo" object as a property of the "ketcher" object:

lst = document.getElementsByTagName("iframe");
frm = lst[0];
win = frm.contentWindow;
ketcher = win.ketcher;
indigo = ketcher.indigo;

With the "indigo" object, you can then access the following main methods provided by the Ketcher Indigo interface:

  • indigo.aromatize(str) - Aromatizes a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.automap(reaction) - Generates atom-to-atom mapping (AAM) of a given reaction. It returns a Promise object to perform the task asynchronously.
  • indigo.calculate(str) - Calculates basic chemical properties of a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.calculateCip(str) - Calculates CIP (Cahn–Ingold–Prelog) of a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.check(str) - Validates a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.clean(str) - Cleans up a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.convert(str) - Converts a given structure into Indigo Ketcher format. It returns a Promise object to perform the task asynchronously.
  • indigo.dearomatize(str) - Dearomatizes a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.generateImageAsBase64(str, opt) - Generates an image as a Base64 encoded string of a given structure. It returns a Promise object to perform the task asynchronously.
  • indigo.info() - Prints out version information of the Indigo interface. It returns a Promise object to perform the task asynchronously.
  • indigo.layout(str) - Updates the layout of a given structure. It returns a Promise object to perform the task asynchronously.

See next tutorials for examples on how to use these methods.

 

indigo.calculate() - Calculates Chemical Properties

Ketcher Indigo Interface

Ketcher Indigo Interface

⇑⇑ Ketcher - Chemical Structure Editor

2023-11-13, 334🔥, 0💬