ó
xTc           @   s   d  d l  m Z d  d l Z d  d l m Z d  d l m Z d  d l Z	 d  d l
 Z
 d   Z e d k r} e e
 j d  n  d S(   i˙˙˙˙(   t   divisionN(   t   adptbx(   t   flexc      	   C   s  x|  D]} d G| GHy t  j j d |  } Wn1 t k
 rE   n t k
 rb t j j   n Xt j	   } t j	   } xX | j
   D]J } | j d k r° | j | j  q | j t j	 t j | j    q W| t j d  9} d G| j   GHd G| j   d GH| j   d k rMd	 GHt j d
 | d d  j d d d d  n  | j   d k rd GHt j d
 | d d  j d d d d  n  Hq Wd  S(   Ns
   File name:t	   file_namei˙˙˙˙i   s   Number of isotropic atoms:  s   Number of anisotropic atoms:i   i    s!   Histogram of isotropic B-factors:t   datat   n_slotsi
   t   prefixs     t   format_cutoffss   %7.2fs2   Histogram of eigenvalues of anisotropic B-factors:(   i˙˙˙˙i˙˙˙˙i˙˙˙˙i˙˙˙˙i˙˙˙˙i˙˙˙˙(   t   iotbxt   pdbt   inputt   KeyboardInterruptt	   Exceptiont   libtbxt   utilst   format_exceptionR   t   doublet   atomst   uijt   appendt   bt   extendR   t   eigenvaluest   u_as_bt   sizet	   histogramt   show(   t   argsR   t   pdb_inpt   isotropic_b_factorst   all_eigenvaluest   atom(    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/pdb.b_factor_stats.pyt   run
   s4    	 &t   __main__i   (   t
   __future__R    t	   iotbx.pdbR   t   cctbxR   t   cctbx.array_familyR   t   libtbx.utilsR   t   sysR    t   __name__t   argv(    (    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/pdb.b_factor_stats.pyt   <module>   s   	