Re: [Jmol-users] super light-weight JSmol?
Works great! A second or two loading time on the iPhone. The skin here is somehow more artistic than Jmol's normal look... :-P Cheers, Mike On Sunday, March 24, 2013, Robert Hanson wrote: OK, here's a first shot: http://chemapps.stolaf.edu/jmol/jsmol/lite.htm Tell me what you think. Subtracting 2 seconds off the load time for the call to [12:43:56.467] GET http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/%20dopamine/SDF?record_type=3d[HTTP/1.1 200 OK 2063ms] should leave you with about 400 ms total load time. The size is about 131 KB total JavaScript unzipped; 45KB gzipped. Capabilities are extremely minimal, and I suggest we keep them that way -- just balls and sticks. Nothing fancy. No scripting, but the Info block allows for some parameterization: bondWidth: 4, zoomScaling: 1.5, pinchScaling: 2.0, mouseDragFactor: 0.5, touchDragFactor: 0.15, multipleBondSpacing: 4, Be sure to try it on your smart phone. Comments? Suggestions? Bob -- --- Michael Evans Department of Chemistry University of Illinois, Urbana-Champaign -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
Clean drawing. Fast. Very nice!. I would add labels, or the option to label atoms. You will need them for teaching. Jaim On Mar 24, 2013, at 8:19 PM, Robert Hanson wrote: OK, here's a first shot: http://chemapps.stolaf.edu/jmol/jsmol/lite.htm Tell me what you think. Subtracting 2 seconds off the load time for the call to [12:43:56.467] GET http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/%20dopamine/SDF?record_type=3d [HTTP/1.1 200 OK 2063ms] should leave you with about 400 ms total load time. The size is about 131 KB total JavaScript unzipped; 45KB gzipped. Capabilities are extremely minimal, and I suggest we keep them that way -- just balls and sticks. Nothing fancy. No scripting, but the Info block allows for some parameterization: bondWidth: 4, zoomScaling: 1.5, pinchScaling: 2.0, mouseDragFactor: 0.5, touchDragFactor: 0.15, multipleBondSpacing: 4, Be sure to try it on your smart phone. Comments? Suggestions? Bob -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
The 2 seconds is required for the PubChem query. Apparently that's a much more involved search than NCI. Here is the same, but from NCI: http://chemapps.stolaf.edu/jmol/jsmol/liteNCI.htm On my iPhone that loads extremely fast. (OK, I'm on a network here, but when I switch to 3G, I don't notice more than a split second difference.) So the point of this is that for those wanting the flexibility of having a mostly nonscriptable small model to twiddle that is in MOL file format (think PubChem), JSmol is still a great way to go. You can build this into any page and just basically flip a switch to reload the page using full-blown Jmol. JSmol will take care of finding the file on your server or database. If your server is gzip-compressing JavaScript files, then the bandwidth comparison is this: JSmol/full: 500K JSmol/lite: 45K Otherwise: JSmol/full: 2.0 MB JSmol/lite: 130KB If someone wants to experiment with this, extending it in different ways -- maybe CIF files or PDB files or XYZ files, feel free. Just write some sort of JSmol.lite.xxx.js extension. I think I've done what I want to do with it. Bob On Sun, Mar 24, 2013 at 1:24 PM, Michael Evans evan...@illinois.edu wrote: Works great! A second or two loading time on the iPhone. The skin here is somehow more artistic than Jmol's normal look... :-P Cheers, Mike On Sunday, March 24, 2013, Robert Hanson wrote: OK, here's a first shot: http://chemapps.stolaf.edu/jmol/jsmol/lite.htm Tell me what you think. Subtracting 2 seconds off the load time for the call to [12:43:56.467] GET http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/%20dopamine/SDF?record_type=3d[HTTP/1.1 200 OK 2063ms] should leave you with about 400 ms total load time. The size is about 131 KB total JavaScript unzipped; 45KB gzipped. Capabilities are extremely minimal, and I suggest we keep them that way -- just balls and sticks. Nothing fancy. No scripting, but the Info block allows for some parameterization: bondWidth: 4, zoomScaling: 1.5, pinchScaling: 2.0, mouseDragFactor: 0.5, touchDragFactor: 0.15, multipleBondSpacing: 4, Be sure to try it on your smart phone. Comments? Suggestions? Bob -- --- Michael Evans Department of Chemistry University of Illinois, Urbana-Champaign -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Chemistry Department 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 -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
N David Brown, 2013-03-21 20:47 (Europe/Helsinki): If so, is this for mobile /touch devices in particular? It seems to be quite an ugly bolt-on for a difference of 100-500k which, considering today's average internet connection speed, is insignificant (in my humble opinion). In my opinion, the problem with mobile devices is NOT the download size (downloading 1MB may take a little while with 0.2-0.5 Mbps mobile connection but browsers have progressive rendering to make this less visible) but the actual execution of the JavaScript. Even with desktop browsers interpreting and executing 1-2 MB of JavaScript code takes pretty much CPU power and very much RAM. Both of which are scarce resources for any mobile device because of battery usage. I think that if lightweight JSmol can do with very little CPU and RAM despite the size of the source code, it's suitable for mobile devices. Just make sure that the file sizes and headers are suitable for public caching and fits in the private cache of most mobile devices (namely the iOS is/was very picky about the files it will cache and re-fetching the JS files for the next page load is not an option). Note that the CPU and RAM usage MUST include the processing needed to interpret the JS, not just the part of processing that is required once the applet is ready and running. -- Mikko -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
I agree - the second half of that statement you quoted was if it *wasn't* for mobile devices. Now Bob's made it clear this is the focus, I completely understand the logic. Dave On 22 March 2013 06:56, Mikko Rantalainen mikko.rantalai...@peda.netwrote: N David Brown, 2013-03-21 20:47 (Europe/Helsinki): If so, is this for mobile /touch devices in particular? It seems to be quite an ugly bolt-on for a difference of 100-500k which, considering today's average internet connection speed, is insignificant (in my humble opinion). In my opinion, the problem with mobile devices is NOT the download size (downloading 1MB may take a little while with 0.2-0.5 Mbps mobile connection but browsers have progressive rendering to make this less visible) but the actual execution of the JavaScript. Even with desktop browsers interpreting and executing 1-2 MB of JavaScript code takes pretty much CPU power and very much RAM. Both of which are scarce resources for any mobile device because of battery usage. I think that if lightweight JSmol can do with very little CPU and RAM despite the size of the source code, it's suitable for mobile devices. Just make sure that the file sizes and headers are suitable for public caching and fits in the private cache of most mobile devices (namely the iOS is/was very picky about the files it will cache and re-fetching the JS files for the next page load is not an option). Note that the CPU and RAM usage MUST include the processing needed to interpret the JS, not just the part of processing that is required once the applet is ready and running. -- Mikko -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
This idea picks my interest, though for my application I'd like something slightly more functional (with capabilities to draw solids, lines and text, beyond the simple molecular plotting). A question: is it possible that such a JSMol lite version would also render faster? Or should we expect more or less the same kind of speeds? Simone 2013/3/21 N David Brown hubd...@gmail.com Isn't it more likely that if a user has a minimum footprint requirement, they will adhere to TwirlyMol or an alternative rather than desire that Jmol load later? Regardless, I like your slice idea personally. Better to spend time developing a staged loading process for Jmol than effectively introduce a dependency on an external project whose future is uncertain. There are a few ways you could approach this. One idea is to split core classes into base and non-base versions, e.g. Viewer has core functionality moved to a new class BaseViewer which Viewer extends to provide the entire feature set. You could then use the Reflection API to reload all Base* classes as their subtypes at a time of the user's choosing. Dave On 20 March 2013 21:50, Robert Hanson hans...@stolaf.edu wrote: Jmol users, An idea is being considered to have a very light-weight starter model for small molecules in the JSmol suite that is not derived from Jmol but is instead from some other package. Kind of like what we were doing with ChemDoodle, but not having the licensing issues that come with that. Java-based classes would not be involved until some later option was chosen by the page visitor. Suggestions? What's around now that is light-weight and doesn't require anything special (no WebGL)? This can be VERY simple. Just balls and sticks, for example. 100-200K max. Maybe just a couple of file formats, like MOL and XYZ. Another possibility would be to slice off the absolute minimum of Jmol to just handle balls and sticks. I wonder how many bytes that would require... Bob -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Chemistry Department 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 -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- ___ Nuovo indirizzo e-mail: simonesturni...@gmail.com -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
JSmol is already highly modular, with a lot of reflection, and only the critical methods and classes are included in the 1.7 MB core.z.js file. That, for example, includes no scripting, no surfaces, no menus, no console, no states, no images, no surfaces, no special shapes, almost no file readers. Much of it is Java itself, but even that is only the Java classes that are needed. I might be able to carve off more -- going down the list of what's in core.z.js, I see some opportunities. But getting that to, say, 200K, that would be almost impossible. Viewer definitely would need to be subclassed in that way, and that might help. So that's a good idea. The idea of the super-light version would be truly a twirly small molecule only -- just that. Along the lines of what ChemDoodle can do. So I'm thinking that not even have it be Jmol. I started working a bit with TwirlyMol, and it looks like that's the right idea, but I haven't got it finished yet. Just very very light. Bob On Thu, Mar 21, 2013 at 4:10 AM, Simone Sturniolo simonesturni...@gmail.com wrote: This idea picks my interest, though for my application I'd like something slightly more functional (with capabilities to draw solids, lines and text, beyond the simple molecular plotting). A question: is it possible that such a JSMol lite version would also render faster? Or should we expect more or less the same kind of speeds? Simone 2013/3/21 N David Brown hubd...@gmail.com Isn't it more likely that if a user has a minimum footprint requirement, they will adhere to TwirlyMol or an alternative rather than desire that Jmol load later? Regardless, I like your slice idea personally. Better to spend time developing a staged loading process for Jmol than effectively introduce a dependency on an external project whose future is uncertain. There are a few ways you could approach this. One idea is to split core classes into base and non-base versions, e.g. Viewer has core functionality moved to a new class BaseViewer which Viewer extends to provide the entire feature set. You could then use the Reflection API to reload all Base* classes as their subtypes at a time of the user's choosing. Dave On 20 March 2013 21:50, Robert Hanson hans...@stolaf.edu wrote: Jmol users, An idea is being considered to have a very light-weight starter model for small molecules in the JSmol suite that is not derived from Jmol but is instead from some other package. Kind of like what we were doing with ChemDoodle, but not having the licensing issues that come with that. Java-based classes would not be involved until some later option was chosen by the page visitor. Suggestions? What's around now that is light-weight and doesn't require anything special (no WebGL)? This can be VERY simple. Just balls and sticks, for example. 100-200K max. Maybe just a couple of file formats, like MOL and XYZ. Another possibility would be to slice off the absolute minimum of Jmol to just handle balls and sticks. I wonder how many bytes that would require... Bob -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Chemistry Department 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 -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- ___ Nuovo indirizzo e-mail: simonesturni...@gmail.com -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Chemistry Department 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,
Re: [Jmol-users] super light-weight JSmol?
What you've said makes sense. I can understand your motivation now you've confirmed it's primarily for mobile/touch devices. Thanks for the additional info, Bob. Dave On 21 March 2013 19:44, Robert Hanson hans...@stolaf.edu wrote: On Thu, Mar 21, 2013 at 1:47 PM, N David Brown hubd...@gmail.com wrote: Thanks for the elucidation, Bob. I'm not so familiar with the code base. I'm unaware what you did with ChemDoodle and why. You've said in this last email and the original of the chain that the idea is to have a lightweight applet. But what's the *purpose*? Simply that, for a quick glance at simple molecules, this would be a quicker process due to a smaller applet size and less class loading? If so, is this for mobile /touch devices in particular? It seems to be quite an ugly bolt-on for a difference of 100-500k which, considering today's average internet connection speed, is insignificant (in my humble opinion). Presumably the feature is planned as opt-in, i.e. by default it's disabled? OK, it's a very clear purpose: Yes, mobile devices primarily,, maybe iPads. Totally opt-in. The page developer would want this specifically because it would be simple, quick, and minimal. The goal is to have a very fast-loading but minimal-functionality option, but still not just an image. I don't want to spend a lot of time on this, but if it's possible, that would be useful in certain applications where either (a) one only wants a very low-budget model or (b) that would be good for starting, and then, say you want a mep surface as well, then that will require some additional components and a switch to full-blown JSmol. Something like Wikipedia, for example, or a database such as PubChem or ChemSpider. The advantage of incorporating this into JSmol is that it would allow the page developer to tailor a page to a device better and also provide future flexibility for additional features (particularly surfaces, I think) if that were desired. Bob Dave On 21 March 2013 17:20, Robert Hanson hans...@stolaf.edu wrote: JSmol is already highly modular, with a lot of reflection, and only the critical methods and classes are included in the 1.7 MB core.z.js file. That, for example, includes no scripting, no surfaces, no menus, no console, no states, no images, no surfaces, no special shapes, almost no file readers. Much of it is Java itself, but even that is only the Java classes that are needed. I might be able to carve off more -- going down the list of what's in core.z.js, I see some opportunities. But getting that to, say, 200K, that would be almost impossible. Viewer definitely would need to be subclassed in that way, and that might help. So that's a good idea. The idea of the super-light version would be truly a twirly small molecule only -- just that. Along the lines of what ChemDoodle can do. So I'm thinking that not even have it be Jmol. I started working a bit with TwirlyMol, and it looks like that's the right idea, but I haven't got it finished yet. Just very very light. Bob On Thu, Mar 21, 2013 at 4:10 AM, Simone Sturniolo simonesturni...@gmail.com wrote: This idea picks my interest, though for my application I'd like something slightly more functional (with capabilities to draw solids, lines and text, beyond the simple molecular plotting). A question: is it possible that such a JSMol lite version would also render faster? Or should we expect more or less the same kind of speeds? Simone 2013/3/21 N David Brown hubd...@gmail.com Isn't it more likely that if a user has a minimum footprint requirement, they will adhere to TwirlyMol or an alternative rather than desire that Jmol load later? Regardless, I like your slice idea personally. Better to spend time developing a staged loading process for Jmol than effectively introduce a dependency on an external project whose future is uncertain. There are a few ways you could approach this. One idea is to split core classes into base and non-base versions, e.g. Viewer has core functionality moved to a new class BaseViewer which Viewer extends to provide the entire feature set. You could then use the Reflection API to reload all Base* classes as their subtypes at a time of the user's choosing. Dave On 20 March 2013 21:50, Robert Hanson hans...@stolaf.edu wrote: Jmol users, An idea is being considered to have a very light-weight starter model for small molecules in the JSmol suite that is not derived from Jmol but is instead from some other package. Kind of like what we were doing with ChemDoodle, but not having the licensing issues that come with that. Java-based classes would not be involved until some later option was chosen by the page visitor. Suggestions? What's around now that is light-weight and doesn't require anything special (no WebGL)? This can be VERY simple. Just balls and sticks, for example. 100-200K max. Maybe just a couple of file formats,
[Jmol-users] super light-weight JSmol?
Jmol users, An idea is being considered to have a very light-weight starter model for small molecules in the JSmol suite that is not derived from Jmol but is instead from some other package. Kind of like what we were doing with ChemDoodle, but not having the licensing issues that come with that. Java-based classes would not be involved until some later option was chosen by the page visitor. Suggestions? What's around now that is light-weight and doesn't require anything special (no WebGL)? This can be VERY simple. Just balls and sticks, for example. 100-200K max. Maybe just a couple of file formats, like MOL and XYZ. Another possibility would be to slice off the absolute minimum of Jmol to just handle balls and sticks. I wonder how many bytes that would require... Bob -- Robert M. Hanson Larson-Anderson Professor of Chemistry Chair, Chemistry Department 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 -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] super light-weight JSmol?
TwirlyMol maybe? 14 kb! -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users