Lin Yi wrote:

> Hi all,
>
> I have a few questions regarding some GUI widgets I'm trying to build 
> for a website. 
>
> 1. I will need to highlight some residues that the user selected via 
> mouse.  I read in the documentation that this could be done using the 
> pickCallback, but it returns the atom index instead of residue index.  
> What's the quickest way to translate between the two? 
>
You don't actually need the number passed to the function. Just use:

var resNo = jmolEvaluate("_atomPicked.resno")

> 2. I also need to highlight certain residues that user entered in a 
> textbox.  I'm thinking of using a JmolButton, but I cannot find a way 
> to tie an input textbox to it.  The only other way I saw is to use a 
> JmolCommandInput, but that will run a script entered, and I only want 
> it to highlight residues.  What is the best way to do this? 
>
Using standard JavaScript you can have an input box that fires a 
JavaScript method when ENTER is pressed. Or have a simple <input> button 
next to it with a label such as "OK". The action on that would be 
something like:

jmolScript("select " + document.whatever.value)


> 3. I plan to have two combo boxes for loading protein structures, 
> where the items in the second combo box will depend on the item 
> selected from the first combo box.  How do I tie these two combo boxes 
> together? 
>
What I like to do is use the onkeyup and the onchange methods of those 
combo boxes. Something like this:

<select id="combo1" onkeyup="setTimeout('doWhatever('+value+')',100)" 
onchange="doWhatever(value)">

The 100-ms timeout makes it so that pressing the down-arrow key 
activates the selection AFTER the selection changes in the box.

> I also have some general questions about Jmol: 
>
> Is there a limit on how many models you could load onto an applet?  I 
> will need to super impose some models for my project and I don't want 
> to crash the browser or anything else for that matter. 

All depends upon the memory of the user's browser. You will have to 
experiment.

>
> Is Jmol fully compatible with java 1.7 now?  I was having issues with 
> Jmol using java1.7. 

no idea; hope not. We don't even use 1.6 for compiling.

>
> Thank you guys very much. 
>
>
> Lin
> Department of Bioinformatics
> University of Kansas
>
>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>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



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to