ó
9™xTc           @   s„   d  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 d d	 „ Z
 d
 „  Z e d k r€ e ƒ  n  d S(   sè   
usage: cctbx.python random_f_calc.py space_group_symbol

Example:
  cctbx.python random_f_calc.py P212121

This will write a file map_coeff.pickle that can be used to
view the electron density map with PyMOL (see view_fft_map.py).
iÿÿÿÿ(   t   division(   t   random_structure(   t   sgtbx(   t   easy_pickleNi
   g      ø?c      
   C   s‚   t  j |  d d g | d d d d d t ƒ} | j ƒ  j ƒ  H| j d | d	 t ƒ j ƒ  } | j ƒ  Hd
 GHt j d | ƒ Hd  S(   Nt   elementst   Sit   volume_per_atomiè  t   min_distanceg      @t   general_positions_onlyt   d_mint   anomalous_flags   Writing file: map_coeff.pickles   map_coeff.pickle(	   R   t   xray_structuret   Falset   show_summaryt   show_scattererst   structure_factorst   f_calcR   t   dump(   t   space_group_infot
   n_elementsR	   t	   structureR   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/random_f_calc.pyt   generate_random_f_calc   s    		
c           C   s<   t  t j ƒ d k r t GHd  St t j t j d ƒ ƒ d  S(   Ni   i   (   t   lent   syst   argvt   __doc__R   R   R   (    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/random_f_calc.pyt   run"   s    t   __main__(   R   t
   __future__R    t   cctbx.developmentR   t   cctbxR   t   libtbxR   R   R   R   t   __name__(    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/random_f_calc.pyt   <module>	   s   	