ó
±™xTc           @   s£   d  d l  m Z d  d l m Z d  d l Z d  d l Z d Z i d d 6d d 6d	 d
 6d d 6d d 6Z d „  Z	 e j
 d „ Z e d k rŸ e e j d ƒ n  d S(   iÿÿÿÿ(   t   division(   t   AutoNsâ   
map_type = *2mFo-DFc mFo-DFc anom anom_residual llg
  .type = choice
exclude_free_r_reflections = True
  .type = bool
fill_missing_f_obs = False
  .type = bool
b_sharp = None
  .type = float
output_file = Auto
  .type = path
t   2FOFCWTs   2mFo-DFct   FOFCWTs   mFo-DFct   ANOMt   anomt	   ANOM_DIFFt   anom_residualt   LLGt   llgc          C   s#   d d l  m }  |  d t d t ƒ S(   Niÿÿÿÿ(   t    generate_master_phil_with_inputst   phil_stringt   enable_automatic_twin_detection(   t   mmtbx.command_lineR
   t   master_phil_strt   True(   R
   (    (    sY   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/command_line/compute_map_coefficients.pyt   master_phil   s    c         C   sÂ  t  ƒ  } d } d d  l } d d l m } d d  l } | j j d |  d | d t d t d | d	 t d
 d d | ƒ } | j	 } | j
 }	 | j }
 | j d |
 j d |
 j d |
 j ƒ } |
 j d  k	 r|
 j t k rí | j ƒ  d |
 _ n  | j d d  d | d t ƒ } n  | j j d d ƒ } | j d t |
 j d | ƒ } |
 j t k r—t j j |
 j j j d ƒ } t j j  | ƒ d d |
 j |
 _ n  | j! ƒ  j" |
 j ƒ | d |
 j IJd  S(   Ns—   mmtbx.compute_map_coefficients model.pdb data.mtz map_type=MAP_TYPE [options]

Utility to compute a single set of map coefficients with minimal input.
iÿÿÿÿ(   t	   map_toolst   argsR   t   process_pdb_filet   prefer_anomaloust   usage_stringt    set_wavelength_from_model_headert   set_inelastic_form_factorst   sasakit   outt   map_typet   exclude_free_r_reflectionst   fill_missingi
   t
   sites_fract
   map_coeffst   b_sharpt   phases_prefixt   PHt   column_root_labelt   label_decoratori    s   _%s.mtzs   Wrote %s(#   R   R   t   mmtbxR   t	   iotbx.mtzt   command_linet   load_model_and_datat   FalseR   t   fmodelt   xray_structuret   paramst   map_coefficientsR   R   t   fill_missing_f_obsR   t   NoneR   t   d_mint	   sharp_mapt   mtzR#   t   as_mtz_datasett   map_type_labelst   output_filet   ost   patht   basenamet   inputt   pdbt	   file_namet   splitextt
   mtz_objectt   write(   R   R   t   master_paramsR   R$   R   t   iotbxt   cmdlineR)   R*   R+   R   t   dect   mtz_datasett   pdb_file(    (    sY   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/command_line/compute_map_coefficients.pyt   run"   sL    											t   __main__i   (   t
   __future__R    t   libtbxR   t   os.pathR5   t   sysR   R3   R   t   stdoutRD   t   __name__t   argv(    (    (    sY   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/command_line/compute_map_coefficients.pyt   <module>   s   
	,