From: Luca Bellarosa (lbellarosa_at_ICIQ.ES)
Date: Wed Apr 09 2014 - 09:29:21 CDT

Hi everybody,

my name is Luca and I'm preparing the video of a dynamics (25 ps) using VMD. During this trajectory, some atoms change their coordination and I wanted to highlight this phenomenon by changing smoothly the colors of the atom. Unfortunately, I cannot manage to even change the color during a given femtosecond.

My goal is the following:
-) When the atom is 4-fold coordinated, the atom is yellow (RGB 1 1 0.36).
-) When the atom is 5-fold coordinated, the atom is orangish (RGB 0.9 0.5 0.18).
-) When the atom is 6-fold coordinated, the atom is red (RGB 0.8 0 0).

I wrote a tcl script with the following commands:

---------------------tcl script--------------------------------------------------------------------------------
# I read the coordination "c" from a file; "c" can be any real value between 4 and 6.

set ix [expr {1.00 - ($c-4)*0.10}]
set iy [expr {1.00 - ($c-4)*0.50}]
set iz [expr {0.36 - ($c-4)*0.18}]

color atom 262 { $ix $iy $iz } # I chose the atom 262, but it can be anything

---------------------tcl script--------------------------------------------------------------------------------

But it gives me the following message: "Unable to change color name". I think I know how I can do it for all the frames, but I need to solve this problem with just one frame.

Thank you in advance for any help you can give me,

Luca

________________________________
 Luca Bellarosa
 Postdoc Researcher, Institut Català d’Investigació Química (ICIQ)
 Av. Països Catalans 16 – 43007 Tarragona
 Tel +34 977920229 (Ext. 307) – Fax +34 977920231

 lbellarosa_at_iciq.es
________________________________

Dalla scuola di guerra della vita. Tutto ciò che non mi uccide, mi rafforza. (F.Nietzsche, "Il crepuscolo degli idoli")