Bugs item #1829276, was opened at 2007-11-09 16:31
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=1829276&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Applet
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: molvisions (molvisions)
Assigned to: Bob Hanson (hansonr)
Summary: weird color application

Initial Comment:
hi,

this is a difficult bug to file because I can't pin down exactly when it 
happens (it seems random at the moment).  I am loading an external file with 
values, and coloring atoms according to those values.  a demo can be seen here:

<http://www.molvisions.com/impas/>

or, since my server is wicked slow, downloaded from here:

<http://www.molvisions.com/impas/gly_bact_min.tar>

basically, I load the external file and then use blocks of select statements to 
color atoms; for example:

select backbone1 and (property_potc1 > 1 and property_potc1 < 3)
color atoms yellow
color atoms translucent 0.9

clicking a radio button in the above demo should apply a single coloring script 
of this form.  but, even though the script and data for each button are exactly 
the same, often the resulting color scheme is very different.  for example, 
sometimes I see a nice, and extremely wrong, rainbow gradient in the right-hand 
structure.  but not always.

I hope that description made sense.  can anyone see a reason why this might be 
happening?

thanks,

tim driscoll


----------------------------------------------------------------------

>Comment By: Bob Hanson (hansonr)
Date: 2007-11-10 17:40

Message:
Logged In: YES 
user_id=1082841
Originator: NO

Now that I have Jmol 11.3.43 running with your page, Tim, I see that:

1) The images you saw initially with the radio buttons were correct. 
2) Jmol 11.3.42 has a bug that prevents using propertyAtomNumberField
anyway.
3) Jmol 11.3.43 shows the same colors, but is doing the mapping correctly,
so it is independent of the selected atom set.
4) The key to always getting the same picture with the earlier version of
Jmol, since you are NOT using propertyAtomNumberField, is to add

select *

just before the data statement. 

I'm guessing that without the atom number field sometimes you had a
different selection, and in that case, since the selection is used, it
would totally mess up the colors. 

Bob


----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2007-11-10 10:03

Message:
Logged In: YES 
user_id=1082841
Originator: NO

OK, Tim, I think I know what's going on. 

Mostly I think the problem was that you used "propertyAtomField" instead
of "propertyAtomNumberFeld", and that resulted in the data being misread. I
think our new recommendation to use "SET" for Jmol parameters will pay off
in this regard. I noticed it because the variable was listed in the state
under "user-defined variables" instead of Jmol parameters.

Clearly we need some more feedback in those data statements that allow you
to check that data were read properly. 

Aside from that, I recommend using "var" with your variables. This
confines them to the script being run, and when that finishes, then they
are flushed, saving memory on those huge data lists. 

Looks like it will be a fabulous resource.

Bob


----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2007-11-10 02:59

Message:
Logged In: YES 
user_id=1082841
Originator: NO

First, better try a newer Jmol version. No sense talking about bugs in
11.1.37. 

Comments:

color atoms [75,75,75]
color atoms translucent 0.9
color trace [75,75,75]
select backbone1 and (property_potc1 > 0 and property_potc1 < 2)


1. You can do this and save one step:

color atoms translucent 0.9 [75,75,75]

2. OK, you've got me. Why not just 

select backbone1 and (property_potc1 = 1)

3. With Jmol 11.4.43 you can instead make an array of your color list and
process it like this:


mycolors = "[xff0000],[xff2200],[xff2244],[xff44ff]".split(",");
for (var i = 1; i <= mycolors.size; i = i + 1);

        print " "  + i + " color= " + mycolors[i] + " " + mycolors[i].color;

        select backbone1 and property_potc1 = i;

        color atoms translucent 0.9 @{mycolors[i]};
        color trace @{mycolors[i]};

end for;







----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=1829276&group_id=23629

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to