[cctbxbb] Electron density hitogram from MTZ file

castro at biochem.mpg.de castro at biochem.mpg.de
Mon Oct 27 07:42:51 PDT 2014


Hi Pavel,

Thanks a lot for your help.
:)

Marcelino

Quoting Pavel Afonine <pafonine at lbl.gov>:

> Hi Marcelino,
>
> for example, see implementation of phenix.map_comparison (Map
> comparison and statistics. For details see: Acta Cryst. (2014). D70,
> 2593-2606. Metrics for comparison of crystallographic maps. A.
> Urzhumtsev, P. V. Afonine, V. Y. Lunin, T. C. Terwilliger and P. D.
> Adams).
>
> Relevant file is:
> cctbx_project/mmtbx/command_line/map_comparison.py
>
> This gives you map histogram object:
> h = maptbx.histogram(map=map_data, n_bins=10000)
>
> You can print it like this:
> for a,c,v in zip(h.arguments(), h.c_values(), h.values()):
>     print a,c,v
>
> Another option would be to use flex.histogram:
>
> def show_histogram(data, n_slots, data_min, data_max):
>   hm = flex.histogram(data = data, n_slots = n_slots, data_min=data_min,
>     data_max=data_max)
>   lc_1 = hm.data_min()
>   s_1 = enumerate(hm.slots())
>   for (i_1,n_1) in s_1:
>     hc_1 = hm.data_min() + hm.slot_width() * (i_1+1)
>     print "%6.2f - %-6.2f : %6.4f : %d" % (lc_1, hc_1, (lc_1+hc_1)/2,n_1)
>     lc_1 = hc_1
>
> but this does not work well for crystallographic maps.
>
> Finally, to get a Fourier map from Fourier map coefficients (miller
> array with complex-type data):
>
> - if you want to use your custom gridding:
>   fft_map = miller.fft_map(
>     crystal_gridding     = crystal_gridding,
>     fourier_coefficients = map_coeffs)
>   fft_map.apply_sigma_scaling()
>   map_data = fft_map.real_map_unpadded()
>
> - using gridding based on resolution:
> fft_map = map_coeffs.fft_map(resolution_factor = 1./4)
>
> Pavel
>
> On 10/27/14 5:45 AM, castro at biochem.mpg.de wrote:
>> Hi everybody,
>>
>> I am new in crystallogrphy and in the use of cctbx.
>> I am interested in building a electron density histogram from a mtz file.
>> Could somebody give a hint on how to accomplish this task using   
>> cctbx libraries (I am scripting in python)?
>>
>> Let's say that I already have the columns of interest as "miller arrays".
>> Then (I think), a grid (on the real space) needs to be created   
>> based on unit cell parameters, to finally make the fft.
>>
>> I think that most of my doubts are about the grid.
>> How small the grid should be with respect to the low-resolution limit?
>> Does the space group information needed or it is enough with the   
>> the cell parameters?
>>
>> Is there all ready a routine doing this?
>>
>> Thanks a lot for your help.
>>
>> Marcelino
>>
>> _______________________________________________
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/cctbxbb






More information about the cctbxbb mailing list