VMD-L Mailing List
From: Justin Gullingsrud (justin_at_ks.uiuc.edu)
Date: Fri Feb 18 2000 - 10:25:50 CST
- Next message: Robert Milius: "msms & vmd"
- Previous message: Timm Essigke: "Setting colors"
- In reply to: Timm Essigke: "Setting colors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
I think the command you want is "mol modcolor". This changes the coloring
style of the atoms that are already represented in the graphics form. The
syntax is
mol modcolor <rep number> <mol number> <style name>
The representations are numbered starting from 0, and the molecules are
numbered from 0 in the order they are created. For <style name> you would
put one of the coloring methods that you see on the graphics form, enclosed
in quotes; for example, "ResID", "Pos", and so forth. The only oddball
is "ColorID": for this one you have to add an extra argument at the end of
the command for the color index. For example,
mol modcolor 2 0 "ColorID" 5
changes the _third_ representation in molecule 0 to be colored as color index
5.
beta and occupancy are fields associated with every atom that you can set
to any floating point value; these can be used in combination with
'mol modcolor 0 0 "Beta" ' to color your system any way you want. The
command "display update" is supposed to force a redraw but doesn't seem to
work reliably; I'll look into that. For now, if you enter something like
set sel [atomselect top all]
$sel set beta 0.3
mol modcolor 0 0 "Beta"
the modcolor command will cause VMD to update the display.
Good luck, and let us know if you have any more questions.
Justin Gullingsrud
justin_at_ks.uiuc.edu
>
> Dear list members,
>
> maybe its an easy question, but I can't find an answer in the user
> guide...
>
> I want to set the color of some atoms by a script. So I tried something
> like:
>
> set sel [atomselect top "index 5"]
> $sel set color 0.1
> or
> $sel set ColorID 0.1
>
> But this doesn't work.
> As a workaround I tried:
>
> $sel set beta 0.3
>
> This works, but I have to klick on "Apply Changes" in the "Graphical
> Representation" dialog to visualize it. What is the command for it?
> ("update" doesn't work)
>
>
>
> Timm Essigke
>
>
>
>
-- Justin Gullingsrud 3111 Beckman Institute H: (217) 384-4220 W: (217) 244-8946 The time of purification is at hand...
- Next message: Robert Milius: "msms & vmd"
- Previous message: Timm Essigke: "Setting colors"
- In reply to: Timm Essigke: "Setting colors"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]