<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Claudius,<br>
<br>
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.<br>
<br>
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.<br>
<br>
Tom<br>
<br>
<br>
<blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.E-MailFormatvorlage17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:"Consolas","serif";
color:black;
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage20
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hello Tom,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">With best
regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Claudius <o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span
style="color:#1F497D"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE">Von:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:DE">
Tom Goddard [<a class="moz-txt-link-freetext" href="mailto:goddard@sonic.net">mailto:goddard@sonic.net</a>] <br>
<b>Gesendet:</b> Dienstag, 15. November 2011 02:36<br>
<b>An:</b> Schmidt, Claudius<br>
<b>Cc:</b> '<a class="moz-txt-link-abbreviated" href="mailto:chimera-users@cgl.ucsf.edu">chimera-users@cgl.ucsf.edu</a>'<br>
<b>Betreff:</b> Re: [Chimera-users] Calculating and
showing the Mass center of Volume Segments<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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).<br>
<br>
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.<br>
<br>
I've attached the script and also put it on the Chimera Python
scripts web page:<br>
<br>
<a
href="http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts">http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts</a><br>
<br>
Tom<br>
<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">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.<br>
<br>
Tom<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">With best regards<o:p></o:p></p>
<p class="MsoNormal">C. Schmidt<o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:DE"><br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:DE"><br>
<br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Chimera-users mailing list<o:p></o:p></pre>
<pre><a href="mailto:Chimera-users@cgl.ucsf.edu">Chimera-users@cgl.ucsf.edu</a><o:p></o:p></pre>
<pre><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><o:p></o:p></pre>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";mso-fareast-language:DE"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
<br>
</body>
</html>