ó
?™xTc           @   s£   d  d l  m Z d  d l m Z d  d l m Z d  d l Td  d l m Z d  d l	 m
 Z
 e j ƒ  Z d „  Z d „  Z e d	 k rŸ e ƒ  e j ƒ  j ƒ  GHn  d
 S(   iÿÿÿÿ(   t   division(   t   random_structure(   t   space_group_info(   t   *(   t   flex(   t   maptbxc   
      C   sÛ   t  |  ƒ } d } t j d | d d d t d | d d	 d
 d ƒ } d	 } | j d | ƒ j ƒ  } d  } | j d | d d ƒ } | j ƒ  | j	 ƒ  } t
 j d | d | j ƒ  d | j ƒ  d d d d ƒ }	 t j |	 ƒ d  S(   Nt   Ci
   R   t   volume_per_atomg      I@t   general_positions_onlyt   elementst   min_distanceg       @t   u_isogš™™™™™¹?t   d_mint   symmetry_flagst   resolution_factorg      ð?i   t   map_datat
   sites_cartt   crystal_symmetryt   cutoffg333333Ó?t   atom_radiusg      ø?(   R   (
   R   R   R   R   R   R   R   R   R   R   gš™™™™™É?(   R   R   t   xray_structuret   Truet   structure_factorst   f_calct   Nonet   fft_mapt   apply_volume_scalingt   real_map_unpaddedR   t   peak_volume_estimateR   R   t   resultt   append(
   t   symbolt   groupR	   t   xrsR   t   fcR   R   R   t   r(    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/maptbx/tst_peak_volume_estimate.pyt	   run_group
   s,    		
		c          C   s(   x! t  d d ƒ D] }  t |  ƒ q Wd  S(   Ni   iç   (   t   xrangeR$   (   t   i(    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/maptbx/tst_peak_volume_estimate.pyt   run#   s    t   __main__N(   t
   __future__R    t   cctbx.developmentR   t   cctbx.sgtbxR   t   cctbx_asymmetric_map_extt   cctbx.array_familyR   t   cctbxR   t   doubleR   R$   R'   t   __name__t   min_max_meant   as_tuple(    (    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/maptbx/tst_peak_volume_estimate.pyt   <module>   s   
		