Hi,
> So the real question is this:
>
> I have a variable that is the string form of an atom expression: "cys
> and :A", for instance. How do I get the atom expression itself in a
> variable?
>
>
>
> x = "cys and :A"
>
>
> The answer may surprise you. The key is the old Jmol DEFINE command:
>
>
> define x @x
> print {x}.size
> 36
>
Oh dear, I should have asked that, too. Instead I did:
function getSelectionFromStringOLD( seleStr ){
var sele = {};
var s = "sele = { " + seleStr + " };";
script INLINE @s;
return sele;
}
but
function getSelectionFromString( seleStr ){
define sele @seleStr;
return {sele};
}
is better.
Alex
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users