ó
Ê™xTc           @   s³   d  d l  m Z d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m	 Z	 m
 Z
 d  d l m Z m Z d  d l m Z d  d l Z d „  Z e d	 k r¯ e ƒ  n  d S(
   iÿÿÿÿ(   t   divisionN(   t   master_phil(   t   ions(   t   ChemicalEnvironmentt   ScatteringEnvironment(   t	   ion_classt
   ion_vector(   t   generate_zinc_inputsc          C   s#  d }  t  d t ƒ \ } } t j j ƒ  } t j j d | | d j |  ƒ d d g d t	 ƒ  d | d	 t
 d
 t
 d t
 ƒ } t j | ƒ t j | ƒ t j t j j | ƒ d d ƒ | j j d | j j j d d ƒ | j j | j d t
 ƒt j j d | j d | j d | j d | j j j d | j d | j j d | ƒ } | j d | ƒ xÅ | j j ƒ  D]´ } | j } t  | | j! | d d ƒ| ƒ } t" | | d | j# d | ƒ d | j# d | ƒ d | j# d  | ƒ ƒ}	 t$ | |	 ƒ }
 t% | ƒ } |
 d  k	 st' ‚ | d! k sbt' ‚ qbWd" GHd  S(#   Ngffffffð?t	   anonymizet   argss   wavelength={}s   use_phaser=Falses   use_svm=TrueR   t   outt   process_pdb_filet   create_fmodelt   prefer_anomalousi    s   _fmodel.efft   photont   tablet   sasakit   update_f_calct   pdb_hierarchyt   fmodelt   geometry_restraints_managert
   wavelengtht   paramst   nproct   logt   far_distance_cutoffg      @t
   fo_densityt   mFot   fofc_densitys   mFo-DFct   anom_densityt   anomt    t   OK((   R   t   Falset   libtbxt   utilst   null_outt   mmtbxt   command_linet   load_model_and_datat   formatR   t   Truet   ost   removet   patht   splitextt   xray_structuret   set_inelastic_form_factorsR   t   inputR   R   t   update_xray_structureR   t   identifyt   create_managerR   t   geometryR   t   validate_ionst   atoms_to_propst   valuest   i_seqR   t   find_nearby_atomsR   t   get_map_gaussian_fitR   R   t   Nonet   AssertionError(   R   t   mtz_filet   pdb_fileR$   t   cmdlinet   managert
   atom_propsR8   t   chem_envt   scatter_envt   vectort   resname(    (    sG   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/ions/svm/tst_vector.pyt   exercise   s\    		!											t   __main__(   t
   __future__R    R*   R"   t   mmtbx.command_line.water_screenR   R%   R   t   mmtbx.ions.environmentR   R   t   mmtbx.ions.svmR   R   t)   mmtbx.regression.make_fake_anomalous_dataR   t   mmtbx.command_lineRF   t   __name__(    (    (    sG   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/ions/svm/tst_vector.pyt   <module>   s   	?