ó
xTc           @   sL   d  d l  m Z d d  Z e d k rH d  d l Z e e j d  n  d S(   i˙˙˙˙(   t   divisiong      @c   
      C   s=  d d l  m } | d d d d  j d  d d d	 d
 d d d j d  d d d	 d
 d d d d d g d d d d d d j d  d d d	 d
 d d d d d d d j d  d d d	 d
 d d d d d  d d! j d  d" d d	 d
 d d d d d# d d! j d  d$ d d% d t j d& |   } t | j  d' k rD| j j	   d  S| j
 } d d( l m } d d) l m } xÉ | j D]ž } | j t |   } x  | j D] }	 | j d  k	 rÉ| j |	 j k rÉqn  d* G|	 j GHH| j d+ |	 j   d, | d- | j d. | j d/ | j d0 | j d1 |	 j d2 t  d3 | j  qWqwWd  S(4   Ni˙˙˙˙(   t   option_parsert   usages8   iotbx.distance_least_squares [options] studat_file [...]t   descriptions7   Example: iotbx.distance_least_squares strudat --tag=SODs   --tagt   actiont   storet   typet   stringt   helps%   tag as it appears in the strudat files   --repulsion_functiont   choicet   choicest   gaussiant   cost   prolsqt   defaults!   Nonbonded repulsion function typet   metavars   gaussian|cos|prolsqs   --bond_stretch_factort   floatgš?se   Bond stretch factor used in max residual calculation for nonbonded cos or gaussian repulsion functiont   FLOATs
   --n_trialst   inti   s   Number of trial per structuret   INTs   --n_macro_cycless    Number of macro cycles per trials   --devt
   store_truet   argsi    (   t   distance_least_squares(   t   strudats   strudat tag:t   si_structuret   distance_cutofft!   nonbonded_repulsion_function_typet*   nonbonded_max_residual_bond_stretch_factort   n_trialst   n_macro_cyclest   connectivitiest   all_or_nothingt   dev(   t   iotbx.option_parserR   t   optiont   Nonet   Falset   processt   lenR   t   parsert	   show_helpt   optionst   cctbx.geometry_restraintsR   t   iotbx.kriberR   t   read_all_entriest   opent   entriest   tagt$   distance_and_repulsion_least_squarest   as_xray_structuret   repulsion_functiont   bond_stretch_factorR   R   R   t   TrueR    (
   R   R   R   t   command_linet   cot   dlsR   t	   file_namet   strudat_entriest   entry(    (    sW   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/distance_least_squares.pyt   run   sv    														!					t   __main__Ni   (   t
   __future__R    R;   t   __name__t   syst   argv(    (    (    sW   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/distance_least_squares.pyt   <module>   s   >