[chimerax-users] ChimeraX - XMAS pluggin modification questions

Eric Pettersen pett at cgl.ucsf.edu
Mon Apr 25 09:23:38 PDT 2022


Hi Isabel,
	Yes, CoordSets are the way to go.  Assuming you want to extract these distances without necessarily playing through the trajectory/morph, the plan would be:

(1) Get the coordinate set IDs from the structure
(2) Loop through IDs to get coordinate sets
(3) For each set, compute the distance

If your structure was in a variable named 's' and the atoms you wanted to measure the distance between were 'a1' and 'a2' then the code would be:

a1_index = a1.coord_index
a2_index = a2.coord_index
from chimerax.geometry import distance
for cid in s.coordset_ids:
	cs = s.coordset(cid)
	d = distance(cs[a1_index], cs[a2_index])
	do something with the 'd' you just computed

Glad to hear you are going to continue improving the already excellent XMAS bundle!

--Eric

	Eric Pettersen
	UCSF Computer Graphics Lab


> On Apr 25, 2022, at 3:12 AM, Moya Clark, I.O. de (Isabel) via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
> 
> Good morning, 
>  
> I am a student intern at the Richard Scheltema Laboratory, and I am going to be continuing with the modification of the XMAS bundle submitted to ChimeraX recently. 
>  
> Right now, we are trying to extend the bundle to be able to extract specific distances between specific amino acids for two different proteins but for a molecular dynamics simulation. Either by loading a trajectory coordinates + topology files or by using the “morph” command and then “coordset slider”. 
>  
> So, the idea would be to extract the distances between the alpha carbons, of a set of pre-selected amino acids, in each frame of the simulation. Do you have any suggestions about any modules or methods that I should look into to extract this information in each frame? I saw there is a CooordSets class but I do not know if this would be the right way to go about it. 
>  
> Kind regards, 
>  
> Isabel de Moya Clark 
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220425/33f30b45/attachment.html>


More information about the ChimeraX-users mailing list