1
$\begingroup$

I am using the software Chimera X to visualize the 3d composition of molecules. I am very new to Chimera and only use it for visualization. The files I'm using are cmm files (xml-formatted) basically looking like below:

...
<marker id="14" x="0.018" y="-0.180" z="0.215" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="15" x="-0.032" y="-0.191" z="0.241" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="16" x="-0.033" y="-0.117" z="0.246" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="17" x="0.020" y="-0.138" z="0.244" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="18" x="0.047" y="-0.083" z="0.280" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="19" x="0.073" y="-0.061" z="0.240" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="20" x="0.010" y="-0.068" z="0.271" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
...
<link id1="0" id2="1" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="1" id2="2" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="2" id2="3" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="3" id2="4" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="4" id2="5" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
...

i.e. just a simple polymer consisting of alot of markers (spheres) and links between them (cylinders), and with colors for each one specified in rgb (see here). This is all well and good, but now I would like to set transparency for a subset of the markers and associated links. Preferably I would set this directly in the attributes in the cmm files, but I cannot find how to do this. The manual does mention that colours in general can be set with rgba where a means alpha level, but when trying to set a like seen in the xml block above, nothing happens (I tried values close to both 0 and 1; no difference)

The manual documents a function called 'transparency' which I tried to use with for example transparency 50,a #0:10-1200 to make atoms 10-1200 50% transparent. But I just get the error: "Missing or invalid "percent" argument: Expected a number". If I only type transparency 50 everything does turn transparent, however, I wouldn't really call it transparent since I cannot really see through them to see the other molecules on the other side, they just turn bleak.

Questions:

  1. (Would someone explain how I could simply change the actual transparency of a large set of markers and links) (preferably by loading some file with specified marker id:s)? Also, is it possible to assign this directly in the cmm files, and if so, how?

UPDATE: The command transparency #1:2492-end 90 'All' worked to set the transparency of markers e.g. 2492-end. What I would still like to know is if it is possible to set this directly in the cmm-files.

$\endgroup$
7
  • $\begingroup$ RGBA color values are an extension of RGB color values with an alpha channel - which specifies the opacity for a color. An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). , what does the a="0" do in your xml formatted markers and links ? $\endgroup$
    – pippo1980
    Sep 20, 2023 at 13:04
  • $\begingroup$ So, the 'a="0"' was a naive attempt by me to set the alpha-level directly in the xml file, which as I noted above did not work. I have since figured out how to set the transparency and will update my question. $\endgroup$
    – ciru_4011
    Sep 20, 2023 at 15:59
  • $\begingroup$ you should try to report the bug a = 0 not working to chimerax developers. To report a problem with ChimeraX: If possible, please use Help... Report a Bug in the ChimeraX menu. Otherwise (for example, if ChimeraX will not start), send e-mail to [email protected], making sure to include any information needed to reproduce the problem: program version, specific data, actions/steps taken, etc. The information will be publicly accessible, so do not include data or descriptions that you wish to remain private. from cgl.ucsf.edu/chimerax/docs/contact.html $\endgroup$
    – pippo1980
    Sep 20, 2023 at 16:47
  • 1
    $\begingroup$ I will look in to that, however I am not certain it is a bug: Even though it seems very reasonable to be able to set it that way, that was a guess on my part. The general support of rgba colors is however otherwise documented in the manual. Regarding your suggested edit: The markers are literally referred to as 'atoms' in Chimera, and it is those which I wish to make transparent. (I am however changing it to 'marker' as a compromise =).) $\endgroup$
    – ciru_4011
    Sep 21, 2023 at 7:18
  • $\begingroup$ A marker is a pseudoatom, typically used to mark the position of some feature within volume data; markers are implemented as atoms, so actions that apply to atoms in ChimeraX also apply to markers: they can be specified in commands, selected, etc. cgl.ucsf.edu/chimerax/docs/user/markers.html $\endgroup$
    – pippo1980
    Sep 21, 2023 at 7:26

1 Answer 1

0
$\begingroup$

Ok, this is not an answer, but to better visualize the problem I recreated the question/answer on Chimera that has a different syntax for the transparency command see : https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/transparency.html and https://www.cgl.ucsf.edu/chimerax/docs/user/commands/transparency.html .

Input file is marker.cmm , to be opened in FILE MENU of VOLUME TRACER from VOLUME MENU :

<marker_set name="marker set 1">
<marker id="14" x="0.018" y="-0.180" z="0.215" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="15" x="-0.032" y="-0.191" z="0.241" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="16" x="-0.033" y="-0.117" z="0.246" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="17" x="0.020" y="-0.138" z="0.244" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="18" x="0.047" y="-0.083" z="0.280" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="19" x="0.073" y="-0.061" z="0.240" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<marker id="20" x="0.010" y="-0.068" z="0.271" r="1.000000" g="0.254900" b="0.050980" a="0" radius="0.018754" />
<link id1="14" id2="15" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="15" id2="16" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="17" id2="18" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="18" id2="19" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
<link id1="19" id2="20" r="0.800000" g="0.800000" b="0.000000" a="0" radius="0.006251"/>
</marker_set>

Image before command :

enter image description here

Image after transparency 50,a,b #0:16-end

(#0 being 0 model as the only loaded model on my Chimera instance) :

enter image description here

Better transparency visualizations :

enter image description here

enter image description here

Dont get why a='50' or a='0.5' in marker,link definition dont work with chimera too

$\endgroup$
1
  • 1
    $\begingroup$ Together with my edited question I think this all suffice as "good enough" for now at least. I am satisfied for the moment just using something like transparency #1:2492-end 90 'All', but I guess when I get more complicated regions it would be good to be able to load the marker spec, i.e. e.g. #1:2492-2500, 3000-3500, ... from a file if that is possible. But I guess one can run command-files right? and I suppose there's no limit on the length on the spec, so perhaps I could just create one very long command in a file. (Many thanks for your efforts!!! unfortunately I need more rep to upvote) $\endgroup$
    – ciru_4011
    Sep 21, 2023 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.