<div dir="ltr">Hi Eric, <div><br></div><div>this script works perfectly! thank you </div><div><br></div><div>P</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 22 mar 2019 alle ore 01:35 Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu">pett@cgl.ucsf.edu</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Here’s a Python script that will write out the atoms and distances of currently selected pseudobonds to a file named “pb_info.txt” in your home directory. Run it simply by opening it.<br>
<br>
—Eric<br>
<br>
<br>
<br>
> On Mar 21, 2019, at 1:49 PM, Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" target="_blank">meng@cgl.ucsf.edu</a>> wrote:<br>
> <br>
> P.S. I guess you could use the same process are you are already using now to save only the crosslink subset of interest to a pb file, convert just those to distance measurements, and then use distance save.<br>
> <br>
> Depending on how many subsets you have, that might be better than making one giant set of distances, writing them all, and then post-processing to extract the subsets of interest.<br>
> <br>
> Elaine<br>
> <br>
>> On Mar 21, 2019, at 1:40 PM, Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" target="_blank">meng@cgl.ucsf.edu</a>> wrote:<br>
>> <br>
>> Hi Pascal,<br>
>> I should mention that Tom’s away for a few weeks. <br>
>> <br>
>> In the meanwhile, I don’t have any good suggestions.<br>
>> <br>
>> One not-so-good idea is to initially define all these pseudobonds as distance monitors instead of generic pseudobonds. I.e. instead of reading in a pb file that lists pairs of atoms, read in a ChimeraX command file (.cxc) with the same number of lines of pairs of atoms but with the word “distance” before each pair. <br>
>> <br>
>> <<a href="http://rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files" rel="noreferrer" target="_blank">http://rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files</a>><br>
>> <<a href="http://rbvi.ucsf.edu/chimerax/docs/user/commands/distance.html" rel="noreferrer" target="_blank">http://rbvi.ucsf.edu/chimerax/docs/user/commands/distance.html</a>><br>
>> <br>
>> Then you could use “distance save” to save all the distances (automatically sorted from shortest to longest) to a text file, and then post-process the text file to get subsets of interest. <br>
>> <br>
>> If the pbonds weren’t originally from a pb file but defined in some other way (e.g. by a plugin) you can write them to a pb file using “save” with “format pseudobonds”<br>
>> <<a href="http://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html" rel="noreferrer" target="_blank">http://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html</a>><br>
>> <br>
>> I realize it would not be very convenient, however — sorry!<br>
>> Elaine<br>
>> -----<br>
>> Elaine C. Meng, Ph.D.<br>
>> UCSF Chimera(X) team<br>
>> Department of Pharmaceutical Chemistry<br>
>> University of California, San Francisco<br>
>> <br>
>>> On Mar 21, 2019, at 9:20 AM, Pascal Albanese <<a href="mailto:pascal.albanese@polito.it" target="_blank">pascal.albanese@polito.it</a>> wrote:<br>
>>> <br>
>>> Thank you, <br>
>>> the command works perfectly and it's easier to manage subsets of pseudobonds. <br>
>>> <br>
>>> I would have a last request to facilitate the analysis of crosslinks: is it possible to add a feature by which we can extract also the distances from the selected pseudobonds? even if added as a tab column in the exported .pb file. This is because with large datasets it is impossible to visualize distances with either the histogram or on the screen. <br>
>>> <br>
>>> Thanks a lot, <br>
>>> Pascal<br>
>>> <br>
>>> Il giorno ven 15 mar 2019 alle ore 22:24 Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>> ha scritto:<br>
>>> Hi Pascal,<br>
>>> <br>
>>> If you click an edge of the crosslink network graph then it will select just the crosslinks corresponding to that edge, for example the 8 crosslinks between chains C and D in the example image below. I made that graph using command "crosslink network #2" and clicking on the CD edge only selects the #2 crosslinks, not a different set of crosslinks such as model #3. I tested this and it is working in the current ChimeraX. You will probably need to zoom your graph so you can actually see an edge -- use shift drag on the graph to zoom it, and alt drag (or some similar modifier) to translate the graph so you can see it better.<br>
>>> <br>
>>> Now the trouble is in your example you wanted crosslinks involving 4 chains #1/r/R and #2/r/R with both upper and lowercase R chains. When you click on an edge in the graph it selects only those crosslinks between 2 chains, all others are unselected. So it won't do what you need. Might be nice to let shift-click on an edge add to the selection, but that could get pretty tedious if you need to show connections between several chains. So a command is a better choice. Here are two commands to select the pseudobonds in crosslink model #5<br>
>>> <br>
>>> select #1/r/R #2/r/R & #5 min 6 max 35<br>
>>> <br>
>>> The "& #5" part means intersect with model #5. Or maybe slightly clearer using 2 commands<br>
>>> <br>
>>> select #1/r/R #2/r/R min 6 max 35<br>
>>> select intersect #5<br>
>>> <br>
>>> These command approaches did not work in the current ChimeraX because of two separate bugs that I just fixed, so they will work in tomorrow's ChimeraX.<br>
>>> <br>
>>> Tom<br>
>>> <br>
>>> <Screen Shot 2019-03-15 at 2.14.46 PM.png><br>
>>>> On Mar 15, 2019, at 3:42 AM, Pascal Albanese wrote:<br>
>>>> <br>
>>>> Hi Elaine, <br>
>>>> <br>
>>>> Sorry for the late response. So I don't know if I maybe have some issue <br>
>>>> I see the connecting edges in the network window, but I can only select chains (individual chains) and the subset of pbonds are not selected:<br>
>>>> <image.png><br>
>>>> Probably is my system which is a bit complicated... somehow the pbonds can be related to individual chains or group of them? like: sel #2.1/R #2.1/r #1.1/R #1.1/r (to select the model) pbonds #3 min 6 max 35 (to select the corresponding pbonds, in which previous chains R and r are involved). And then i can save the subselection of pbonds?<br>
>>>> <br>
>>>> thanks for your help, i can share session if needed, <br>
>>>> <br>
>>>> Pascal<br>
>>>> <br>
>>>> Il giorno ven 8 mar 2019 alle 18:20 Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" target="_blank">meng@cgl.ucsf.edu</a>> ha scritto:<br>
>>>> Hi Pascal,<br>
>>>> On the crosslinks network, clicking the edge between two chains selects the corresponding pseudobonds (those between the two chains). Is that what you mean?<br>
>>>> <br>
>>>> <<a href="http://rbvi.ucsf.edu/chimerax/docs/user/commands/crosslinks.html#network" rel="noreferrer" target="_blank">http://rbvi.ucsf.edu/chimerax/docs/user/commands/crosslinks.html#network</a>><br>
>>>> <br>
>>>> Or if you meant all those between the two chains, plus the ones within each chain, then Tom’s example command selecting pseudobonds of chains A and B should work.<br>
>>>> <br>
>>>> I hope this helps,<br>
>>>> Elaine<br>
>>>> -----<br>
>>>> Elaine C. Meng, Ph.D. <br>
>>>> UCSF Chimera(X) team<br>
>>>> Department of Pharmaceutical Chemistry<br>
>>>> University of California, San Francisco<br>
>>>> <br>
>>>>> On Mar 8, 2019, at 6:21 AM, Pascal Albanese <<a href="mailto:pascal.albanese@polito.it" target="_blank">pascal.albanese@polito.it</a>> wrote:<br>
>>>>> <br>
>>>>> Dear Tom, <br>
>>>>> Thank for the add, it works and is very useful. However, I don't know if I might haven't explained well: I have a complex set of pseudobonds (let's say #2) involving several Chains of #1. In the "crosslinks network" feature I'm able to subselect chains, but not subgroups of pseudobonds involving, for instance, chains A and B (can be either clicking on the network or with the command line). Would be possible to add this? <br>
>>>>> Thanks!<br>
>>>>> Pascal<br>
>>>>> <br>
>>>>> Il giorno mer 6 mar 2019 alle 21:33 Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>> ha scritto:<br>
>>>>> Hi Pascal,<br>
>>>>> <br>
>>>>> I added the ability to save pseudobond files (.pb suffix) in ChimeraX, will be in tonight's builds,<br>
>>>>> <br>
>>>>> select /A,B min 15 max 24<br>
>>>>> save somelinks.pb selectedOnly true<br>
>>>>> <br>
>>>>> This saves crosslinks between chains A and B with lengths between 15 and 24. The link colors and radii are also saved.<br>
>>>>> <br>
>>>>> Tom<br>
>>>>> <br>
>>>>>> On Mar 6, 2019, at 2:33 AM, Pascal Albanese wrote:<br>
>>>>>> <br>
>>>>>> Dear ChimearX Users and developers, <br>
>>>>>> I'm using ChimeraX for visualization and analysis of pseudobonds datasets from Crosslinking-MS and i found new features very useful (min max selection etc). <br>
>>>>>> I think it would be useful (but i don't know how much effort will be required) to be able to select subsets of distances (e.g. form 15 to 24 Angstroms, or involving chain A and B) and being able to create and export these subsets. for instance i have a Complex of A, B and C and i want to select all pseudo-bonds involving A and B and export them as pb file (to be able to load them as a separate model lateron). Or to sel min 15 max 24, and then export them as pb file (with "save" function). <br>
>>>>>> <br>
>>>>>> I think it would be really useful for both crosslinks visualization and analysis (i work with datasets of thousands of crosslinks on big complexes which make difficult to subselect them, i have to do it with pymol, then generate subsets and reformat them as .pb files). <br>
>>>>>> <br>
>>>>>> i had a look to previous threads, but i didn't found similar topics. If i'm wrong my apologize.<br>
>>>>>> Thank you!<br>
>>>>>> Pascal<br>
>>>> <br>
>> <br>
>> <br>
>> _______________________________________________<br>
>> ChimeraX-users mailing list<br>
>> <a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>
>> Manage subscription:<br>
>> <a href="http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" rel="noreferrer" target="_blank">http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br>
>> <br>
> <br>
> <br>
> _______________________________________________<br>
> ChimeraX-users mailing list<br>
> <a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>
> Manage subscription:<br>
> <a href="http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" rel="noreferrer" target="_blank">http://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br>
> <br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><p style="margin:0cm 0cm 0.0001pt"><font face="times new roman, serif" size="2">Pascal Albanese, PhD</font></p><p style="margin:0cm 0cm 0.0001pt"><font size="1" face="arial, helvetica, sans-serif"><b>Post-doc</b>, Politecnico di Torino<br></font></p><p style="margin:0cm 0cm 0.0001pt"><font size="1" face="arial, helvetica, sans-serif">Dipartimento DISAT,</font></p><p><font size="1" face="arial, helvetica, sans-serif">BioSolar Lab@Environment Park</font></p><p><span style="font-family:arial,helvetica,sans-serif;font-size:x-small">Via Livorno 60</span></p><p><font size="1" face="arial, helvetica, sans-serif">10144 Torino</font></p><p style="margin:0cm 0cm 0.0001pt"><font size="1" face="arial, helvetica, sans-serif">e-mail: <a href="mailto:pascal.albanese@polito.it" target="_blank">pascal.albanese@polito.it</a> </font><br></p><p style="margin:0cm 0cm 0.0001pt"><font size="1"><br></font></p><font size="1">Phone number: <a href="tel:+39%20011%20225%207655" value="+390112257655" style="color:rgb(17,85,204)" target="_blank">+39 011 2257655</a></font><br><div><br></div></div></div>