[Jmol-users] using a for loop with select command?

2007-10-12 Thread Frieda Reichsman
Hi, Can a variable be used for a residue number in a select command? When I try: myNum = 112 select @myNum Jmol selects zero atoms (in a file where there is a residue 112). Frieda /// Frieda Reichsman Molecules in Motion Interactive Molecular Struct

Re: [Jmol-users] using a for loop with select command?

2007-10-13 Thread Bob Hanson
I know it's not terribly clear, but you can't use variables within select commands like that. Probably not worth it to explain why -- this has to do with how exactly commands are proccessed. In any case, you can construct and execute any command you like using the script() function: load =1cr

Re: [Jmol-users] using a for loop with select command?

2007-10-14 Thread Frieda Reichsman
Thanks, Bob - does the trick, and makes more tricks possible. Frieda On Oct 13, 2007, at 11:44 PM, Bob Hanson wrote: I know it's not terribly clear, but you can't use variables within select commands like that. Probably not worth it to explain why -- this has to do with how exactly commands a

Re: [Jmol-users] using a for loop with select command?

2007-10-15 Thread pim schravendijk
So many options, I'm getting confused :) Just for completeness: in which cases should one call variables via "@variable"? On 10/14/07, Frieda Reichsman <[EMAIL PROTECTED]> wrote: > Thanks, Bob - does the trick, and makes more tricks possible. > Frieda -- Greetings, Pim http://www.molmod.com

Re: [Jmol-users] using a for loop with select command?

2007-10-15 Thread Bob Hanson
The @variable business works any time you would normally have a number or string in a command OUTSIDE of an atom expression. In just about every command this means no @ in an {atomExpression} context. Since SELECT, HIDE, DISPLAY, and RESTRICT implicitly add { } around the entire set of paramete