ó
Ž™xTc           @   se   d  d l  m Z d  d l Z d  d l m Z d  d l Z d „  Z e d k ra e ƒ  ra d GHqa n  d S(   iÿÿÿÿ(   t   divisionN(   t   null_outc          C   sâ   t  j j d ƒ s d GHt St  j j d d d t j j ƒ }  d d l m	 } d d l
 m } | j d	 |  g d
 t ƒ  ƒ } t j j | ƒ s’ t ‚ | | d d ƒ} | j j } | j ƒ  d j ƒ  } t | ƒ d k sÞ t ‚ t S(   Nt   phenix_regressions/   phenix_regression not configured, skipping testt   relative_paths!   phenix_regression/pdb/1x9t.pdb.gzt   testiÿÿÿÿ(   t   pdb_expand_ncs(   t   any_filet   argst   outt
   force_typet   pdbi    i´   (   t   libtbxt   envt
   has_modulet   Falset   find_in_repositoriest   ost   patht   isfilet   iotbx.command_lineR   t   iotbx.file_readerR   t   runR   t   AssertionErrort   file_objectt	   hierarchyt   modelst   chainst   lent   True(   t   pdb_fileR   R   t   pdb_outt   pdb_inR   R   (    (    sM   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/regression/tst_expand_ncs.pyt   exercise   s    t   __main__t   OK(	   t
   __future__R    t   libtbx.load_envR   t   libtbx.utilsR   R   R    t   __name__(    (    (    sM   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/regression/tst_expand_ncs.pyt   <module>   s   		 