ó
T™xTc           @   sŸ   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 d  d l
 m Z d  d l Z d	 „  Z e d
 k r› e ƒ  n  d S(   iÿÿÿÿ(   t   division(   t   random_structure(   t   miller(   t   translation_search(   t   sgtbx(   t   flex(   t
   show_timesNc          C   s  t  j d t j d ƒ d d g d d g d t d t ƒ }  t t j d	 ƒ ƒ } d
 | GH|  j	 ƒ  j
 | ƒ } t j d |  d t d d ƒ } | j d |  d d ƒ j ƒ  j ƒ  } t j d | d t d d ƒ } | j d | d d ƒ j ƒ  } | j d t j d t d t ƒ d d! ƒ } d t j _ t ƒ  } t j d | j ƒ  d | j ƒ  d | j ƒ  d | j ƒ  d | j ƒ  d t j ƒ  d | j ƒ  d | j ƒ  ƒ j ƒ  }	 Hd GH| ƒ  t ƒ  }
 xK |  j ƒ  D]= } | j | ƒ \ } } t j  | | | j! ƒ  j ƒ  ƒ } qÀWHd  GH|
 ƒ  d  S("   Nt   space_group_infot   I432t   elementst   Ci   t   Ot	   use_u_isot   use_u_anisoi   s%   shift to be found: (%.3f, %.3f, %.3f)t   crystal_symmetryt   anomalous_flagt   d_mingš™™™™™é?t   xray_structuret	   algorithmt   directt   symmetry_flagst   is_isotropic_search_modelt   have_f_partt   resolution_factori   i   t   griddingt   space_groupt   miller_indices_f_obst   f_obst   f_partt   miller_indices_p1_f_calct	   p1_f_calcs   Fast translation functions   Traditional cross-correlationg      à?("   R   R   R   R   t   Falset   Truet   tupleR   t   random_doublet   expand_to_p1t   apply_shiftR   t	   build_sett!   structure_factors_from_scattererst   f_calct
   amplitudest   crystal_griddingR   R   t   omptbxt   envt   num_threadsR   t   fast_nv1995t   n_realR   R   t   indicest   datat   complex_doublet
   target_mapt   original_and_transformedt   fft_mapt	   conjugate(   t   target_structuret   shiftt   target_structure_in_p1t   miller_indicesR   t   miller_indices_in_p1R'   R)   t	   t_fast_tft   fast_tf_mapt   t_cross_corrt   opt   ft
   op_times_ft   cross_corr_map(    (    sM   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/translation_search/timing.pyt   run
   sb    																	t   __main__(   t
   __future__R    t   cctbx.developmentR   t   cctbxR   R   R   t   cctbx.array_familyR   t   libtbx.utilsR   R*   RB   t   __name__(    (    (    sM   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/translation_search/timing.pyt   <module>   s   	9