Re: [Jmol-users] bind command and picked atoms
Hi Bob, here is what I tried: bind "ALT-LEFT" "javascript jmol_center(_X, _Y, _picked);"; bind "ALT-LEFT" "javascript jmol_center(_X, _Y, _atomPicked);"; _X and _Y are replaced with the screen coordinates where the click happened, but _picked or _atomPicked are not replaced by anything. And 'jmol_center' is just some javascript function which gets correctly called. This does not work ether: bind "ALT-LEFT" "print _X; print _Y; print _picked; print _pickedAtom;"; it just print _X and _Y. Alex - Ursprüngliche Mail - > Von: "Bob Hanson" > An: jmol-users@lists.sourceforge.net > CC: jmol-users@lists.sourceforge.net > Gesendet: Freitag, 20. Januar 2012 18:20:38 > Betreff: Re: [Jmol-users] bind command and picked atoms > _picked is a variable. I thought it was defined prior to the callback. > > Sent from my stupid iphone > > On Jan 20, 2012, at 10:35 AM, Alexander Rose > wrote: > > > Hi all, > > > > when using Jmol I find myself using either 'set picking CENTER' or > > 'set picking SELECT GROUP', so I would like to switch as fast and > > easy as possible between the two modes via the mouse. My first idea > > was to use the 'bind' command to bind centering to "ALT-LEFT" and > > selecting a group to "LEFT". However there is no "_center" > > jmol-action for the bind command and the "_select" jmol-action seems > > not to work when 'set picking CENTER' is active. The bind command > > also allows to pass a jmol "script" instead of a jmol-action, but > > inside that passed script the information which atom was picked is > > not available so you can't center on it or select its group. There > > is also the pick callback, but this does not give you the modifier > > key that was pressed when the atom was picked. > > > > In my opinion the addition of a "_centerOnPickedAtom" jmol-action > > for the bind command would be useful. A more flexible solution would > > be to add a "_PICKED" variable (containing a selection of the picked > > atom; maybe also other pickable elements?!) to the things that gets > > replaced in a script passed to 'bind' command. Based on that > > variable it is straightforward to implement centering or selecting a > > group. What do you think? Would anyone else find this useful, too? > > > > > > Best > > Alexander > > > > -- > > Keep Your Developer Skills Current with LearnDevNow! > > The most comprehensive online learning library for Microsoft > > developers > > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, > > MVC3, > > Metro Style Apps, more. Free future releases when you subscribe now! > > http://p.sf.net/sfu/learndevnow-d2d > > ___ > > Jmol-users mailing list > > Jmol-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jmol-users > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft > developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, > MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] bind command and picked atoms
_picked is a variable. I thought it was defined prior to the callback. Sent from my stupid iphone On Jan 20, 2012, at 10:35 AM, Alexander Rose wrote: > Hi all, > > when using Jmol I find myself using either 'set picking CENTER' or 'set > picking SELECT GROUP', so I would like to switch as fast and easy as possible > between the two modes via the mouse. My first idea was to use the 'bind' > command to bind centering to "ALT-LEFT" and selecting a group to "LEFT". > However there is no "_center" jmol-action for the bind command and the > "_select" jmol-action seems not to work when 'set picking CENTER' is active. > The bind command also allows to pass a jmol "script" instead of a > jmol-action, but inside that passed script the information which atom was > picked is not available so you can't center on it or select its group. There > is also the pick callback, but this does not give you the modifier key that > was pressed when the atom was picked. > > In my opinion the addition of a "_centerOnPickedAtom" jmol-action for the > bind command would be useful. A more flexible solution would be to add a > "_PICKED" variable (containing a selection of the picked atom; maybe also > other pickable elements?!) to the things that gets replaced in a script > passed to 'bind' command. Based on that variable it is straightforward to > implement centering or selecting a group. What do you think? Would anyone > else find this useful, too? > > > Best > Alexander > > -- > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > ___ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] bind command and picked atoms
Hi all, when using Jmol I find myself using either 'set picking CENTER' or 'set picking SELECT GROUP', so I would like to switch as fast and easy as possible between the two modes via the mouse. My first idea was to use the 'bind' command to bind centering to "ALT-LEFT" and selecting a group to "LEFT". However there is no "_center" jmol-action for the bind command and the "_select" jmol-action seems not to work when 'set picking CENTER' is active. The bind command also allows to pass a jmol "script" instead of a jmol-action, but inside that passed script the information which atom was picked is not available so you can't center on it or select its group. There is also the pick callback, but this does not give you the modifier key that was pressed when the atom was picked. In my opinion the addition of a "_centerOnPickedAtom" jmol-action for the bind command would be useful. A more flexible solution would be to add a "_PICKED" variable (containing a selection of the picked atom; maybe also other pickable elements?!) to the things that gets replaced in a script passed to 'bind' command. Based on that variable it is straightforward to implement centering or selecting a group. What do you think? Would anyone else find this useful, too? Best Alexander -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Collada file exchange
Related to this (nothing useful in practice, but that's the info we have): http://wiki.jmol.org/index.php/File_formats/3D_Objects#Collada and the place to keep adding comments or plans. -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Collada file exchange
The recent announcement by Apple of an interactive e-book authoring environment (iBooks Author) has an example of a molecule captured using the Collada format http://www.khronos.org/collada/ Can I ask if it might be possible for Jmol to emit this format (or should we go the iBabel route?). Of course, Apple's closed environment means that it is very unlikely that Jmol could ever form part of it. Indeed even Javascript based systems such as ChemDoodle seem closed out at the moment. But Collada might be a good start? -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users