ó
šxTc           @   sK   d  d l  m Z d  d l m Z m Z d  d l Z d e d d d „ Z d S(   iÿÿÿÿ(   t   division(   t   Sorryt   null_outNt	   phaser_AXc         C   sÓ  | d k r t d ƒ ‚ n  | d k r3 t j } n  d d l m } d d l } |  j ƒ  j ƒ  sg t	 ‚ |  j ƒ  }	 |  j
 ƒ  }
 |	 j |	 j ƒ  d k ƒ }	 |	 j d |
 ƒ \ }	 }
 | j d |	 d |
 d	 t ƒ } | j d
 |  j d | ƒ } | j t ƒ | j d ƒ | j | ƒ | j | ƒ | j | ƒ | j t ƒ | j t ƒ | d k	 ru| d k set	 ‚ | j | ƒ n  | j ƒ  } | sš| j t ƒ  ƒ n | j | ƒ | j | | ƒ } | j ƒ  rÉd S| j  ƒ  S(   sp   
  Runs LLG completion (searching for 'AX') to collect a list of anomalous
  scatterers around the unit cell.
  s$   Please specify the X-ray wavelength.iÿÿÿÿ(   t
   sad_targetNi    t   othert   f_obst   r_free_flagst   verboset   xray_structuret   pdb_hierarchyt   AXi   (!   t   NoneR   t   syst   stdoutt   phaser.phenix_adaptorsR   t   phaserR   t   anomalous_flagt   AssertionErrorR   t   selectt   datat   common_setst   data_adaptort   Truet   set_ep_auto_dataR	   t   setLLGC_COMPt   addLLGC_SCATt   setWAVEt   setROOTt   setMUTEt   setHKLOt   Falset   setXYZOt   setLLGC_NCYCt   Outputt   setPackagePhenixR   t
   runEP_AUTOt   Failuret   getIotbx(   t   fmodelR
   t
   wavelengtht   prefixR   t   logt   n_cyclesR   R   R   R   t   adaptort   phaser_inputt   outt   result(    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/substructure.pyt   find_anomalous_scatterers   sH     					(	   t
   __future__R    t   libtbx.utilsR   R   R   R   R   R0   (    (    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/substructure.pyt   <module>   s   