ó
P™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 Z d d „ Z d „  Z	 e
 d	 k r� e	 e j d
 ƒ n  d S(   iÿÿÿÿ(   t   division(   t   xray(   t   miller(   t   read_structureNgü©ñÒMbP?c   
   
   C   sŠ  d | GHxyd d f D]k\ } } | GHxWd d d d	 g D]C} |  j  ƒ  } | j d
 | d d ƒ |  j  ƒ  } | j d d ƒ t j d |  d
 | d t ƒ } | j ƒ  g  } x€ | | f D]r }  |  j ƒ  j ƒ  t j j d | d | d | ƒ d |  d | d d ƒ }	 | j	 |	 j
 ƒ  j j ƒ d | d GHq¹ Wd | | d | d	 f G| d	 d k rod | d | d	 Gn  Ht j j ƒ  q: Wq WHd  S(   Ns1   wing_cutoff for following fft calculations: %3.1es   exp function:i    s
   exp table:iœÿÿÿi   i   i   i   t   d_mint   tablet
   n_gaussiant   it1992t   crystal_symmetryt   anomalous_flagt
   miller_sett   wing_cutofft   exp_table_one_over_step_sizet   xray_structuret	   algorithmt   ffts     %.2f seconds,iÿÿÿÿs   d_min=%d: %.2f s / %.2f ss   = %.2f(   s   exp function:i    (   s
   exp table:iœÿÿÿ(   t   deep_copy_scattererst   scattering_type_registryR   t	   build_sett   Falset   show_summaryR   t   structure_factorst   from_scattererst   appendt   managert   estimate_time_fftt   time_samplingt   syst   stdoutt   flush(
   t	   structureR   t	   calc_typeR   R   t   structure_ngt   structure_4gR
   t   timest   f_calc_object(    (    sY   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/development/electron_density_sampling.pyt   timings   s@    			
		c         C   sD   t  |  ƒ d k s t ‚ t |  d ƒ } | j ƒ  Ht d | ƒ d  S(   Ni   i    R   (   t   lent   AssertionErrorR   R   R$   (   t   argsR   (    (    sY   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/development/electron_density_sampling.pyt   run)   s
    
t   __main__i   (   t
   __future__R    t   cctbxR   R   t+   cctbx.command_line.structure_factor_timingsR   R   R$   R(   t   __name__t   argv(    (    (    sY   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/development/electron_density_sampling.pyt   <module>   s   "	