Calculating and showing the Mass center of Volume Segments

Hello, I got a volume map that I segmented in 4 parts. Now I wanted to measure how the parts are coordinated to each other. As the Axes/Planes/Centroids menu can only create planes by atoms I wanted to place atoms in the mass- center of each segment. Is there any way to realize that? Or do you have any other way to measure the angles. To explain what I'm trying to measure: Example you have 4 segments, I call them a b c d. I want to measure how the axis that is formed by a and b, forms an angle to c and d, or how ist he angle of the plane formed by a b and c compared to ab and d . All for segments are basically the same objects just turned and rotated. With best regards C. Schmidt

There isn't any Chimera command to identify the center of mass or a density map or place a marker/atom there. But that seems useful. A Python script can easily do it. I'll see if I can give you a Python script at the end of today, or maybe add an operation to the Chimera "measure" command to do this job. Tom
Hello,
I got a volume map that I segmented in 4 parts. Now I wanted to measure how the parts are coordinated to each other. As the Axes/Planes/Centroids menu can only create planes by atoms I wanted to place atoms in the mass- center of each segment. Is there any way to realize that?
Or do you have any other way to measure the angles. To explain what I'm trying to measure: Example you have 4 segments, I call them a b c d. I want to measure how the axis that is formed by a and b, forms an angle to c and d, or how ist he angle of the plane formed by a b and c compared to ab and d . All for segments are basically the same objects just turned and rotated.
With best regards
C. Schmidt

Here is a Python script to place a marker at the center of mass of a map at points above the displayed contour level. You open your map and then open the script (menu File / Open) to create the marker. For marking more than one map, just highlight the map in the volume dialog by clicking on its histogram or name and open the script. The grid index of the center point will be reported in the reply log (menu Favorites / Reply Log). I will make the Chimera "measure" command do this calculation and marker placement in the future. This is a busy month so it will be some time before I get to that. I've attached the script and also put it on the Chimera Python scripts web page: http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts Tom
There isn't any Chimera command to identify the center of mass or a density map or place a marker/atom there. But that seems useful. A Python script can easily do it. I'll see if I can give you a Python script at the end of today, or maybe add an operation to the Chimera "measure" command to do this job.
Tom
Hello,
I got a volume map that I segmented in 4 parts. Now I wanted to measure how the parts are coordinated to each other. As the Axes/Planes/Centroids menu can only create planes by atoms I wanted to place atoms in the mass- center of each segment. Is there any way to realize that?
Or do you have any other way to measure the angles. To explain what I'm trying to measure: Example you have 4 segments, I call them a b c d. I want to measure how the axis that is formed by a and b, forms an angle to c and d, or how ist he angle of the plane formed by a b and c compared to ab and d . All for segments are basically the same objects just turned and rotated.
With best regards
C. Schmidt
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Claudius, My previous script to place a marker and the volume center of mass had a bug as you noticed. It placed the marker in the global coordinate system but calculated it in the volume coordinate system. These are different if you move or rotate the view before using the script. Here's the fixed volumecenter.py script. I changed a few lines at the end. It now makes a new model for each center marker you create and the coordinates are correct. You still need to choose the volume data set in the volume dialog before running the script. Tom
Hello Tom,
I'm very sorry to bother you again, but the Script only works fine if I only load one map. As soon as I got another MRC loaded, it sets the marker on absurd positions no matter what I selected in volume viewer or anywhere else.
With best regards
Claudius
*Von:*Tom Goddard [mailto:goddard@sonic.net] *Gesendet:* Dienstag, 15. November 2011 02:36 *An:* Schmidt, Claudius *Cc:* 'chimera-users@cgl.ucsf.edu' *Betreff:* Re: [Chimera-users] Calculating and showing the Mass center of Volume Segments
Here is a Python script to place a marker at the center of mass of a map at points above the displayed contour level. You open your map and then open the script (menu File / Open) to create the marker. For marking more than one map, just highlight the map in the volume dialog by clicking on its histogram or name and open the script. The grid index of the center point will be reported in the reply log (menu Favorites / Reply Log).
I will make the Chimera "measure" command do this calculation and marker placement in the future. This is a busy month so it will be some time before I get to that.
I've attached the script and also put it on the Chimera Python scripts web page:
http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts
Tom
There isn't any Chimera command to identify the center of mass or a density map or place a marker/atom there. But that seems useful. A Python script can easily do it. I'll see if I can give you a Python script at the end of today, or maybe add an operation to the Chimera "measure" command to do this job.
Tom
Hello,
I got a volume map that I segmented in 4 parts. Now I wanted to measure how the parts are coordinated to each other. As the Axes/Planes/Centroids menu can only create planes by atoms I wanted to place atoms in the mass- center of each segment. Is there any way to realize that?
Or do you have any other way to measure the angles. To explain what I'm trying to measure: Example you have 4 segments, I call them a b c d. I want to measure how the axis that is formed by a and b, forms an angle to c and d, or how ist he angle of the plane formed by a b and c compared to ab and d . All for segments are basically the same objects just turned and rotated.
With best regards
C. Schmidt
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Claudius, I added the "measure center" command to Chimera which will be in tonight's daily builds. For example, measure center #0 mark true will place a marker at the center of map #0 and report the grid index of the center position on the status line and in the reply log. Here's a fancier example me cen #0,1 level 0.15 mark true radius 10 color red model 2 that places markers at the centers of maps #0 and #1 above contour level 0.15 with marker radius 10 Angstroms and color red, and both markers will be in the marker model with id number 2. Tom -------- Original Message -------- Subject: Re: [Chimera-users] Calculating and showing the Mass center of Volume Segments From: Tom Goddard To: Schmidt, Claudius Date: 11/15/11 10:22 AM
Hi Claudius,
My previous script to place a marker and the volume center of mass had a bug as you noticed. It placed the marker in the global coordinate system but calculated it in the volume coordinate system. These are different if you move or rotate the view before using the script.
Here's the fixed volumecenter.py script. I changed a few lines at the end. It now makes a new model for each center marker you create and the coordinates are correct. You still need to choose the volume data set in the volume dialog before running the script.
Tom
Hello Tom,
I'm very sorry to bother you again, but the Script only works fine if I only load one map. As soon as I got another MRC loaded, it sets the marker on absurd positions no matter what I selected in volume viewer or anywhere else.
With best regards
Claudius
*Von:*Tom Goddard *Gesendet:* Dienstag, 15. November 2011 02:36 *An:* Schmidt, Claudius *Cc:* 'chimera-users@cgl.ucsf.edu' *Betreff:* Re: [Chimera-users] Calculating and showing the Mass center of Volume Segments
Here is a Python script to place a marker at the center of mass of a map at points above the displayed contour level. You open your map and then open the script (menu File / Open) to create the marker. For marking more than one map, just highlight the map in the volume dialog by clicking on its histogram or name and open the script. The grid index of the center point will be reported in the reply log (menu Favorites / Reply Log).
I will make the Chimera "measure" command do this calculation and marker placement in the future. This is a busy month so it will be some time before I get to that.
I've attached the script and also put it on the Chimera Python scripts web page:
http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts
Tom
There isn't any Chimera command to identify the center of mass or a density map or place a marker/atom there. But that seems useful. A Python script can easily do it. I'll see if I can give you a Python script at the end of today, or maybe add an operation to the Chimera "measure" command to do this job.
Tom
Hello,
I got a volume map that I segmented in 4 parts. Now I wanted to measure how the parts are coordinated to each other. As the Axes/Planes/Centroids menu can only create planes by atoms I wanted to place atoms in the mass- center of each segment. Is there any way to realize that?
Or do you have any other way to measure the angles. To explain what I'm trying to measure: Example you have 4 segments, I call them a b c d. I want to measure how the axis that is formed by a and b, forms an angle to c and d, or how ist he angle of the plane formed by a b and c compared to ab and d . All for segments are basically the same objects just turned and rotated.
With best regards
C. Schmidt
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

