Collections:
What Is JSME JavaScript API
What is JSME JavaScript API? I want to see an example on how to use it.
✍: FYIcenter.com
JSME JavaScript API is programming interface provided by JSME for your
JavaScript code to interact with the JSME editor.
JSME JavaScript API offers the following primary methods under the "JSApplet.JSME" class, which is provided in the ./jsme/jsme.nocache.js file.
The following HTML document example, api-smiles.html, shows you how to JSME JavaScript API methods:
<html>
<head>
<title>API - Show SMILES</title>
<!-- loading JSME JavaScript library -->
<script type="text/javascript" src="/jsme/jsme.nocache.js"></script>
<script>
// running JSME in the "div" tag identified as "jsme_container"
function jsmeOnLoad() {
jsmeObj = new JSApplet.JSME("jsme_container", "380px", "340px");
}
</script>
</head>
<body>
<p>Hello, please try the JSME molecule editor below:</p>
<div id="jsme_container"></div>
<button type="button" onclick="alert(jsmeObj.smiles())">Show SMILES</button>
</body>
</html>
JSME also provides another class, JSApplet.Inchi, in the jsme/96E40B969193BD74B8A621486920E79C.cache.js file to compute InChI and InChIKey from a given SDF file using the JSApplet.Inchi.computeInchi() method.
For the complete list of JSME API method, open "./JSME_nnnn-nn-nn/api_javadoc/index.html" in a Web browser to read.
2020-05-18, 3449🔥, 0💬
Popular Posts:
Molecule Summary: ID: FYI-1000307 SMILES: c1cc(ccc1[C@@H](CNC(=O)C 2CCC2)O)ClReceived at FYIcenter.c...
How to generate the molecule structure in SDF format from a SMILES string? To help you to generate t...
Molecule Summary: ID: FYI-1000967 SMILES: O=C1CSC(=S)N1CCN(CC)CC Received at FYIcenter.com on: 2021-...
Molecule Summary: ID: FYI-1000384 SMILES: C/C(C)=C\\CC/C(C)=C/CC/C (C)=C/CCC(C)=OReceived at FYIcent...
Molecule Summary: ID: FYI-1001979 SMILES: CC(C)(COC(=O)C=C)COC(=O) C=CReceived at FYIcenter.com on: ...