<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">body {word-wrap: break-word; background-color:#ffffff;}</style>
</head>
<body>
<div style="font-family: sans-serif; font-size: 16px">Any Fourier map without an F000 term will analytically have a mean value of 0.<br>
<br>
Lynn<br>
<br>
<font face="sans-serif"><span style="font-size: 14px"><i><font color="#333333">Connected by DROID on Verizon Wireless</font></i></span></font></div>
<br>
<br>
-----Original message-----<br>
<blockquote style="; border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
<div style="font-family: sans-serif; font-size: 14px"><b>From: </b>Nathaniel Echols &lt;nechols@lbl.gov&gt;<b><br>
To: </b>cctbx mailing list &lt;cctbxbb@phenix-online.org&gt;<b><br>
Sent: </b>Tue, Oct 16, 2012 17:22:17 GMT&#43;00:00<b><br>
Subject: </b>Re: [cctbxbb] Patterson map data structure<br>
<br>
</div>
<div>
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
<div><font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Tue, Oct 16, 2012 at 6:47 AM, Dmytro Guzenko<br>
&lt;Dmytro.Guzenko@pharm.kuleuven.be&gt; wrote:<br>
&gt; rmap = pmap.real_map_unpadded()<br>
&gt; n_real = pmap.n_real()<br>
&gt; unit_cell = pmap.unit_cell()<br>
&gt; grid2cart = maptbx.grid2cart(n_real,unit_cell.orthogonalization_matrix())<br>
&gt;<br>
&gt; n_points_total = n_real[0]*n_real[1]*n_real[2]<br>
&gt; cart_coord = flex.double(flex.grid(3,n_points_total))<br>
&gt; p_weight = flex.double(n_points_total)<br>
&gt;<br>
&gt; for plain_ind,grid_point in enumerate(flex.nested_loop(n_real)):<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; cart_coord[0,plain_ind],cart_coord[1,plain_ind],cart_coord[2,plain_ind] = grid2cart(grid_point)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; p_weight[plain_ind] = rmap[grid_point]<br>
<br>
There are better arrays for storing the coordinates, e.g.:<br>
<br>
cart_coord = flex.vec3_double(flex.grid(n_real))<br>
p_weight = flex.double(rmap.size())<br>
<br>
for plain_ind,grid_point in enumerate(flex.nested_loop(n_real)):<br>
&nbsp; cart_coord[grid_point] = grid2cart(grid_point)<br>
&nbsp; p_weight[plain_ind] = rmap[grid_point]<br>
<br>
&gt; By the way, I noticed that many weights are negative, is this possible in a patterson map or am I doing something wrong?<br>
<br>
This is normal - I believe it's a Fourier series termination error,<br>
but I still don't fully understand the reason.&nbsp; An Fobs map will have<br>
the same problem; the mean will always be approximately zero.<br>
Technically, if the map were perfect with no missing data, it would be<br>
uniformly positive, but that's never actually the case.&nbsp; There are<br>
ways to &quot;fix&quot; the map so it's all-positive, such as maximum entropy<br>
cleanup, but in practice I think we just ignore the negative values<br>
(at least for Fobs/2mFo-DFc maps - not sure how Patterson maps are<br>
usually handled).<br>
<br>
-Nat<br>
_______________________________________________<br>
cctbxbb mailing list<br>
cctbxbb@phenix-online.org<br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" target="_BLANK">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</div>
</span></font></div>
</div>
</blockquote>
</body>
</html>