Hi Andrew, The centroids are represented by atoms, which means you can use any operation on them that you could use on normal atoms, including saving to a PDB file. Let’s say your reference model when you were doing matchmaker was model 1. To save a PDB with the centroid coordinates in model 1’s coordinate system to a file on your desktop named “centroids.pdb”, you would use this command: save ~/Desktop/centroids.pdb ##name=centroid rel #1 It seems like it should be easy to throw together a script that opens files of interest, defines centroids, and then saves a PDB file. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Oct 2, 2025, at 2:09 PM, Andrew Kennard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi there,
I have aligned a bunch of models with matchmaker, and then I defined centroids for each model with `define centroid`. I would like to export those centroids for further analysis (trying to see the spatial relationship between chains B from each model when all models are aligned on chain A). However, the only way I could figure out how to do it was to press "Save Info..." in the Structure Measurements window. This text file reports the centroids in the model coordinate system for each model. But because I aligned the models with matchmaker, I'd rather have the centroids in the scene coordinate system. I am not sure how to do this transformation and export all the coordinates (~dozens of models).
The only other option I found that might work was the `getcrg` command which I could use to save the coordinates to the Log, but then I will have to save the log as an HTML and parse that, right? Is there any more straightforward way?
Alternatively, is there a better way to define centroids (ideally programmatically) so I can extract them from Chimera easily in scene coordinates? Perhaps the measure center command is the thing I should be using? Thanks a bunch!
I'm running ChimeraX v1.10.1 (2025-07-24) on Mac OS 15.6 Sequoia
Thank you!!
Andrew _______________________________________________ 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/