Hi All,

Any thoughts on the change in the way substructure searches are carried out
using .find("SMARTS", SMARTSstring), described in the previous email?
Unless I am missing something, there seems to be a big change in the
behaviour of such searches, and any help would be most welcome.

With thanks,
Mike




Dr Mike Casey
School of Chemistry
UCD
Dublin
01 716 2420

On 6 May 2016 at 18:03, Mike Casey <mike.ca...@ucd.ie> wrote:

> Thanks Bob.
>
> I was already replacing \ with \\ in the expected string, but, as you say
> a second escape is necessary.  The student-generated string comes from
> JSME, so Otis's tactic is a good solution in that case.
>
> Mike
>
>
>
> Dr Mike Casey
> School of Chemistry
> UCD
> Dublin
> 01 716 2420
>
> On 6 May 2016 at 17:55, Robert Hanson <hans...@stolaf.edu> wrote:
>
>> Ah, yes. Escaping those back-slashes may be the issue.
>>
>> $ load $2-butene
>> C4H8
>>
>> $ print {*}.find("SMILES","C/C=C/C")
>> ({0:11})
>> $ print {*}.find("SMILES","C/C=C\C")
>> ({0:11})
>> $ print {*}.find("SMILES","C/C=C\\C")
>> ({})
>>
>> So, you see, the real problem is that we are not getting an error message
>> from that second version. I will see if I can get that happening, although
>> in this particular mode, what will probably be returned is an empty atom
>> set, not a string error.
>>
>> Note that  if doing this in JavaScript,  you probably have to escape
>> TWICE:
>>
>> Jmol.evaluateVar(jmolApplet0, "{*}.find('SMILES','C/C=C\\\\C')")
>>
>> *Array [  ]*
>>
>>
>> because it has to go through two stages of conversion.
>>
>> Bob
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications
>> Manager
>> Applications Manager provides deep performance insights into multiple
>> tiers of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to