At the top of your file you say

                var resnum = 10;

Under the testing button you use the resnum variable.

<script>
jmolButton_hinge("select *;color white;spacefill off;wireframe off;select
21,22*;"+"select "+resnum+"*;"+"color  green;spacefill 2.0","Testing   
");
</script>


Other than that, it looks like the value of resnum never changes.

I found no references to resnum in your _modified_ Jmol.js

I am not sure exactly what you are trying to do, but I suggest the following.

 - an array of strings with selection criteria
 - an index into that array
 - increment that index modulo the length of the array


Separately, a few comments about your modifications to Jmol.js

1. If there is functionality that people think is missing from Jmol.js
then please let me know. In many cases I can write it once and many people
can benefit from it.


2. If people need specialized functionality that is not in Jmol.js then I
strongly recommend that people avoid making changes to Jmol.js. Doing so
will make it more difficult for to upgrade to future releases of Jmol.

Rather, I recommend making your own 'MyJmolExtensions.js'. You can include
it as follows:

    <script src="../jmol/Jmol.js">
    <script src="../jmol/MyJmolExtensions.js">


3. In this specific case, I do not understand the purpose of your
jmolButton_hinge routine. It looks like to me all it is doing is slightly
modifying the script. In which case, I think that you are better off
leaving all of the script code in one place.


Miguel



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to