From: Jeffrey Tseng (pocket17_at_gmail.com)
Date: Wed Mar 15 2006 - 14:54:58 CST

John,
   I have tried different commands such like 'display update ui|on|off'
but the colors of figure dosen't change correspondingly.

After running my script, I have to go to "Graphical Representations" menu
to push the button of "Apply Changes Automatically" for updating the
colorings.

I notice that when I push the button "Apply Changes Automatically" , the VMD
re-runnig the "surf" repsentation showing in the monitor.

Also, in the "Color Controls" menu, there is a "offset bar" under the tab
of "Color Scale". Every time, I move the bar of "offset". The colors of the
figure change dynamically. I wonder how do you use the script command to
change it.

Could you show the "command" to change the value "offset" in the color scale
RGB ?

Since you help accomplish this figure so much, I would like to acknowledge
you in the paper published. Would you mind telling me how to summit this
figure to KS website when it is done?

 As I said , it can't not be fully automatically generated because every
time I have to push the button of "Apply Changes Automatically".

Cheers,

-Jeffrey

On 3/15/06, John Stone <johns_at_ks.uiuc.edu> wrote:
>
>
> Oops, missed the bottom of your email:
> That's actually not very easy to do, because there's not a good way of
> assigning a specific RGB color to a specific piece of atom-associated
> geometry with the current system. The most obvious method to get it done,
> though as I say is not ideal, is to rewrite the color scale with your own
> values using a script and assign the color scale data range so you can
> predict the mapping of beta/user/occupancy/etc values to RGB colors.
> There's an example in the VMD User's Guide with a little Tcl script
> the redefines the color scale colors. Let me know if you need help with
> that.
>
> I'm working on writing a better coloring scheme to handle this problem at
> the request of a number of people, but I don't have anything ready yet,
> so this hack will have to do for the short term.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> > Also, how do we "correctly" assign the "specific" color to the
> subselection.
> > like,
> > The command you gives me:
> >
> > color scale method RWB
> >
> > It seems the colors are predefined. I could not do too much about color
> > assignments.
> >
> > Is there any way to correctly assign the desired color to the selection
> > when we use the "User" color method ?
> >
> >
> > Again, thanks so much for your help.
> >
> >
> > -Jeffrey
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On 3/14/06, John Stone <johns_at_ks.uiuc.edu> wrote:
> > >
> > >
> > > Hi,
> > > So using your example you'd do something like this:
> > >
> > > atomselect macro otherselect { resname ASN and resid 273 and name OD1
> > > or resname ASP and resid 269 and name
> OD2
> > > or resname ASP and resid 269 and name
> OD1
> > > or resname ASP and resid 269 and name CG
> }
> > >
> > > set sel1 [atomselect top "myselect"]
> > > set sel2 [atomselect top "otherselect"]
> > >
> > > # sets everything to zero
> > > $sel1 set user 0.0
> > >
> > > # set just those other four differently
> > > $sel2 set user 1.0
> > >
> > > mol modcolor 0 0 User
> > > mol scaleminmax 0 0 0.000000 1.000000
> > > color scale method RWB
> > >
> > > $sel1 delete
> > > $sel2 delete
> > >
> > >
> > >
> > > On Tue, Mar 14, 2006 at 03:18:32AM -0600, Jeffrey Tseng wrote:
> > > > Hi, John,
> > > > I do need a method that assigns values to the per-atom data
> fields
> > > such
> > > > as "user" or "occupancy" instead of beta.
> > > >
> > > > ( Using "beta" dosen't fit my needs for some other reasons )
> > > >
> > > >
> > > > Here is the example:
> > > > ###############################
> > > > mol representation SURF 1.4
> > > > atomselect macro myselect {
> > > > resname ASN and resid 273 and name OD1
> > > > or resname ASP and resid 269 and name OD2
> > > > or resname ASP and resid 269 and name OD1
> > > > or resname ASP and resid 269 and name CG
> > > > or resname HIS and resid 268 and name NE2
> > > > or resname LEU and resid 210 and name CD1
> > > > or resname LEU and resid 210 and name CG
> > > > or resname LEU and resid 210 and name CB
> > > > or resname LEU and resid 210 and name N
> > > > }
> > > >
> > > > mol selection {myselect}
> > > > mol addrep top
> > > >
> > > > ######## Here is the subselction; the subsubselect is just the frist
> 4
> > > atoms
> > > > of myselect ###############
> > > >
> > > >
> > > > mol selection {
> > > > resname ASN and resid 273 and name OD1
> > > > or resname ASP and resid 269 and name OD2
> > > > or resname ASP and resid 269 and name OD1
> > > > or resname ASP and resid 269 and name CG
> > > > }
> > > >
> > > >
> > > > ###########################
> > > >
> > > > How do we use the "user" or "occupancy" data fields to color
> different
> > > > selections, saying that the first selection is colored
> > > "green" and the
> > > > rest of them (subselection) is colored "red" ?
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > -Jeffrey
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 3/14/06, John Stone <johns_at_ks.uiuc.edu> wrote:
> > > > >
> > > > >
> > > > > Jeff,
> > > > > The example you cite was simply colored by atom name. Because
> surf
> > > > > doesn't assign atom IDs to each vertex in the surface, whole
> facets
> > > are
> > > > > colored by atom properties, which results in a fairly coarse
> coloring
> > > > > of the surface. You can do this sort of thing quite easily
> though,
> > > like
> > > > > this (say you had 100 atoms for example):
> > > > > set sel1 [atomselect top "index 0 to 50"]
> > > > > set sel2 [atomselect top "index 51 to 99"]
> > > > > $sel1 set beta 1.0
> > > > > $sel2 set beta 2.0
> > > > > $sel1 delete
> > > > > $sel2 delete
> > > > >
> > > > > You could just as easily have made the selections something else:
> > > > > set sel1 [atomselect top "x > 0"]
> > > > > set sel2 [atomselect top "x < 0"]
> > > > >
> > > > > Then set the rep coloring mode to "beta" and use the color scale
> > > > > data range and color scale controls to tweak if necessary.
> > > > > Do you need more of an example than this or does this make it
> clear?
> > > > >
> > > > > John Stone
> > > > > vmd_at_ks.uiuc.edu
> > > > >
> > > > > On Mon, Mar 13, 2006 at 02:12:09PM -0600, Jeffrey Tseng wrote:
> > > > > > Hi, John
> > > > > > Thanks for your quick responding and helpful comments.
> > > > > >
> > > > > > Yes, you are right. If I split the selection into parts. The
> > > > > > reprensentation is not what I want.
> > > > > >
> > > > > >
> > > > > > I would like to try the other way that you suggest, which is to
> use
> > > > > per-atom
> > > > > > data fields such as "user" or "occupancy".
> > > > > >
> > > > > > Could you please use my example I gave in the previous email to
> show
> > > how
> > > > > to
> > > > > > color different selections of the same repesentation?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Also, I found that in KS website, there is one example. It
> looks
> > > like a
> > > > > > perfect example.
> > > > > > Here is link.
> > > > > >
> http://www.ks.uiuc.edu/Research/vmd/allversions/repimages/surf.jpg
> > > > > > If you know how to generate it, I wonder if the vmd script is
> > > > > available.
> > > > > >
> > > > > > Thanks a lot,
> > > > > >
> > > > > > -Jeffrey
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 3/13/06, John Stone <johns_at_ks.uiuc.edu> wrote:
> > > > > > >
> > > > > > >
> > > > > > > Hi,
> > > > > > > A representation can only have one coloring method active at a
> > > time.
> > > > > > > If you use the ColorID coloring method, then that eliminates
> the
> > > > > > > possibility
> > > > > > > of having two colors at once for a given selection. You could
> > > either
> > > > > > > split
> > > > > > > your atom selection into two parts and make one representation
> for
> > > > > each,
> > > > > > > coloring them differently (which may not work very well for
> your
> > > Surf
> > > > > > > representation), or you can assign values to one of the
> per-atom
> > > > > > > data fields such as "user", "beta", "occupancy", etc, and then
> > > color
> > > > > > > by that data field rather than by ColorID. Let me know if you
> > > need
> > > > > > > more help with this.
> > > > > > >
> > > > > > > John Stone
> > > > > > > vmd_at_ks.uiuc.edu
> > > > > > >
> > > > > > > On Sun, Mar 12, 2006 at 02:52:15PM -0600, Jeffrey Tseng wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > Is it possible to change the color of subset of the
> selection
> > > ?
> > > > > > > >
> > > > > > > > Here is an example:
> > > > > > > > ###########################
> > > > > > > > mol representation SURF 1.4
> > > > > > > > atomselect macro myselect {
> > > > > > > > resname ASN and resid 273 and name OD1
> > > > > > > > or resname ASP and resid 269 and name OD2
> > > > > > > > or resname ASP and resid 269 and name OD1
> > > > > > > > or resname ASP and resid 269 and name CG
> > > > > > > > or resname HIS and resid 268 and name NE2
> > > > > > > > or resname LEU and resid 210 and name CD1
> > > > > > > > or resname LEU and resid 210 and name CG
> > > > > > > > or resname LEU and resid 210 and name CB
> > > > > > > > or resname LEU and resid 210 and name N
> > > > > > > > }
> > > > > > > >
> > > > > > > > mol selection {myselect}
> > > > > > > > mol color colorID 12
> > > > > > > > mol addrep top
> > > > > > > >
> > > > > > > > ########################################
> > > > > > > >
> > > > > > > > Now myselect will be colored "green" surface.
> > > > > > > >
> > > > > > > >
> > > > > > > > Here is the subselction
> > > > > > > >
> > > > > > > > mol selection {
> > > > > > > > resname ASN and resid 273 and name OD1
> > > > > > > > or resname ASP and resid 269 and name OD2
> > > > > > > > or resname ASP and resid 269 and name OD1
> > > > > > > > or resname ASP and resid 269 and name CG
> > > > > > > > }
> > > > > > > >
> > > > > > > >
> > > > > > > > I would like to make the subselection colored "red" and the
> > > surface
> > > > > > > > representation can not be changed.
> > > > > > > >
> > > > > > > > Is there any good way to make this task happen ?
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks in advance.
> > > > > > > >
> > > > > > > > -Jeffrey
> > > > > > >
> > > > > > > --
> > > > > > > NIH Resource for Macromolecular Modeling and Bioinformatics
> > > > > > > Beckman Institute for Advanced Science and Technology
> > > > > > > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > > > > > > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > > > > > > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> > > > > > >
> > > > >
> > > > > --
> > > > > NIH Resource for Macromolecular Modeling and Bioinformatics
> > > > > Beckman Institute for Advanced Science and Technology
> > > > > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > > > > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > > > > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> > > > >
> > >
> > > --
> > > NIH Resource for Macromolecular Modeling and Bioinformatics
> > > Beckman Institute for Advanced Science and Technology
> > > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> > >
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
>