Jeff, Johnathan, and Jay, I may be wrong, but I think Bob picked up on Jay's original intent. Jay, correct me if I'm wrong on this. I think Jay wants to identify a color to be active on a subsequent click of an atom. Bob's code suggestion would then apply this color to a script allowed selection group associated with the clicked atom. In other words, an adaptation of Jonathan's widget that would make it a global color storage tool for subsequent script action in addition to being a tool that implements a specific color change. The former would allow a single page widget to be the master of multiple script color changes. I've used this type of global color select tool with a clunky radio button color selector. Jonathan's widget is much nicer, and it could easily be adapted to become a global color picker for subsequent script action without losing its efficacy as a specific color change tool.
Otis On 6/11/2010 11:10 AM, Jeff Hansen wrote: > Jonathan, > > I'm not sure I understand the goal here. Is it to select a single > atom or residue and color it? Is it to select all lysines and color > them red? Is it to select residues 50-73 and color them blue? Is it > to find all alpha helices and color them purple? > > > Jeff > >> >>> We have a nice color widget now, and it could be adapted.... >>> Jonathan, does >>> the color widget allow you to tie it to any script command? >>> >>> The basic idea is >>> >>> 1) set a pick callback so you know what residue(s) were clicked. -- >>> or I >>> guess just use set picking select. >>> 2) in response to a color pick -- say it's "[xFF00FF]" you would >>> construct >>> the script >>> >>> var scr = "select within(group, selected);color [xFF00FF]" >>> >>> and send that to Jmol using >>> > -- Otis Rothenberger chemagic.com ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

