ó
=™xTc           @   sv   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 d  d l m Z d „  Z	 d „  Z
 d	 S(
   iÿÿÿÿ(   t   division(   t   crystal(   t   sgtbx(   t   uctbx(   t   io_utils(   t	   cgi_utilsc      	   C   s:   t  j |  d d d d d d f ƒ } t  j |  ƒ | _ | S(   Nt   ucparamss   1 1 1 90 90 90t   sgsymbolt   P1t
   conventiont    t   min_distance_sym_equivs   0.5t	   coor_typet   skip_columnst   0(   s   ucparamss   1 1 1 90 90 90(   s   sgsymbolR   (   s
   conventionR
   (   s   min_distance_sym_equivs   0.5(   s	   coor_typeN(   s   skip_columnsR   (   R   t   inp_from_formt   Nonet   coordinates_from_formt   coordinates(   t   formt   inp(    (    s?   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/web/wyckoff.pyt   interpret_form_data   s    	c      
   C   s=  d GHt  j | j | j ƒ t j t j d t j | j	 ƒ d t
 j d | j d | j ƒ ƒ d t | j ƒ ƒ} | j ƒ  d G| j ƒ  GHHt  j | j ƒ } | j ƒ  j ƒ  } | j ƒ  } d GHt | _ d	 GH| rÚ d
 GHn  d | j d GHd GHd GHd GHd GHd GHx | j D]} t  j | | ƒ \ } }	 | j d k rL| j |	 ƒ }	 n  | j |	 ƒ }
 |
 j ƒ  } | j d k rˆ| j | ƒ } n  | j |
 ƒ } d	 GH| r®d G| GHn  x | D] } d | f GHqµWd G| j ƒ  j ƒ  GHd G| j ƒ  j ƒ  GHd G|
 j ƒ  GHd t  |
 j! ƒ  ƒ d GHd GHqWd GHt" | _ d GHd  S(   Ns   <pre>t	   unit_cellt   space_group_infot   symbolt   table_idR   s8   Minimum distance between symmetrically equivalent sites:s$   </pre><table border=2 cellpadding=2>s   <tr>s   <th>s   <th colspan=3>s    coordinatess   <th>Multiplicitys   <th>Wyckoff letters%   <th>Site symmetry<br>point group types   <th>Special position operators   </tr>t
   Fractionals   <td>s   <td><tt>%.6g</tt>s   <td align=center>s   <td><tt>s   </tt>s   </table><pre>s   </pre>(#   R   t   show_input_symbolR   R	   R   t   special_position_settingst   symmetryR   R   R   R   R   t   floatR   t   show_summaryt   interpret_skip_columnsR   t   wyckoff_tablet   Truet   in_tableR   R   t   interpret_coordinate_linet   fractionalizet   site_symmetryt
   exact_sitet   orthogonalizet   mappingt   positiont   multiplicityt   lettert   point_group_typet   strt   special_op_simplifiedt   False(   t   server_infoR   t   statusR   R   R!   R   t   linet   skippedR   R&   R'   t   wyckoff_mappingt   x(    (    s?   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/web/wyckoff.pyt   run   sb    			
	   		N(   t
   __future__R    t   cctbxR   R   R   t	   cctbx.webR   R   R   R7   (    (    (    s?   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/cctbx/web/wyckoff.pyt   <module>   s   	