ó
‚™xTc           @   s–  d  d l  m Z d  d l Z d  d l Z i d d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d! d" 6d# d$ 6d% d& 6d' d( 6d) d* 6d+ d, 6d- d. 6Z i d/ d 6d0 d 6d1 d 6d d 6d2 d& 6d3 d4 6Z i  Z x e D] Z e e e e <qWd e d5 <i  Z	 x) e D]! Z e e r4e e	 e e <q4q4Wg  e
 d6 „ Z d7 „  Z e d8 k r’e e j d9 ƒ GHn  d S(:   iÿÿÿÿ(   t   divisionNt   ACEt   Bt   ALAt   At   CYSt   Ct   ASPt   Dt   GLUt   Et   PHEt   Ft   GLYt   Gt   HISt   Ht   ILEt   It   LYSt   Kt   LEUt   Lt   METt   Mt   ASNt   Nt   PROt   Pt   GLNt   Qt   ARGt   Rt   SERt   St   THRt   Tt   VALt   Vt   TRPt   Wt   TYRt   Yt   NMEt   Zt   ADEt   CYTt   GUAt   THYt   URIt   Ut   MSEc         C   s½  t  } d d l m } y d d  l } Wn t k
 rG } | d ƒ ‚ n Xt j j |  ƒ ro | j j	 |  ƒ } nH |  j
 d ƒ d k r« | j j	 d d  d t j |  ƒ ƒ } n d s· t ‚ | j ƒ  } d }	 d }
 d } x»| j ƒ  D]­} x¤| j ƒ  D]–} xƒt | j ƒ  ƒ D]o\ } } x`| j ƒ  D]R} | d k rI| j rIq'n  | j j ƒ  t k r||	 d	 t | j j ƒ  7}	 q'| j j ƒ  t k rµ|	 d	 t | j j ƒ  7}	 t } q'| j j ƒ  | k r|
 j
 | j j ƒ  ƒ d k ry|
 d
 | j j ƒ  7}
 qyq'| j j ƒ  t j ƒ  k r@|	 d	 | j j ƒ  7}	 t } q'| s'| j ƒ  d j sy| d | j j ƒ  f 7} qyq'q'WqW|	 d 7}	 qõ Wqâ W|
 r«| r«d G|
 GHn  | r¹| GHn  |	 S(   Niÿÿÿÿ(   t   Sorrys   iotbx not availables   
t   source_infot   linesi    t    s   %ss   %s s2   This residue is not converted to letter code : %s
s   Unconverted residues(   t   Truet   libtbx.utilsR4   t	   iotbx.pdbt   ImportErrort   ost   patht   existst   pdbt   inputt   findt   Nonet   flext   split_linest   AssertionErrort   construct_hierarchyt   modelst   chainst	   enumeratet
   conformerst   residuest   is_pure_main_conft   resnamet   stript	   ps_lookupt	   ds_lookupt   Falset   dna_rna_sequence_to_threet   keyst   atomst   hetero(   t   filenamet   ignore_residuest   print_unknownt   protein_onlyR4   t   iotbxt   et   pdb_iot	   hierarchyt   outlt   unkt
   error_outlt   modelt   chaint   i_conformert	   conformert   residue(    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/pdb.print_sequence.pyt   run1   sX     		"c          C   s<   x5 d d g D]' }  t  t j j t j d d ƒ ƒ GHq Wd  S(   Nt   1zapt   1a00t   PDB_MIRROR_UNCOMPRESSEDs	   pdb%s.ent(   Rf   R<   R=   t   joint   environ(   t   pdb_file(    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/pdb.print_sequence.pyt   exercisef   s    t   __main__i   (   t
   __future__R    R<   t   syst   protein_sequence_to_threeRB   RR   RO   t   keyRP   RQ   Rf   Rm   t   __name__t   argv(    (    (    sS   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/iotbx/command_line/pdb.print_sequence.pyt   <module>   sX   



3		