One more followup question:

I have a move command: move 0 360 0 0 0 0 0 0 4, which does a full rotation 
around the y-axis over 4 seconds. How do I covert that to a moveto command? If 
I just move to the final coordinates, they are the same as the starting 
position, so it does not animate.

> On Apr 17, 2017, at 2:55 PM, Jeff Sims <jeffsim...@gmail.com> wrote:
> 
> Thank you, Angel.
> 
> This is very helpful. I believe it solves my problem.
> 
> After some testing, I can simplify the code by setting this one time, when 
> the applet is created:
> 
> set waitForMoveTo true
> 
> then do the following before playing any scene:
> 
> Jmol.script(jmolview1, ‘moveTo stop;’);
> Jmol.script(jmolview1, ‘!exit;’);
> 
> It doesn’t work if I chain those together, only if they are separate calls.
> 
> Then, it proceeds with 'load mol/s_dipep.pdb; script animation1.spt;’ as 
> before.
> 
> One question, when I get the coordinates for moveTo with “show moveto” in the 
> console, I end up with a longer command than in your example, for example:
> 
> moveto 1.0 { 588 -641 -493 123.42} 170.0 0.0 -10.0 {-2.996 2.3880000000000003 
> 7.308} 5.727823233459979 {0 0 0} 0 0 0 3.0 0.0 0.0;
> //compared with moveTo 2.0 {588 -641 -493 123.42} 170 0 -10;
> 
> Can I just leave out everything after the -10.0, as in your example, as I’m 
> making this conversion for all my scripts?
> 
>> On Apr 15, 2017, at 7:38 AM, Angel Herráez <angel.herr...@uah.es> wrote:
>> 
>> Hi Jeff
>> 
>> I've done a little testing.
>> It seems that the problem is in the "move" commands, that cannot be 
>> interrupted. I found about "set waitForMoveTo" and "moveTo stop", so this 
>> seems to work:
>> 
>> 1.
>> Edit you spt files to change the move commands to equivalent moveTo 
>> commands.
>> 
>> // move 0 0 0 80 0 -10 0 0 2.0
>> moveTo 2.0 {588 -641 -493 123.42} 170 0 -10;
>> 
>> //move 0 0 0 -80 0 10 0 0 2.0
>> moveTo 2.0 {588 -641 -493 123.42} 90 0 0;
>> 
>> (parameters obtained using "show moveto" in the console after manually 
>> entering the original move)
>> 
>> 
>> 2.
>> Edit the button code to add the stopping commands, like this:
>> Jmol.script(jmolview1, '!exit; set waitForMoveTo false; moveTo stop; load 
>> s_dipep.pdb; script animation2.spt;');
>> 
>> 
>> 3. 
>> You probably need to reset to "set waitForMoveTo true" somewhere, at the 
>> beginning of the scripts I think, so your moves within a script are 
>> displayed 
>> sequentially as you want.
>> 
>> 
>> 
>> 
>> ---
>> El software de antivirus Avast ha analizado este correo electrónico en busca 
>> de virus.
>> https://www.avast.com/antivirus
>> 
>> 
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Jmol-developers mailing list
>> Jmol-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-developers
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to