Surphace representation of multi-model pdb and moovie recording

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

Hello, Do you need only part of the surface transparent? I did have the same problem with only part of the surface transparent, e.g. open 1plx coordset true surf transp :tyr 80 coordset #1 ... but when I make the whole surface transparent, it works for all of the trajectory frames, e.g. open 1plx coordset true surf transp 80 coordset #1 Another possibility is to show the surface as mesh, but that also applies to the whole surface: surface style mesh <https://www.cgl.ucsf.edu/home/meng/chimerax/vdocs/user/commands/surface.html...> About how to make the surface calculation simpler, you could use a bigger "gridSpacing" value with the "surface" command, e.g.: surf grid 2 <https://www.cgl.ucsf.edu/home/meng/chimerax/vdocs/user/commands/surface.html> Alternatively, you could use "resolution" with the "surface" command but by default that would make a Gaussian surface that does not retain association with individual atoms, so again you wouldn't be able to specify only certain residues as transparent because the surface wouldn't "know" which parts go with which atoms. See surface help link above for details. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
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

Oops, I accidentally sent help links to my own "preview" documentation. The official links are instead: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/surface.html#style>
On Dec 4, 2023, at 10:25 AM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hello, Do you need only part of the surface transparent? I did have the same problem with only part of the surface transparent, e.g.
open 1plx coordset true surf transp :tyr 80 coordset #1
... but when I make the whole surface transparent, it works for all of the trajectory frames, e.g.
open 1plx coordset true surf transp 80 coordset #1
Another possibility is to show the surface as mesh, but that also applies to the whole surface:
surface style mesh
<https://www.cgl.ucsf.edu/home/meng/chimerax/vdocs/user/commands/surface.html...>
About how to make the surface calculation simpler, you could use a bigger "gridSpacing" value with the "surface" command, e.g.:
surf grid 2
<https://www.cgl.ucsf.edu/home/meng/chimerax/vdocs/user/commands/surface.html>
Alternatively, you could use "resolution" with the "surface" command but by default that would make a Gaussian surface that does not retain association with individual atoms, so again you wouldn't be able to specify only certain residues as transparent because the surface wouldn't "know" which parts go with which atoms. See surface help link above for details.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
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/

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 https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10282 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/

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 
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
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10282
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/

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
[image: 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
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10282
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/

In my tests, it already works on the whole trajectory to use this command:
rainbow protein targ cs palette Paired-12
However, it is a coloring command (rainbow = color sequential) so if you wanted transparency on the protein surface, you may need to also include the transparency option in the rainbow command. See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#sequential> Elaine
On Dec 5, 2023, at 2:43 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10282
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/

Thank you very much Elaine, it works !! Cheers Enrico Il giorno mar 5 dic 2023 alle ore 18:18 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
In my tests, it already works on the whole trajectory to use this command:
rainbow protein targ cs palette Paired-12
However, it is a coloring command (rainbow = color sequential) so if you wanted transparency on the protein surface, you may need to also include the transparency option in the rainbow command.
See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#sequential>
Elaine
On Dec 5, 2023, at 2:43 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
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
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/10282
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/
participants (3)
-
Elaine Meng
-
Enrico Martinez
-
Tom Goddard