<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="4"><font face="monospace">Hi Elaine, <br>
<br>
thank you for your help. <br>
<br>
Unfortunately, I wasn't able to get it to work, the command
transparency asks for a value (percent) and doesn't recognize
the $2 range as this value. <br>
<br>
I was able to get it to work with this instead: <br>
color #1 blue<br>
transparency #1.1 90 cartoon<br>
transparency #1.2 85 cartoon<br>
transparency #1.3 80 cartoon<br>
transparency #1.4 70 cartoon<br>
transparency #1.5 70 cartoon<br>
transparency #1.6 65 cartoon<br>
transparency #1.7 60 cartoon<br>
transparency #1.8 55 cartoon<br>
transparency #1.9 50 cartoon<br>
transparency #1.10 45 cartoon<br>
transparency #1.11 40 cartoon<br>
transparency #1.12 35 cartoon<br>
transparency #1.13 30 cartoon<br>
transparency #1.14 25 cartoon<br>
transparency #1.15 20 cartoon<br>
transparency #1.16 15 cartoon<br>
transparency #1.17 10 cartoon<br>
transparency #1.18 5 cartoon<br>
graphics silhouettes true<br>
<br>
Brute force but it works... <br>
<br>
Best<br>
Vincent<br>
<br>
</font></font><br>
<div class="moz-cite-prefix">Le 20/01/2023 à 17:52, Elaine Meng a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:3984A147-B32C-4A43-8F58-73CEE731F44A@cgl.ucsf.edu">
<pre class="moz-quote-pre" wrap="">Hi Vincent,
My first thought was simply to define the palette with transparent colors. However, to my surprise, this does not work (transparency in the palette is ignored)...
<a class="moz-txt-link-rfc2396E" href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#sequential"><https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#sequential></a>
<a class="moz-txt-link-rfc2396E" href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options"><https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options></a>
<a class="moz-txt-link-rfc2396E" href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html"><https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html></a>
For example, to rainbow chains from opaque cyan to 80% transparent blue, I tried:
open 4hhb
rainbow chains palette rgba(0.0,1.0,1.0,1.0):rgba(0.0,0.0,1.0,0.2)
...but this ignores the "alpha" value (1-transparency).
The long way is instead to use a series of "transparency" commands, one for each structure. This will preserve their existing colors, just change their transparency, e.g.:
transparency #2 80 target ars
("ars" means atoms, ribbons, surface... if you don't include that, default is surface only)
<a class="moz-txt-link-rfc2396E" href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/transparency.html"><https://rbvi.ucsf.edu/chimerax/docs/user/commands/transparency.html></a>
HOWEVER, the "perframe" command provides a sneaky way to loop and put the multiple transparency settings in a single command, e.g.
open 1plx
tile
style sphere
perframe 'transparency #1.$1 $2 target ars' range 1,80 range 0,80 frames 80
In this perframe command, the first range substitutes $1, so it goes from 1plx model #1.1 to #1.80, and the second range substitutes the transparency value from 0 to 80%. Fancy! But it takes some thought and usually some trial and error to fabricate the correct "perframe" command. See the help:
<a class="moz-txt-link-rfc2396E" href="https://rbvi.ucsf.edu/chimerax/docs/user/commands/perframe.html"><https://rbvi.ucsf.edu/chimerax/docs/user/commands/perframe.html></a>
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">On Jan 20, 2023, at 2:53 AM, vincent Chaptal via ChimeraX-users <a class="moz-txt-link-rfc2396E" href="mailto:chimerax-users@cgl.ucsf.edu"><chimerax-users@cgl.ucsf.edu></a> wrote:
Hi,
I'm rendering a series of models using this command line (which works very well):
rainbow #1 structures palette cyan:blue
I would like to do the same but in a series of transparent models, with a range from 0 to 80 (or similar).
Is there a command for this, I couldn't find it?
Thanks a lot.
Vincent
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1671.6">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #000000; -webkit-text-stroke: #000000; min-height: 14.0px}
span.s1 {font-kerning: none}
</style>
<p class="p1"><span class="s1">Vincent Chaptal, PhD</span></p>
<p class="p1"><span class="s1">Director of GdR APPICOM</span></p>
<p class="p1"><span class="s1">Drug Resistance and Membrane
Proteins Lab</span></p>
<p class="p2"><span class="s1"></span><br>
</p>
<p class="p1"><span class="s1">MMSB -UMR5086</span></p>
<p class="p1"><span class="s1">7 passage du Vercors<span
class="Apple-converted-space"> </span></span></p>
<p class="p1"><span class="s1">69007 LYON</span></p>
<p class="p1"><span class="s1">FRANCE</span></p>
<p class="p1"><span class="s1">+33 4 37 65 29 01</span></p>
<p class="p1"><span class="s1"><a class="moz-txt-link-freetext" href="http://www.appicom.cnrs.fr">http://www.appicom.cnrs.fr</a></span></p>
<p class="p1"><span class="s1"><a class="moz-txt-link-freetext" href="http://mmsb.cnrs.fr/en/">http://mmsb.cnrs.fr/en/</a></span></p>
<p class="p1"><span class="s1"><br>
</span></p>
</div>
</body>
</html>