[Chimera-users] Surfaces and transparency

Esser, Lothar (NIH/NCI) [E] esserlo at mail.nih.gov
Mon Apr 27 16:10:15 PDT 2020


Hi, Elaine, 

Yes, this is trivial. But I rarely want a tan colored surface. 
Surface #0
Scolor #0 zone #0 range 3

Trans 50,s #0

Does not work for me. I tried to color a molecule with 6 chains by chain. I define a different color for each chain with colordef, color each chain (color mycolor #:.A etc.)  and followed by scolor #0 zone #0 range 3 
That works to get the surface colored nicely. However I can't get it transparent easily. 

Your trick with surfcat is rather interesting in its process. 
I can do 
Open model.pdb  # it has six chains. 
Then colordef six different colors
And then
Surcat mysurf #0
Surface mysurf 

Which gives me a uniformly tan surface but the script goes on to 
color col_chain_A #0:.A 
Etc. 
and interestingly the surface changes its color to reflect the chain color - exactly what I needed. 
Trans 50,s mysurf
makes it all nice and transparent. Great. (Even though I don't understand why it works *after* the surface was generated)
But I can never change the color again. Say I think I was wrong with one color. I can change the model but I can't seem to get 
color new_color_A #0:.A 
to work. No automatic update. The chain of course changes color but not the surface. 
Surface mysurf also does not update it. 
However I can do 
surfcat mysurf1 #0
Surface mysurf1
That works. 
However all this is rather cumbersome - I am likely doing something unintended. 
I wanted to animate a change in color of one chain but having a large number of surfcats new_nameX to do seems expensive. 

So while we are at it, surfaces with electrostatic potential or hydrophobicity or bfactors cannot be made transparent ? 

Thanks, 
Lothar


-----Original Message-----
From: Elaine Meng <meng at cgl.ucsf.edu> 
Sent: Monday, April 27, 2020 6:31 PM
To: Esser, Lothar (NIH/NCI) [E] <esserlo at mail.nih.gov>
Cc: chimera-users at cgl.ucsf.edu BB <chimera-users at cgl.ucsf.edu>
Subject: Re: [Chimera-users] Surfaces and transparency

Hi Lothar,
I don't understand... or at least I'm not seeing the problem:

open 3nha
surface
trans 50,s 

(with or without #0, and "surface :adp" instead of "surface") all work fine for me.  All I can say is to check the Model Panel to make sure your surface is really #0.  If you have a reproducible series of commands where it doesn't work (and you are NOT using custom surface coloring by vertex), then you could report it using menu: Help... Report a Bug.

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Apr 27, 2020, at 1:43 PM, Esser, Lothar (NIH/NCI) [E] <esserlo at mail.nih.gov> wrote:
> 
> Hi, Elaine,
> 
> That's a neat trick. It only works with surfcat. 
> 
> If I do
> 
> surface #0
> trans 50,s #0
> No matter what I do the transparency does not change. 
> 
> But with
> Surfcat mystuff
> Surface mystuff
> Trans 50,s
> 
> It works as advertised. Also, I noticed that in the first case with an ineffective "trans 50,s" on the command line, the menu Actions->Surface->Transparency->50% did work. 
> It's only that I rarely use the menu .... partly because changes in transparency may be animated by a script. 
> 
> Thanks.
> Lothar
> 
> -----Original Message-----
> From: Elaine Meng <meng at cgl.ucsf.edu>
> Sent: Monday, April 27, 2020 12:28 PM
> To: Esser, Lothar (NIH/NCI) [E] <esserlo at mail.nih.gov>
> Cc: chimera-users at cgl.ucsf.edu BB <chimera-users at cgl.ucsf.edu>
> Subject: Re: [Chimera-users] Surfaces and transparency
> 
> Hi Lothar,
> It is not related to the VDW parameters, but to automatic classification of sets of atoms and excluding them from what is (by default) enclosed in a surface.  For example, people usually don't expect their ligands, solvent, or metal ions to be lumped together with the macromolecule, so there are automatically defined groupings:
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/surface.html#s
> urfcats>
> 
> You can use "surfcat" to group the atoms any way you want, however.  
> E.g. commands
> 
> surfcat mystuff :adp,mg
> surface mystuff
> 
> The ion is shown as "sphere" (full VDW radius) and if colored separately may show "through" the surface unless you make it smaller, and surface is "chunky" unless you increase vertex density.
> 
> repr bs :mg
> surface mystuff vertexDensity 10
> 
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/msms.html>
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/representation.html#
> surfaces>
> 
> The transparency command works fine for the molecular surface EXCEPT when the surface  has custom coloring by vertex (electrostatic potential, for example).  For custom coloring by vertex you would have to specify the transparency at the time of coloring.
> 
> For example, either of these works fine for the surface that I showed with the commands above, as it was just shown in the initial tan color:
> 
> trans 50,s
> trans 50,s #0
> 
> However, you can color by atomic patch and have it retain its transparency, e.g. the following command applies heteroatom coloring to the atoms in mystuff (ADP, MG although they were already colored that way) as well as the corresponding atomic patches in the molecular surface:
> 
> color byhet mystuff
> 
> Or something like this  will also color both the atoms and the corresponding patches in the molecular surface while the surface retains transparency:
> 
> color orange :adp
> 
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry University of California, San 
> Francisco
> 
>> On Apr 26, 2020, at 11:20 AM, Esser, Lothar (NIH/NCI) [E] <esserlo at mail.nih.gov> wrote:
>> 
>> Hi,
>>  In making surfaces around ligands and making them transparent, I ran into some problems:
>> 
>> Using open/fetch 3NHA I have a molecule in front of me with ADP Mg bound.
>> Creating a surface around ADP is easy but it won’t cover Mg at all. It seems that single ions like Mg and also single water molecules don’t get surfaces around them. Is this because of default vdW values that need to be manually adjusted ?
>> 
>> Let’s say I have a surface around ADP and want to make it 
>> transparent, I thought
>> 
>> Transparency 50,s #0
>> 
>> Should work but it did not. There are some work arounds using transparent colors through the use of colordef.
>> However, I had planned to color the surface by atom and used
>>   scolor #0 zone #0   
>> which worked but I could not get it transparent with transparency 
>> statements. However, I can make atoms transparent then use
>> 
>> scolor #0 zone #0   #which makes the surface also transparent and hides the ball-and-stick model.
>> To make it show up I can use transparency 0,a #0 and again the stick model appears under the transparent surface.
>> 
>> Is there a simpler way ? A way that can be applied to other surfaces that were for instance colored with say potential, hydrophobicity, bfactor key etc ?
>> 
>> Thanks
>> Lothar
> 
> 
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu Manage 
> subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
> 




More information about the Chimera-users mailing list