ó
ą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	 d   Z
 e d k rŁ e j   Z e
 d e j d	  d
 e j   e GHn  d S(   i˙˙˙˙(   t   divisionN(   t   torsion_ncs(   t   pdb(   t   Sorryc         C   s>  t  j } d d  l } | j j d |  d | d d  } | j d | d  } | j   } t | d  d	 k r t d
 d   nB | d d } | j	 } t
 j |  } | j   }	 |	 j   j   t  j d |	 d |  }
 t |
  d k rő d GHn  xB t |
  D]4 \ } } d | d	 GHx | D] } d | GHq"WHqWd  S(   Ni˙˙˙˙t   argst   master_philt   input_typesR   t   cift   sourcest   phili   s-   mmtbx.find_torsion_angle_ncs_groups requires s   one PDB files as inputi    t   pdb_hierarchyt   paramss   No NCS groups founds	   Group %d:s     (   s   pdbR   (   R   t   torsion_ncs_paramst   iotbx.utilst   utilst   process_command_line_inputst   fetcht   extractt   lenR   t	   file_nameR   t   inputt   construct_hierarchyt   atomst   reset_i_seqt   determine_ncs_groupst	   enumerate(   R   R   t   iotbxt   input_objectst	   work_philR   t   file_objR   t   pdb_ioR
   t
   ncs_groupst   it   groupt   chain(    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/command_line/find_torsion_angle_ncs_groups.pyt   run	   s4    					t   __main__R   i   s   Time: %10.3f(   t
   __future__R    t   syst   timet   mmtbx.torsion_restraintsR   R   R   t   libtbx.utilsR   R#   t   __name__t   t0t   argv(    (    (    s^   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/command_line/find_torsion_angle_ncs_groups.pyt   <module>   s   	