From: Hoelzer, M. <ho...@ms...> - 2017-10-17 18:03:52
|
Afternoon Jmol friends, I have a Jmol script running in a webpage that includes a few time-based commands, such as the "delay" and "move to" commands (see example script below in green). I would like to add a button to my page that can run this script instantly. Basically, I want the script to completely finish so the final display is the same as if you let the animation play out, but want all of the time-based commands to run instantly so it completes instantly. I'm almost positive I've done this before, but cannot track down the commands I used, and "exit" or "quit" just stop the script in its tracks, rather than completing it instantly. Thanks in advance for any help! - Mark load =1a3n; restrict :b or water; spacefill only; moveto /* time, axisAngle */ 1.0 { 91 108 -990 39.69} /* zoom, translation */ 86.96 0.0 0.0 /* center, rotationRadius */ {-0.358 -1.02 9.9} 38.17618 /* navigation center, translation, depth */ {0 0 0} 0 0 0 /* cameraDepth, cameraX, cameraY */ 3.0 0.0 0.0; delay 1.0; color red; MSOE Center for BioMolecular Modeling - http://cbm.msoe.edu 3D Molecular Designs - www.3dmoleculardesigns.com<http://www.3dmoleculardesigns.com> ho...@ms... office: 414-277-4554 cell: 414-640-8668 |
From: <ang...@ua...> - 2017-10-17 19:09:05
|
Hi Mark I don't know if ther would be a command to do that. My only idea is that if the script is stored in a javascript variable you could parse it using regular expressions to replace the timing parts. On the other hand, this may do just for the delays: set delayMaximumMs 1; --- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus |
From: Hoelzer, M. <ho...@ms...> - 2017-10-17 20:57:53
|
Okay, that's what I was planning to do as a last resort - but I could have sworn I used some existing Jmol command in the past. . . maybe it was something I just made up in my mind (wouldn't be the first time!) Thanks for the input. - Mark MSOE Center for BioMolecular Modeling - http://cbm.msoe.edu 3D Molecular Designs - www.3dmoleculardesigns.com<http://www.3dmoleculardesigns.com> ho...@ms... office: 414-277-4554 cell: 414-640-8668 ________________________________ From: Angel Herráez <ang...@ua...> Sent: Tuesday, October 17, 2017 2:19 PM To: jmo...@li... Subject: Re: [Jmol-users] Immediately processing a script with delays and "move to" commands Hi Mark I don't know if ther would be a command to do that. My only idea is that if the script is stored in a javascript variable you could parse it using regular expressions to replace the timing parts. On the other hand, this may do just for the delays: set delayMaximumMs 1; --- 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-users mailing list Jmo...@li... https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Eric M. <em...@mi...> - 2017-10-17 23:00:08
|
Dear Mark, I think there are two solutions. 1. Capture the state script for the final view, and use that for your immediate gratification button. 2. There are settings that are intended for debugging a long script with delays and movetos. The idea was to speed up the script until you get to the part you are trying to debug when you need to run it over and over and over for testing. See set delayMaximumMs (which I believe can obviate all delays without recoding the individual commands). I think there is/was also a command to shorten all movetos to run instantly to their final positions but I can't find it. Maybe delayMaximumMs does both? I haven't tested it today. Bob? I don't think set waitForMoveTo is relevant. Eric On 10/17/17 1:31 PM, Hoelzer, Mark wrote: > > Afternoon Jmol friends, > > > > I have a Jmol script running in a webpage that includes a > few time-based commands, such as the "delay" and "move to" commands > (see example script below in *green*). I would like to add a button to > my page that can run this script instantly. Basically, I want the > script to completely finish so the final display is the same as if you > let the animation play out, but want all of the time-based commands to > run instantly so it completes instantly. > > > I'm almost positive I've done this before, but cannot track down the > commands I used, and "exit" or "quit" just stop the script in its > tracks, rather than completing it instantly. Thanks in advance for any > help! > > > > - Mark > > > > load =1a3n; restrict :b or water; spacefill only; moveto /* time, > axisAngle */ 1.0 { 91 108 -990 39.69} /* zoom, translation */ 86.96 > 0.0 0.0 /* center, rotationRadius */ {-0.358 -1.02 9.9} 38.17618 /* > navigation center, translation, depth */ {0 0 0} 0 0 0 /* cameraDepth, > cameraX, cameraY */ 3.0 0.0 0.0; delay 1.0; color red; > > > > > > > MSOE Center for BioMolecular Modeling - http://cbm.msoe.edu > 3D Molecular Designs - www.3dmoleculardesigns.com > <http://www.3dmoleculardesigns.com> > ho...@ms... > office: 414-277-4554 > cell: 414-640-8668 > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users |
From: Robert H. <ha...@st...> - 2017-10-18 12:19:36
|
Mark, good to hear from you! I waited to see what others would say. :) You can do that in "headless" mode, but then there also will be no display, and I suppose that only works with the Jmol application. I think what you are doing is just requesting that all moveto and delay times be set to 0. Right? If so, all nonzero timing depends upon the TRUE value of all of the following: -- This is not a scriptWait() execution -- The program is not running "headless" (Java only; also no display!) -- viewer.autoExit is false (the -x flag for Java) I just tried the first with zoomTo {*} 30, and it totally broke JSmol. Frozen in its tracks. So that's surely a bug. If I get that fixed, would it work for you to use some sort of URL-line flag to switch to that? On the other hand, if I am going to fix that, I might as well also allow a "0-time" option as well. Very easy. And maybe I've forgotten that that exists. But even if it does, I think it must be broken, because all it would do is what I did there. I'm in Cochabamba, Bolivia, a for a few more days and I can't see to get an internet connection that lasts long enough to do a 70Mb upload. So that will have to wait until Sunday night. We are talking JavaScript here, right? Bob On Tue, Oct 17, 2017 at 1:31 PM, Hoelzer, Mark <ho...@ms...> wrote: > Afternoon Jmol friends, > > > > I have a Jmol script running in a webpage that includes a few time-based > commands, such as the "delay" and "move to" commands (see example script > below in *green*). I would like to add a button to my page that can run > this script instantly. Basically, I want the script to completely finish > so the final display is the same as if you let the animation play out, > but want all of the time-based commands to run instantly so it completes > instantly. > > > I'm almost positive I've done this before, but cannot track down the > commands I used, and "exit" or "quit" just stop the script in its tracks, > rather than completing it instantly. Thanks in advance for any help! > > > > - Mark > > > > load =1a3n; restrict :b or water; spacefill only; moveto /* time, > axisAngle */ 1.0 { 91 108 -990 39.69} /* zoom, translation */ 86.96 0.0 > 0.0 /* center, rotationRadius */ {-0.358 -1.02 9.9} 38.17618 /* navigation > center, translation, depth */ {0 0 0} 0 0 0 /* cameraDepth, cameraX, > cameraY */ 3.0 0.0 0.0; delay 1.0; color red; > > > > > > > MSOE Center for BioMolecular Modeling - http://cbm.msoe.edu > 3D Molecular Designs - www.3dmoleculardesigns.com > ho...@ms... > office: 414-277-4554 <(414)%20277-4554> > cell: 414-640-8668 <(414)%20640-8668> > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Robert H. <ha...@st...> - 2017-10-19 10:08:10
|
OK, my bad. I got fooled by not noticing that I had the browser debugger running and that it had stopped because I mistakenly typed Jmol.scriptWait("zoomto {*} 30") instead of Jmol.scriptWait(jmolApplet0, "zoomto {*} 30") That does work perfectly. And it is designed to do exactly what you ask for, Mark. Nonetheless, I am adding set scirptNoWait true for you. This will be Jmol.14.21.1 new feature: set scriptNoWait true -- allows Jmol.script to work like Jmol.scriptWait, bypassing all time delays and forcing all file operations to work synchronously On Wed, Oct 18, 2017 at 8:19 AM, Robert Hanson <ha...@st...> wrote: > Mark, good to hear from you! I waited to see what others would say. :) > > You can do that in "headless" mode, but then there also will be no > display, and I suppose that only works with the Jmol application. I think > what you are doing is just requesting that all moveto and delay times be > set to 0. Right? > > If so, all nonzero timing depends upon the TRUE value of all of the > following: > > -- This is not a scriptWait() execution > -- The program is not running "headless" (Java only; also no display!) > -- viewer.autoExit is false (the -x flag for Java) > > I just tried the first with zoomTo {*} 30, and it totally broke JSmol. > Frozen in its tracks. So that's surely a bug. If I get that fixed, would it > work for you to use some sort of URL-line flag to switch to that? > > On the other hand, if I am going to fix that, I might as well also allow > a "0-time" option as well. Very easy. And maybe I've forgotten that that > exists. But even if it does, I think it must be broken, because all it > would do is what I did there. > > I'm in Cochabamba, Bolivia, a for a few more days and I can't see to get > an internet connection that lasts long enough to do a 70Mb upload. So that > will have to wait until Sunday night. > > We are talking JavaScript here, right? > > Bob > > > > > > > > > > On Tue, Oct 17, 2017 at 1:31 PM, Hoelzer, Mark <ho...@ms...> wrote: > >> Afternoon Jmol friends, >> >> >> >> I have a Jmol script running in a webpage that includes a few time-based >> commands, such as the "delay" and "move to" commands (see example script >> below in *green*). I would like to add a button to my page that can run >> this script instantly. Basically, I want the script to completely finish >> so the final display is the same as if you let the animation play out, >> but want all of the time-based commands to run instantly so it completes >> instantly. >> >> >> I'm almost positive I've done this before, but cannot track down the >> commands I used, and "exit" or "quit" just stop the script in its tracks, >> rather than completing it instantly. Thanks in advance for any help! >> >> >> >> - Mark >> >> >> >> load =1a3n; restrict :b or water; spacefill only; moveto /* time, >> axisAngle */ 1.0 { 91 108 -990 39.69} /* zoom, translation */ 86.96 0.0 >> 0.0 /* center, rotationRadius */ {-0.358 -1.02 9.9} 38.17618 /* navigation >> center, translation, depth */ {0 0 0} 0 0 0 /* cameraDepth, cameraX, >> cameraY */ 3.0 0.0 0.0; delay 1.0; color red; >> >> >> >> >> >> >> MSOE Center for BioMolecular Modeling - http://cbm.msoe.edu >> 3D Molecular Designs - www.3dmoleculardesigns.com >> ho...@ms... >> office: 414-277-4554 <(414)%20277-4554> >> cell: 414-640-8668 <(414)%20640-8668> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Jmol-users mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-users >> >> > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: <ang...@ua...> - 2017-10-20 09:16:24
|
I'm sorry, Bob, but although I am not much engaged in this feature, the description sounds rather confusing to naive eyes: 1. That "scripWait()" will not respect delays and timing of rotate/move/etc 2. That "scirptNoWait" will mean the same as "scriptWait" What am I missing? El 19 Oct 2017 a las 6:07, Robert Hanson escribió: > > OK, my bad. I got fooled by not noticing that I had the browser debugger running and that it had > stopped because I mistakenly typed > > Jmol.scriptWait("zoomto {*} 30") > > instead of > > Jmol.scriptWait(jmolApplet0, "zoomto {*} 30") > > That does work perfectly. And it is designed to do exactly what you ask for, Mark. > > Nonetheless, I am adding > > set scirptNoWait true > > for you. > > This will be Jmol.14.21.1 > > new feature: set scriptNoWait true -- allows Jmol.script to work like Jmol.scriptWait, > bypassing all time delays and forcing all file operations to work synchronously > > > > > On Wed, Oct 18, 2017 at 8:19 AM, Robert Hanson <ha...@st...> wrote: > Mark, good to hear from you! I waited to see what others would say. :) > > You can do that in "headless" mode, but then there also will be no display, > and I suppose that only works with the Jmol application. I think what you > are doing is just requesting that all moveto and delay times be set to 0. > Right? > > If so, all nonzero timing depends upon the TRUE value of all of the > following: > > -- This is not a scriptWait() execution > -- The program is not running "headless" (Java only; also no display!) > -- viewer.autoExit is false (the -x flag for Java) > > I just tried the first with zoomTo {*} 30, and it totally broke JSmol. Frozen in > its tracks. So that's surely a bug. If I get that fixed, would it work for you to > use some sort of URL-line flag to switch to that? > > On the other hand, if I am going to fix that, I might as well also allow a > "0-time" option as well. Very easy. And maybe I've forgotten that that exists. > But even if it does, I think it must be broken, because all it would do is what > I did there. > > I'm in Cochabamba, Bolivia, a for a few more days and I can't see to get an > internet connection that lasts long enough to do a 70Mb upload. So that will > have to wait until Sunday night. > > We are talking JavaScript here, right? > > Bob > > > > > > > > > > On Tue, Oct 17, 2017 at 1:31 PM, Hoelzer, Mark < ho...@ms...> > wrote: > Afternoon Jmol friends, > > > I have a Jmol script running in a webpage that includes a > few time-based commands, such as the "delay" and "move to" > commands (see example script below in green). I would like to add a > button to my page that can run this script instantly. Basically, I want the > script to completely finish so the final display is the same as if you let > the animation play out, but want all of the time-based commands to run > instantly so it completes instantly. > > I'm almost positive I've done this before, but cannot track down the > commands I used, and "exit" or "quit" just stop the script in its tracks, > rather than completing it instantly. Thanks in advance for any help! > > > - Mark > > > load =1a3n; restrict :b or water; spacefill only; moveto /* time, > axisAngle */ 1.0 { 91 108 -990 39.69} /* zoom, translation */ 86.96 0.0 > 0.0 /* center, rotationRadius */ {-0.358 -1.02 9.9} 38.17618 /* > navigation center, translation, depth */ {0 0 0} 0 0 0 /* cameraDepth, > cameraX, cameraY */ 3.0 0.0 0.0; delay 1.0; color red; > > > > > > MSOE Center for BioMolecular Modeling - http://cbm.msoe.edu > 3D Molecular Designs - www.3dmoleculardesigns.com > ho...@ms... > office: 414-277-4554 > cell: 414-640-8668 > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > > > > -- > Robert M. Hanson > Professor of Chemistry > St. Olaf College > Northfield, MN > http://www.stolaf.edu/people/hansonr > > > If nature does not answer first what we want, > it is better to take what answer we get. > > -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 > |
From: Robert H. <ha...@st...> - 2017-10-20 09:50:11
|
Hah! Yeah, I did not say that very well, did I? OK, we will not call it that! If you use Jmol.scriptWait, then you are requesting a return value -- all the output from that command is returned. So Jmol (Java or JavaScript) has to go into a mode that uses no threads, and particularly does not "wait" for any requested operation -- even just a "sleep" such as in the DELAY command -- to execute. The way it does this is to disregard any requests for timings in moveTo, zoomTo, or DELAY, disregard the PAUSE command completely, and do a few other things like forcing images to be loaded synchronously (without just making a request and continuing) instead of asynchronously (using a separate thread). The idea was that "scriptNoWait" would implement this, meaning, as Jmol.scriptWait() does, to not wait. Yeah, that's confusing! It won't be released until Sunday. What's a better way to say that succintly? Maybe one of: noDelay skipDelays ? |
From: Robert H. <ha...@st...> - 2017-10-23 01:01:09
|
I went for "noDelay" Jmol.___JmolVersion="14.21.1" new feature: set noDelay true sets all time delays to 0 and forces all file operations to be synchronous bug fix: CIP adds S4 symmetry check in Rule 6 bug fix: chirality broken for JavaScript in MSIE 11 due to range error bug fix: Should be able to save PNGJ from menu even if zapped (because there might be a surface) On Fri, Oct 20, 2017 at 5:49 AM, Robert Hanson <ha...@st...> wrote: > Hah! Yeah, I did not say that very well, did I? OK, we will not call it > that! > > If you use Jmol.scriptWait, then you are requesting a return value -- all > the output from that command is returned. So Jmol (Java or JavaScript) has > to go into a mode that uses no threads, and particularly does not "wait" > for any requested operation -- even just a "sleep" such as in the DELAY > command -- to execute. The way it does this is to disregard any requests > for timings in moveTo, zoomTo, or DELAY, disregard the PAUSE command > completely, and do a few other things like forcing images to be loaded > synchronously (without just making a request and continuing) instead of > asynchronously (using a separate thread). > > The idea was that "scriptNoWait" would implement this, meaning, as > Jmol.scriptWait() does, to not wait. Yeah, that's confusing! > > It won't be released until Sunday. What's a better way to say that > succintly? > > Maybe one of: > > noDelay > skipDelays > > > ? > > > > > > -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: Luciano A. <luc...@ya...> - 2017-10-25 13:57:43
|
Hello, I'm loading a pdb file, and later on I want to load another unrelated pdb file and display both together, simultaneously. Is there any way to do this? I tried append but this only seems to work for models that are then displayed independently, i.e. either one or the other, not together. Thanks! Luciano |
From: Robert H. <ha...@st...> - 2017-10-25 14:26:27
|
set appendNew FALSE load append ..... On Wed, Oct 25, 2017 at 8:57 AM, Luciano Abriata via Jmol-users < jmo...@li...> wrote: > Hello, > > I'm loading a pdb file, and later on I want to load another unrelated pdb > file and display both together, simultaneously. Is there any way to do this? > > I tried append but this only seems to work for models that are then > displayed independently, i.e. either one or the other, not together. > > Thanks! > > Luciano > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Jmol-users mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- Robert M. Hanson Professor of Chemistry St. Olaf College Northfield, MN http://www.stolaf.edu/people/hansonr If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 |
From: <ang...@ua...> - 2017-10-25 17:09:36
|
> I tried append but this only seems to work for models that are then > displayed independently, i.e. either one or the other, not together. Also, you can load append (without set appendNew false) and then use the "frame" command frame 1 frame 2 frame all --- El software de antivirus Avast ha analizado este correo electrónico en busca de virus. https://www.avast.com/antivirus |