ó
8™xTc           @   s…   d  d l  m Z d  d l m Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d	 „  Z e	 d
 k r� e ƒ  n  d S(   iÿÿÿÿ(   t   division(   t   sgtbxt&   symmetries_with_nonzero_location_partsc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   sÜ   xÕ t  j ƒ  D]Ç |  _ t  j |  j j ƒ  ƒ j ƒ  |  _ |  j j ƒ  |  _ |  j j |  j ƒ |  _	 |  j
 ƒ  xf |  j	 D][ |  _ |  j j ƒ  j ƒ  |  _ t  j |  j ƒ |  _ |  j j ƒ  j ƒ  rÆ qu n  |  j ƒ  qu Wq Wd  S(   N(   R   t   space_group_symbol_iteratort   symbolt   space_groupt   hallt	   make_tidyt   sgt   z2p_opt   change_basist   sg_pt   on_new_space_groupt   opt   rt   infot   rot_infot   translation_part_infot   tr_infot   origin_shiftt   is_zerot   on_new_symmetry(   t   self(    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyt   browse   s    !
 c         C   s5   d |  j  j ƒ  |  j  j ƒ  |  j j ƒ  f |  _ d  S(   Ns   %s (%i) [ %s ](   R   R   t   numberR	   t   as_xyzt   space_group_printout(   R   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR      s    c         C   sa   |  j  d  k	 r$ H|  j  GHd  |  _  n  d |  j j ƒ  |  j j ƒ  |  j j ƒ  |  j j ƒ  f GHd  S(   Ns   	% i |%s +(%s) @(%s)(   R   t   NoneR   t   typet   evR   t   intrinsic_partR   (   R   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR      s    (   t   __name__t
   __module__R   R   R   (    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR      s   		t   a_theorem_in_primitive_settingsc           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s°    For any space group in a primitive setting, if it were to contain
      two elements (R|t) and (R|t+d) where t is the intrinsic part,
      then d is a lattice translation.
  c         c   sc   |  j  j ƒ  } |  j j | d ƒ |  j | c d 7<|  j | d k r_ t t |  ƒ j ƒ  Vn  d  S(   Ni    i   (   R   R   t   n_translationst
   setdefaultt   superR!   R   (   R   R   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR   (   s
    c         C   s$   |  j  j ƒ  t t |  ƒ j ƒ  d  S(   N(   R"   t   clearR$   R!   R   (   R   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR   /   s    c         C   s-   |  j  j GHHd GHi  |  _ |  j ƒ  d GHd  S(   Ns'   Let's try to find a counter-example ...s   The search is over!(   t	   __class__t   __doc__R"   R   (   R   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyt   verify3   s    	
(   R   R    R'   R   R   R(   (    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR!   "   s   		t9   symmetries_with_both_nonzero_location_and_intrinsic_partsc           B   s   e  Z d  „  Z RS(   c         C   sF   |  j  j ƒ  j ƒ  rB |  j  j ƒ  j ƒ  rB t t |  ƒ j ƒ  n  d  S(   N(   R   R   R   t   location_partR$   R)   R   (   R   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR   ?   s    (   R   R    R   (    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyR)   <   s   c          C   sy   d d  l  }  |  j d d k r/ t ƒ  j ƒ  nF |  j d d k rR t ƒ  j ƒ  n# |  j d d k ru t ƒ  j ƒ  n  d  S(   Niÿÿÿÿi   R   R(   s   nonzero-location-and-intrinsic(   t   syst   argvR   R   R!   R(   R)   (   R+   (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyt   runE   s    t   __main__N(
   t
   __future__R    t   cctbxR   t   objectR   R!   R)   R-   R   (    (    (    sJ   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/examples/location_part.pyt   <module>   s   		