Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#518 show smiles not always providing Z/E isomer information

closed-invalid
Bob Hanson
Scripting (71)
5
2011-12-22
2011-12-21
Paul Pillot
No

Using scribmol, I drew but-2-ene (cis-conformation) in chemdoodle. The corresponding 3D molecule is created by Jmol.
"show smiles" gives : C/C=CC
when transfered to cactus for optimization, the resulting 3D file is in trans configuration (the 2D mol file shows a crossed double bond)
Sometimes (I can't find a reproductible scenario), when I draw the same molecule directly in Jmol, the "show smiles" gives : C(/C)=C/C which leads to a correct optimization.
In trans configuration, the results are quite similar : "show smiles" gives C(/C)=CC which leads to a crossed double bond with cactus, but provides a molecule in trans configuration (I suppose it is the default)

Discussion

  • Paul Pillot
    Paul Pillot
    2011-12-21

    My bad ! The results aren't the same via the Jmol console and via the jmolScriptWait() method : backwards slashes are stripped which explains the loss of information.

     
  • Paul Pillot
    Paul Pillot
    2011-12-21

    I solved the aforementioned problem by using the jmolScriptWaitOutput method instead of JmolScriptWaitAsArray.
    The later strips backward slashes from the script messages.

     
  • Bob Hanson
    Bob Hanson
    2011-12-22

    version of Jmol? I see no problem with Jmol 12.3 or 12.2 or 12.0

    $ load $cis-butene
    $ show smiles
    C/C=C\C
    $

    So that's right. I think what is happening is whatever you are doing with that string, you are losing the "\C" -- something is converting that to "escape C" and losing the backslash. Is this in the applet?

    From the applet you would do something like this:

    var X = jmolEvaluate("{*}.find('smiles')")

    and the return will be:

    "C/C=C\\C"

    So Jmol is properly escaping that.

     
  • Bob Hanson
    Bob Hanson
    2011-12-22

    OK. Case closed, I think. Just have to be careful with those escapes.

     
  • Bob Hanson
    Bob Hanson
    2011-12-22

    • status: open --> closed-invalid