Again, this won't solve the "?" problem but it may be a way of avoiding 
the issue. A simple script to change all "?" characters in atom names to 
"$" (or whatever character might be legal in CIF files and convenient in 
Jmol scripts) would be an easy solution. If you don't want to alter your 
CIF files, this could be done on the fly with a PHP script that serves a 
modified version of the CIF file specified in the URL. For example: 
http://www.mysite.com/jmol-friendly.php?file=myfile.cif could serve a 
modified copy of myfile.cif.

Just a suggestion. Hope it helps.

Cheers,
Chris.



[email protected] wrote:
> Hello,
>
> I'm sure there's a really easy way to do this but as a new Jmol scripter
> I'm struggling to see how! I need to write a Jmol script to select all
> atoms with names ending in '?'. My input file is a CIF and the presence of
> a trailing question mark in the atom name indicates a disordered atom,
> e.g. 'C33?'.
>
> The trouble is a '?' is used as a wildcard in Jmol scripting, and I cannot
> find a way of escaping it to prevent it from matching any single
> character.
>
> I have successfully written a Javascript solution that uses the following:
>
> var atomList = jmolGetPropertyAsArray("atomInfo", "all");
>
> to get a list of atom objects and then uses the 'info' field to get at the
> atom labels. However, due to some kind of race condition that I don't
> fully understand yet, the script sometimes fails as Jmol hasn't fully
> initialised when it runs so the atomInfo property is empty. This is not my
> preferred solution anyway...
>
> I'd much rather tackle this the easy way using a standard Jmol selection
> expression. Is there any way I can do this please? Sorry if it's obvious.
>
> Thanks in advance,
>
> Ian
>
>
> LEGAL NOTICE
> Unless expressly stated otherwise, information contained in this
> message is confidential. If this message is not intended for you,
> please inform [email protected] and delete the message.
> The Cambridge Crystallographic Data Centre is a company Limited
> by Guarantee and a Registered Charity.
> Registered in England No. 2155347 Registered Charity No. 800579
> Registered office 12 Union Road, Cambridge CB2 1EZ.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer Now!
> http://p.sf.net/sfu/www-ibm-com
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>   

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to