ó
³xTc           @   sp   d  Z  d d l m Z d d l Z d d l Z e Z d   Z e j	 d  Z
 e d k rl e
 e j d  n  d S(   s4  
Template for writing simple applications which take as input a data file
(amplitudes or intensities plus R-free flags) and a PDB file.  Note that the
script can be modified to also process the covalent geometry of the model by
setting PROCESS_PDB_FILE=True, but this also requires the CCP4 monomer
library.
i˙˙˙˙(   t   divisionNc           C   s   t  j j   S(   N(   t   mmtbxt   command_linet   generic_simple_input_phil(    (    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/examples/simple_command_line_cc.pyt   master_phil   s    c         C   sè   t  j j d |  d t   d | d t d t d t  } | j } | j } | j	 } | j
 } | j   } t | j    } t | j    t | j    k s˘ t  d d l m }	 |	 j | j   | j    j   }
 | d	 |
 IJd  S(
   Nt   argsR   t   outt   process_pdb_filet   create_fmodelt   prefer_anomalousi˙˙˙˙(   t   flexs   CC(obs-calc): %.3f(   R   R   t   load_model_and_dataR   t   PROCESS_PDB_FILEt   Truet   Falset   fmodelt   pdb_hierarchyt   xray_structuret   paramst   f_obst   abst   f_modelt   lent   indicest   AssertionErrort   scitbx.array_familyR
   t   linear_correlationt   datat   coefficient(   R   R   t   cmdlineR   R   R   R   R   t   f_calcR
   t   cc(    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/examples/simple_command_line_cc.pyt   run   s"    						*$t   __main__i   (   t   __doc__t
   __future__R    t   mmtbx.command_lineR   t   sysR   R   R   t   stdoutR    t   __name__t   argv(    (    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/mmtbx/examples/simple_command_line_cc.pyt   <module>   s   	