ó
šxTc           @   s«   d  d l  Z d  d l Z e j j d ƒ Z d  d l Td  d l Z	 d  d l
 Z d  d l Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d  d l m Z e j ƒ  d	 „  Z d S(
   iÿÿÿÿNt
   phaser_ext(   t   *t   PhaserExceptionc           B   s   e  Z d  Z RS(   s/   
    Exception raised in the phaser module
    (   t   __name__t
   __module__t   __doc__(    (    (    s=   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/__init__.pyR   
   s   t   PhaserValueErrorc           B   s   e  Z d  Z RS(   s+   
    An object's value is not suitable
    (   R   R   R   (    (    (    s=   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/__init__.pyR      s   (   t   pickle_supportc          C   s?  t  j j d ƒ }  t j j |  d ƒ } t j j | ƒ s? t ‚ d GHt  j j d ƒ } t j j	 | ƒ sx t j
 | ƒ n  t  j j d ƒ } t  j j d ƒ } t | d ƒ } t | d ƒ } | j d ƒ | j d	 ƒ | j d ƒ | j d	 ƒ x6t | ƒ j ƒ  D]"} | j d
 ƒ rqn  | j ƒ  } t | ƒ d k  rMt d | ƒ ‚ n  | d }	 | d }
 d j | d ƒ } |
 d k rt j d d t j d d | ƒ ƒ } |
 j d ƒ sï|
 j d ƒ sï|
 j d ƒ sï|
 j d ƒ sï|
 j d ƒ r	| j d |
 | f ƒ q#| j d |
 | f ƒ qqW| j ƒ  | j ƒ  d  S(   Nt   phasert   defaultss-   phaser: Generating libtbx.phil defaults filest   includes   include/phaser_defaults.paramss    include/phaser_nma_defaults.philt   ws0   # THIS FILE IS GENERATED AUTOMATICALLY BY SCONS
s   # DO NOT EDIT!
t   #i   s,   Improper formatting of default settings:
%s
i    i   t    i   t   .t   falset   Falset   truet   Truet   nmat   scedt   ddmt   perturbt   enms   keywords.%s = %s
s   phaser.keywords.%s = %s
(   t   libtbxt   envt	   dist_patht   ost   patht   joint   isfilet   AssertionErrort   under_buildt   existst   mkdirt   opent   writet	   readlinest
   startswitht   splitt   lent   RuntimeErrort   ret   subt   close(   t   phaser_patht   defaults_filet   includes_dirt   defaults_phil_filet   nma_defaults_phil_filet   f2t   f3t   linet   fieldst   def_namet	   phil_namet   value(    (    s=   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/__init__.pyt   process_default_phil_settings)   sD    

$
(   t   cctbx.array_family.flext   cctbxt   boost.pythont   boostt   pythont
   import_extt   extR    t   libtbx.load_envR   t   os.pathR   R*   t	   ExceptionR   R   R   R   t   enableR9   (    (    (    s=   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/__init__.pyt   <module>   s   

