ó
K™xTc           @   sÕ   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z d  d l m	 Z	 e	 d ƒ Z
 e	 d ƒ Z d
 Z d Z d Z d d d „  ƒ  YZ e d k rÑ e ƒ  Z e j d ƒ e j d ƒ e j d ƒ d GHn  d S(   iÿÿÿÿ(   t   division(   t   matrix(   t   iround(   t   sgtbx(   t	   unit_cellg      $@g     €V@g      0@g      ^@sB   




2,1,0 0 1,-1 0 0 0 -1 0 0 0 1
2,1,0 1 -1,-1 0 0 0 0 -1 0 -1 0s§  
Matrices for point-group symmetry operations and orientation of corresponding
symmetry elements, referred to a cubic, tetragonal, orthorhombic, monoclinic,
triclinic, or rhombohedral coordinate system, International Tables for
Crystallography, Volume A, 4th revised edition, 1996, p. 797.
1,1,1 1 1,1 0 0 0 1 0 0 0 1
3,1,1 1 1,0 0 1 1 0 0 0 1 0
3,-1,1 1 1,0 1 0 0 0 1 1 0 0
-1,1,0 0 0,-1 0 0 0 -1 0 0 0 -1
-3,1,1 1 1,0 0 -1 -1 0 0 0 -1 0
-3,-1,1 1 1,0 -1 0 0 0 -1 -1 0 0
2,1,0 0 1,-1 0 0 0 -1 0 0 0 1
3,1,1 -1 -1,0 0 -1 -1 0 0 0 1 0
3,-1,1 -1 -1,0 -1 0 0 0 1 -1 0 0
2,1,1 1 0,0 1 0 1 0 0 0 0 -1
2,1,1 -1 0,0 -1 0 -1 0 0 0 0 -1
4,1,0 0 1,0 -1 0 1 0 0 0 0 1
4,-1,0 0 1,0 1 0 -1 0 0 0 0 1
-2,1,0 0 1,1 0 0 0 1 0 0 0 -1
-3,1,1 -1 -1,0 0 1 1 0 0 0 -1 0
-3,-1,1 -1 -1,0 1 0 0 0 -1 1 0 0
-2,1,1 1 0,0 -1 0 -1 0 0 0 0 1
-2,1,1 -1 0,0 1 0 1 0 0 0 0 1
-4,1,0 0 1,0 1 0 -1 0 0 0 0 -1
-4,-1,0 0 1,0 -1 0 1 0 0 0 0 -1
2,1,0 1 0,-1 0 0 0 1 0 0 0 -1sÙ  
Matrices for point-group symmetry operations and orientation of corresponding
symmetry elements, referred to a hexagonal coordinate system,
International Tables for Crystallography, Volume A, 4th revised edition,
1996, p. 798.
1,1,1 1 1,1 0 0 0 1 0 0 0 1
2,1,1 -1 0,0 -1 0 -1 0 0 0 0 -1
-2,1,1 1 0,0 -1 0 -1 0 0 0 0 1
6,1,0 0 1,1 -1 0 1 0 0 0 0 1
-3,1,0 0 1,0 1 0 -1 1 0 0 0 -1
-2,1,1 2 0,1 -1 0 0 -1 0 0 0 1
2,1,0 1 0,-1 0 0 -1 1 0 0 0 -1
-6,-1,0 0 1,0 -1 0 1 -1 0 0 0 -1t   CompareToInternationalTablesc           B   s   e  Z d  „  Z d „  Z RS(   c         C   s"   i t  d 6t  d 6t d 6|  _ d  S(   Nt   ersatz_testst   IT96_Table_11_2t   IT96_Table_11_3(   t   cubict   hexagt   coord_system_lookup(   t   self(    (    sU   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/sgtbx/boost_python/tst_N_fold_rot.pyt   __init__;   s    c      	   C   s¯  |  j  | } t j | j ƒ  ƒ } t j | j ƒ  ƒ } xqt ƒ  | j d ƒ d D]U} t | j d ƒ d ƒ } t | j d ƒ d ƒ } g  | j d ƒ d j d ƒ D] } t | ƒ ^ q§ }	 t g  | j d ƒ d j d ƒ D] } t | ƒ ^ qß ƒ }
 t j	 |	 ƒ } | | } t j t
 j d	 | d
 t | ƒ d | ƒ ƒ } | | | } t j g  | j D] } t | ƒ ^ q^ƒ } | d k  r’d | } n  | j |
 k sR t ‚ qR Wd  S(   Ns   
i   t   ,i    i   i   t    i   t   ev_cartt   nt   senseiÿÿÿÿ(   R   R   t   sqrt   fractionalization_matrixt   orthogonalization_matrixt   globalst   splitt   intt   tuplet   colR   t#   n_fold_operator_from_axis_directiont   abst   elemsR   t   AssertionError(   R   t   keyt   niggli_cellt   fract   ortht   itemt   type_plus_minusR   t   xt   direct_space_axist   reference_Wt   Dt   cartesian_axist   W_cartt   W_fract   et   W_as_int(    (    sU   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/sgtbx/boost_python/tst_N_fold_rot.pyt	   test_list?   s$    !5;
	+ (   t   __name__t
   __module__R   R.   (    (    (    sU   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/sgtbx/boost_python/tst_N_fold_rot.pyR   :   s   	t   __main__R   R   R   t   OKN(   g      $@g      $@g      $@g     €V@g     €V@g     €V@(   g      $@g      $@g      0@g     €V@g     €V@g      ^@(    (   t
   __future__R    t   scitbxR   t   libtbx.math_utilsR   t   cctbxR   t   cctbx.uctbxR   R	   R
   R   R   R   R   R/   t   CR.   (    (    (    sU   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/sgtbx/boost_python/tst_N_fold_rot.pyt   <module>   s    	