ó
­™xTc           @   s¾   d  d l  m Z d  d l m Z d  d l Z d  d l Z d  d l Td  d l m Z d  d l	 m
 Z
 d  d l m Z m Z e j d ƒ e j d ƒ d	 d
 d d „ Z e d k rº e ƒ  n  d S(   iÿÿÿÿ(   t   division(   t   flexN(   t   *(   t   user_plus_sys_time(   t   random_structure(   t   sgtbxt   adptbxi    g¸…ëQ¸ž?g      ð?g•Ö&è.>c         C   s×  t  j d t j d ƒ d d d d d d d	 d
 g d d t d t ƒ } | j ƒ  t j d ƒ } | d k  } | j	 | d ƒ } | j
 d | ƒ | j ƒ  j ƒ  } t ƒ  } t d t | d |  ƒ d t | d |  ƒ d t | d |  ƒ d | j ƒ  d | j ƒ  d | j ƒ  d | ƒ } d | j ƒ  GH| j d | d d ƒ j ƒ  }	 |	 j d | j d t ƒ }
 t j |	 j ƒ  ƒ } t j |
 j ƒ  ƒ } t j t j | | ƒ ƒ t j | ƒ } d G| GH| d k  sÓt | ƒ ‚ d  S(    Nt   space_group_infos   P 1t   elementst   Ot   Nt   Ct   Pt   St   Ut   AUi   t   random_u_isot   general_positions_onlyt   valuest   nxi    t   nyt   nzi   t   scattering_type_registryt	   unit_cellt
   scattererst   wing_cutoffs   time: %10.4ft   d_mint	   algorithmt   directt   mapt	   use_scales	   r-factor:g-Cëâ6?(   R   t   xray_structureR   R   t   Truet   Falset   extract_u_iso_or_u_equivR   t   u_as_bt   set_selectedt	   set_b_isoR   t
   parametersR   t   managert   intR   R   t   elapsedt   structure_factorst   f_calct   structure_factors_from_mapt   density_arrayR   t   abst   datat   sumt   AssertionError(   t	   grid_stepR   R   t   xrst   bst   selt   pt   timert   rest
   f_calc_dirt
   f_calc_dent   f1t   f2t   r(    (    s;   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/rsr/tst.pyt   exercise_01   s:    						)	t   __main__(   t
   __future__R    t   cctbx.array_familyR   t   timet   randomt   mmtbx_rsr_extt   libtbx.utilsR   t   cctbx.developmentR   t   cctbxR   R   t   seedt   set_random_seedR>   t   __name__(    (    (    s;   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/rsr/tst.pyt   <module>   s   
#