Maybe you did something slightly differently the first time. You
definitely need [ ] around a color:

var ccc = ['xD9FFFF', 'xCC80FF', 'xC2FF00', 'xFFB5B5', 'x909090'];
for (var j=1;j<6;j++); select resNo=j; color @{"[" + ccc[j] + "]"}; end for;

or

var ccc = ['[xD9FFFF]', '[xCC80FF]', '[xC2FF00]', '[xFFB5B5]', '[x909090]'];
for (var j=1;j<6;j++); select resNo=j; color @{ccc[j]}; end for;


On Mon, Aug 20, 2012 at 3:17 PM, Angel Herráez <[email protected]> wrote:
> Hi all
>
> I am trying to custom-color per residue in a pdb file (color group does not
> work here for some reason; it is not a protein chain but a collection of
> separate lipids)
>
> After several tries, this is working when entered in the console of Jmol app
> 12.2.17:
>
> var ccc = ['xD9FFFF', 'xCC80FF', 'xC2FF00', 'xFFB5B5', 'x909090'];
> for (var j=1;j<6;j++); select resNo=j; color @{ccc[j]}; end for;
>
> However, when I put it in a script file no coloring is applied.
> Why is the difference?
>
> (the example has been cut, I really have 55 residues so this can't be done
> manually)
>
> Thanks for any tips
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to