Re: [Jmol-users] Script loops

2005-07-08 Thread Miguel

> I am in the process of rewriting some Chime pages to make use of Jmol. I
> have a couple of questions about the syntax of the Jmol commands.
>
>
>
> 1)   "spin" this seems to default to a rotation about the Y axis. Is
> there a way to change the rotation to the X or Z axis?

set spin x 

> 2)   Loop command: I understand this causes the entire script to
> repeat
> (after a delay). Is there a way to get only part of the script to loop?
> i.e.

No ... the loop command is compatible with the chime implementation ...
loops over entire file :-(

> I have a check box:
>
>
>
>jmolCheckbox("spin off; reset; move 0 0 120 0 0 0 0 0 1; loop
> 1;", "reset; rotate X 90;  spin on", "Animation on/off");
>
>
>
> the spin off and reset commands reorients the molecule to the
> correct position, then I want the move command to loop. Any ideas how to
> achieve this effect?

make a separate .txt file that contains your move command + loop.
Essentially this becomes a subroutine. Execute the script using the
'script' command

spin off; reset; script moveSubroutine.txt

--moveSubroutine.txt--
move 0 0 120 0 0 0 0 0 1
loop 0



Miguel



---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Script loops

2005-07-08 Thread nvervell



De: "Richard Spinney" <[EMAIL PROTECTED]>
>
>Hi Nicolas,
>
>Thanks for the info on the spin command. I tried your idea about a separate
>script:
>
>var script1 ="move 0 0 51.43 0 0 0 0 0 1; loop 1;"
>jmolCheckbox("spin off; reset; script1",
> "reset; rotate X 90;  spin on", 
> "Animation on/off");
>
>But this does not work, I get a message of "command expected : script1". Is
>it just a syntax error on my part?

You have to create a separate file the script. For example, create a text file 
name script1.txt with the content:
move 0 0 51.43 0 0 0 0 0 1; loop 1;

then in your page :
jmolCheckbox("spin off; reset; script script1.txt",
 "reset; rotate X 90;  spin on", 
 "Animation on/off");

It should work I think.

Nicolas



---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Script loops

2005-07-08 Thread nvervell



De: "Richard Spinney" <[EMAIL PROTECTED]>
>1)   "spin" this seems to default to a rotation about the Y axis. Is
>there a way to change the rotation to the X or Z axis?

spin set X 

>2)   Loop command: I understand this causes the entire script to repeat
>(after a delay). Is there a way to get only part of the script to loop? i.e.

A possible way of doing it is to put the part that will repeat in a separate 
script that is called from the main script (script 


Hope this helps
Nicolas



---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Script loops

2005-07-08 Thread Richard Spinney








I am in the process of rewriting some Chime pages to make
use of Jmol. I have a couple of questions about the syntax of the Jmol
commands.

 

1)   “spin”
this seems to default to a rotation about the Y axis. Is there a way to change
the rotation to the X or Z axis?

2)   Loop command: I understand this causes
the entire script to repeat (after a delay). Is there a way to get only part of
the script to loop? i.e. I have a check box:

 

  
jmolCheckbox("spin off; reset; move 0 0 120 0 0 0 0 0 1; loop 1;”, "reset;
rotate X 90;  spin on", "Animation on/off");

 

    the
spin off and reset commands reorients the molecule to the correct position,
then I want the move command to loop. Any ideas how to achieve this effect?

 

Thanks, Rick

 

 

Richard Spinney

Dept of Chemistry

Ohio State University

100 West 18th Ave

Columbus OH 43210

email: [EMAIL PROTECTED]

Phone: (614) 247-6847

Office: MP0008