Dear all,
Thank you very much for your kind suggestions !!!
Indeed using the following chain of command lines I could apply the transparency of different parts of the model in proper way

# surface protein
surface protein grid 1

# surface lipids
surface :OL,PA,PE,PC grid 2

transparency #1 80
# transparency on protein
color ~:OL,PA,PE,PC lightgray surface transparency 90

# transparency on lipids
color ~protein coral surface transparency 80
# change color of lipid headgroups only
color :PC purple surface transparency 80


one question: would it be possible to color the surface of the protein according to the palette (presently its works only on one snapshot not on the whole trajectory):

# color surface and cartoon of protein
rainbow protein targ cs palette Paired-12

Yours with thanks

Enrico

Il giorno mar 5 dic 2023 alle ore 02:50 Tom Goddard <goddard@sonic.net> ha scritto:
Hi Enrico,

The perframe method works fine for recording a movie.  But if you are just looking at the trajectory interactively in ChimeraX by moving the slider here is a tricky way to make that work.  The idea is that the surface code does keep the transparency when the whole surface is one color and one transparency.  And in fact it also works if you start with one color and one transparency, and then make part of the surface opaque.  Here's an example:

open 1plx coordsets true
surface
transparency #1 80
color :1-3 pink surface transparency 0

For your scenario you would probably use

transparency #1 80
color ~:OL,PA,PE,PC lightgray surface transparency 0

The second command has to be the color command, and not the transparency command in order for the trajectory playback to update the surface properly because it makes the colors update as the surface changes.

Tom

transparent_hole.png

On Dec 4, 2023, at 1:45 PM, Tom Goddard <goddard@sonic.net> wrote:

Hi Enrico,

  The fact that ChimeraX loses the surface transparency when you play the trajectory is a bug.  I'll look at whether that is easy to fix.  But for now you can set the transparency each frame using command the perframe command.  Here's the example from Elaine's email using perframe.

open 1plx coordset true
perframe "coord #1 $1 ; surf close ; surf update false ; transparency :TYR 75" frames 80

The perfame command runs the sequence of commands separated by semicolons.  So it first sets which time point of the trajectory is shown.  The $1 is replaced with the frame number 1, then 2, then 3, up to 80 in this example.  Then the commands close the previous surface and create a new one with "update false" which means don't recompute the surface when the atoms move.  And the last command sets the transparency.  This sequence is run 80 times, before each frame is drawn.  The two surface commands are needed because of an obscure technical issue.  The molecular surface normally gets recomputed when the atoms move just before the frame is drawn, which would be after the transparency command and that would undo the transparency.  So we need the "surface update false" to prevent that from happening, and since we are no longer updating the surface we need the "surface close" to remove the old non-updating surface.

  Here is the bug report I made for this problem


  Tom



On Dec 4, 2023, at 3:32 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Dear Chimera-X users !

I am working on molecular visualization of membrane system from the md
trajectory loaded in the Chimera-x using the open coordset true
command.

The issue is with the surface representation of the membrane:
transparency :OL,PA,PE,PC 80 target s
which are applied only on the current frame (not on the whole trajectory).

Also when I try to make a movie of the system the presence of the
surface does slow down everything. Which options could be useful e.g.
to decrease the quality of the surface representation ?

Many thanks in advance

Enrico
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/