Hi Tom, wow thats a very good thing! :) I'll not forget to mention you in my essay - thank you very much again! With best regards Claudius Von: Tom Goddard [mailto:goddard@sonic.net] Gesendet: Freitag, 18. November 2011 21:41 An: Schmidt, Claudius Cc: 'chimera-users@cgl.ucsf.edu' Betreff: Re: [Chimera-users] Calculating and showing the Mass center of Volume Segments Hi Claudius, I added the "measure center" command to Chimera which will be in tonight's daily builds. For example, measure center #0 mark true will place a marker at the center of map #0 and report the grid index of the center position on the status line and in the reply log. Here's a fancier example me cen #0,1 level 0.15 mark true radius 10 color red model 2 that places markers at the centers of maps #0 and #1 above contour level 0.15 with marker radius 10 Angstroms and color red, and both markers will be in the marker model with id number 2. Tom -------- Original Message -------- Subject: Re: [Chimera-users] Calculating and showing the Mass center of Volume Segments From: Tom Goddard To: Schmidt, Claudius Date: 11/15/11 10:22 AM Hi Claudius, My previous script to place a marker and the volume center of mass had a bug as you noticed. It placed the marker in the global coordinate system but calculated it in the volume coordinate system. These are different if you move or rotate the view before using the script. Here's the fixed volumecenter.py script. I changed a few lines at the end. It now makes a new model for each center marker you create and the coordinates are correct. You still need to choose the volume data set in the volume dialog before running the script. Tom Hello Tom, I'm very sorry to bother you again, but the Script only works fine if I only load one map. As soon as I got another MRC loaded, it sets the marker on absurd positions no matter what I selected in volume viewer or anywhere else. With best regards Claudius Von: Tom Goddard Gesendet: Dienstag, 15. November 2011 02:36 An: Schmidt, Claudius Cc: 'chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>' Betreff: Re: [Chimera-users] Calculating and showing the Mass center of Volume Segments Here is a Python script to place a marker at the center of mass of a map at points above the displayed contour level. You open your map and then open the script (menu File / Open) to create the marker. For marking more than one map, just highlight the map in the volume dialog by clicking on its histogram or name and open the script. The grid index of the center point will be reported in the reply log (menu Favorites / Reply Log). I will make the Chimera "measure" command do this calculation and marker placement in the future. This is a busy month so it will be some time before I get to that. I've attached the script and also put it on the Chimera Python scripts web page: http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts Tom There isn't any Chimera command to identify the center of mass or a density map or place a marker/atom there. But that seems useful. A Python script can easily do it. I'll see if I can give you a Python script at the end of today, or maybe add an operation to the Chimera "measure" command to do this job. Tom Hello, I got a volume map that I segmented in 4 parts. Now I wanted to measure how the parts are coordinated to each other. As the Axes/Planes/Centroids menu can only create planes by atoms I wanted to place atoms in the mass- center of each segment. Is there any way to realize that? Or do you have any other way to measure the angles. To explain what I'm trying to measure: Example you have 4 segments, I call them a b c d. I want to measure how the axis that is formed by a and b, forms an angle to c and d, or how ist he angle of the plane formed by a b and c compared to ab and d . All for segments are basically the same objects just turned and rotated. With best regards C. Schmidt _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users _______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (2)
-
Schmidt, Claudius
-
Tom Goddard