JME Molecular Editor

Description of the Public Functions


Following public functions may be accessed by other applets or the JavaScript code on the HTML page (see also JavaScript in examples jme_ex1.html, jme_ex2.html, and jme_ex3.html).

public String JME.smiles()

returns a SMILES string of the current molecule(s) or reaction. For single molecule without stereochemistry the SMILES is unique, unification is not yet implemented for molecules with stereochemistry and for reactions.

public String JME.nonisomericSmiles()

returns unique SMILES without stereochemistry features.

public String JME.jmeFile()

returns JME file (i.e. simple topological information) of the current molecule(s) or reaction as a String (for description of the JME format see below).

public void JME.readMolecule(String molecule)

reads molecule(s) or reaction in JME format into the editor.
the format of the JME String is as follows
natoms nbonds (atomic_symbol x_coord y_coord) for all atoms (atom1 atom2 bond_order) for all bonds
(for stereo bonds the bond order is -1 for up and -2 for down from the first to the second atom)
JME tries to guess valence model (number of hydrogens) on the atom, you can force your model by enclosing the atom symbol in square brackets (i.e. [NH2+])
(see also jme_ex1 example for the interactive generation of JME strings).
Molecules in multipart system are separated by the | character. Components of the reaction are separated by the > character. The JME string for the reaction is thus "reactant1 | reactant 2 ... > modulator(s) > product(s)"

public void JME.readMolFile(String molFile)

reads molecule or reaction in the MDL mol file or rxn file into the editor. The mol/rxn file must be encoded into a single String parameter. Therefore it is necessary to mark the line separations by the | characters. See also description of this issue in the installation instructions and example 3.

public String JME.molFile(void)

returns MDL mol file of created molecule or rxn file of reaction. Conversion of query features into mol file is not yet implemented.

public void JME.reset()

clears the drawing canvas (deletes all molecules)

public void JME.options(String)

enables to change applet parameters dynamically from JavaScript. Recognized keywords are :
xbutton, noxbutton - show / hide the X button (even when not visible the X button functionality is accessible through the X and H key shortcuts
rbutton, norbutton - show / hide the R button (to mark connection of substituent with the main scaffold)
hydrogens, nohydrogens - display / hide hydrogens (option "nohydrogens" should be used when generating substructure queries)
query, noquery - enable / disable query features
autoez, noautoez - automatic generation of SMILES with E,Z stereochemistry
hidehs - remove drawn explicit hydrogens when generating SMILES
nocanonize - SMILES canonicalization and detection of aromaticity supressed
nostereo - stereochemistry not considered when creating SMILES
reaction, noreaction - enable / disable reaction input
multipart - possibility to enter multipart structures (the "NEW" button in JME appears)
polarnitro - prevent automatic conversion of nitro (and similar) groups into nonpolar form
number - possibility to number (mark) atoms (the "123" button in JME appears)
depict - the applet will appear without editing butons, this is used for structure display
border (used together with the depict option) - displays a border around depicted molecule

See also description of the applet's param tag.