ó
žxTc           @   sX   d  d l  m Z d  d l m Z d   Z d   Z e d k rT e   e   d GHn  d S(   i˙˙˙˙(   t   division(   t   null_outc          C   sü  d d l  m }  d d  l } d d l m } |  d d  \ } } | j |  } | j j } | j j   } xH | j	   D]: } | j
 d k rx d | _ d | _ | j j t  qx qx W| j |  }	 |	 j j d	 }
 |	 j j d	 } | j d
 | j   d k  } | j j d |
 d | d | g d d d t  } | j d d d t  } | j d d  j   j   } xt | j	   D]f } | j
 d k rŹ| j | j  d	 k  sÜt  qv| j
 d k rv| j | j  d k sÜt  qvqvW| j d d d t  } d  S(   Ni˙˙˙˙(   t   generate_cd_cl_inputs(   t   file_readert	   file_baset   tst_mmtbx_maps_miscs   Cd2+gÂő(\ŇżgÄ °rh@i    t   datai   t   f_obst   r_free_flagst   xray_structurest   scattering_tablet
   n_gaussiant   skip_twin_detectiont   map_typet   anom_residualt   exclude_free_r_reflectionst   resolution_factorg      Đ?s   Cl1-i
   s   2mFo-DFc(   t)   mmtbx.regression.make_fake_anomalous_dataR   t   mmtbx.utilst   iotbxR   t   any_filet   file_objectt	   hierarchyt   xray_structure_simplet
   scattererst   scattering_typet   fpt   fdpt   flagst   set_use_fp_fdpt   Truet   file_servert   miller_arrayst   customized_copyR   t   utilst   fmodel_simplet   map_coefficientst   fft_mapt   apply_sigma_scalingt   real_map_unpaddedt   eight_point_interpolationt   sitet   AssertionError(   R   t   mmtbxR   t   mtz_filet   pdb_filet   pdb_inR   t   xrst   st   mtz_inR   R   t   fmodelt
   map_coeffst   map_anomt   map2(    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/regression/tst_maps_misc.pyt   exercise_anomalous_maps_misc   sH    							!%	c          C   sy   d d l  m }  d d  l } |  d d  \ } } t d d  j d  | j j j d | | d d	 d
 g d t    d  S(   Ni˙˙˙˙(   t   generate_calcium_inputsR   t   tst_mmtbx_maps_misc2s   tst_mmtbx_maps_misc2.efft   wsÓ       maps {
      map {
        map_type = 2mFo-DFc
        format = xplor *ccp4
        file_name = tst_mmtbx_maps_misc2.ccp4
        region = *selection cell
        atom_selection = "resname HOH"
      }
    }t   argss   omit.selection="resname TRP"s   prefix=tst_mmtbx_maps_misc2t   log(	   R   R7   t   mmtbx.command_line.mapst   opent   writet   command_linet   mapst   runR   (   R7   R+   R,   R-   (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/regression/tst_maps_misc.pyt   exercise_omit_atom_selection-   s    		t   __main__t   OKN(   t
   __future__R    t   libtbx.utilsR   R6   RB   t   __name__(    (    (    sL   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/regression/tst_maps_misc.pyt   <module>   s   	(	