Class InChIJS
java.lang.Object
org.jmol.inchi.InchiJmol
org.jmol.inchi.InChIJS
- All Implemented Interfaces:
InChIStructureProvider, JmolInChI
This class implements inchi-web.wasm from InChI-SwingJS, which is adapted
from https://github.com/IUPAC-InChI/InChI-Web-Demo by Bob Hanson and Josh
Charlton 2025.01.23-2025.01.24.
In the case of a Jmol model for mdel to InChI, we first generate MOL file
data.
For InChI to SMILES, we use the inchi-web.c method model_from_inchi() that we
developed with the assistance of Frank Lange.
The class originally adapted Richard Apodaca's 2020 molfile-to-inchi
LLVM-derived Web Assembly implementation of IUPAC InChI v. 1.05. see
https://depth-first.com/articles/2020/03/02/compiling-inchi-to-webassembly-part-2-from-molfile-to-inchi/
Note that this initialiation is asynchronous. One has to either use
sync inchi
or invoke a call to generate an InChI, such as:
x = {none}.find("inchi")
-
Field Summary
Fields inherited from class InchiJmol
doGetSmiles, getInchiModel, getKey, inchi, inputInChI, optionalFixedH, smilesOptions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintintintintintfrom inchi_api.h #define ISOTOPIC_SHIFT_FLAG 10000 add to isotopic mass if isotopic_mass = (isotopic mass - average atomic mass) AT_NUM isotopic_mass; 0 => non-isotopic; isotopic mass or ISOTOPIC_SHIFT_FLAG + mass - (average atomic mass)int[]intAtoms ///intBonds ///intStereo ///doublegetX()doublegetY()doublegetZ()voidsetAtom(int i) setBond(int i) setStereo0D(int i) Methods inherited from class InchiJmol
getSmiles, setParameters
-
Constructor Details
-
InChIJS
public InChIJS()
-
-
Method Details
-
getInchi
-
initializeModelForSmiles
public void initializeModelForSmiles() -
getNumAtoms
public int getNumAtoms()Atoms /// -
setAtom
-
getElementType
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
getCharge
public int getCharge() -
getImplicitH
public int getImplicitH() -
getIsotopicMass
public int getIsotopicMass()Description copied from interface:InChIStructureProviderfrom inchi_api.h #define ISOTOPIC_SHIFT_FLAG 10000 add to isotopic mass if isotopic_mass = (isotopic mass - average atomic mass) AT_NUM isotopic_mass; 0 => non-isotopic; isotopic mass or ISOTOPIC_SHIFT_FLAG + mass - (average atomic mass)- Returns:
- inchi's value of average mass
-
getNumBonds
public int getNumBonds()Bonds /// -
setBond
-
getIndexOriginAtom
public int getIndexOriginAtom() -
getIndexTargetAtom
public int getIndexTargetAtom() -
getInchiBondType
-
getNumStereo0D
public int getNumStereo0D()Stereo /// -
setStereo0D
-
getParity
-
getStereoType
-
getCenterAtom
public int getCenterAtom() -
getNeighbors
public int[] getNeighbors()
-