ó
X_Sc           @  så   d  d l  m Z d  d l Z d  d l Td  d l Td  d l Td  d l Td  d l Td e j f d „  ƒ  YZ	 e
 d k rá e d ƒ y7 e ƒ  Z e d ƒ Z e j e ƒ Z e j e ƒ Z Wn e k
 rÓ Z e e ƒ n Xe j ƒ  n  d S(	   iÿÿÿÿ(   t   print_functionN(   t   *t   test_stride_ioc           B  s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C  sg  t  d ƒ } t | ƒ } |  j | j d ƒ |  j | j d j d ƒ |  j | j d j d ƒ |  j | j d j t d ƒ ƒ |  j | j d j	 t d ƒ ƒ |  j | j d j
 t d ƒ ƒ |  j | j d j d	 ƒ |  j | j ƒ  t d
 t ƒ ƒ |  j | j ƒ  t d t ƒ ƒ |  j | j ƒ  t d ƒ ƒ |  j | j d d	 ƒ | j d k ƒ | j ƒ  d  S(   Ns   stride/stride_test_1.txtt   1A65i    t   At   Cgš™™™™ÙW@g     €v@g\Âõ(¤c@t   1t
   QIVNSVDTMTt
   CEETTEEEEEgš™™™™9~@(   t   testdata_streamt   StrideRecordt   assertEqualt   pdbidt   residuest   chainidt   secstruct   solvent_acc_areat   floatt   phit   psit   residt   primaryt   Seqt   protein_alphabett	   secondaryt   stride_alphabett
   total_areat
   assertTruet   get_residuet   close(   t   selft   ft   g(    (    sL   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_stride.pyt   test_12   s       &c         C  sg  t  d ƒ } t | ƒ } |  j | j d ƒ |  j | j d j d ƒ |  j | j d j d ƒ |  j | j d j t d ƒ ƒ |  j | j d j	 t d ƒ ƒ |  j | j d j
 t d ƒ ƒ |  j | j d j d	 ƒ |  j | j ƒ  t d
 t ƒ ƒ |  j | j ƒ  t d t ƒ ƒ |  j | j ƒ  t d ƒ ƒ |  j | j d d	 ƒ | j d k ƒ | j ƒ  d  S(   Ns   stride/stride_test_2.txtt   1A59i   t    R   g33333SU@gÍÌÌÌÌŒSÀgR¸…ë©d@t   3t   EPTIHt   CCCCCg33333ƒ@(   R	   R
   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R    (    (    sL   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_stride.pyt   test_2B   s       &c         C  sg  t  d ƒ } t | ƒ } |  j | j d ƒ |  j | j d j d ƒ |  j | j d j d ƒ |  j | j d j t d ƒ ƒ |  j | j d j	 t d	 ƒ ƒ |  j | j d
 j
 t d ƒ ƒ |  j | j d j d ƒ |  j | j ƒ  t d t ƒ ƒ |  j | j ƒ  t d t ƒ ƒ |  j | j ƒ  t d ƒ ƒ |  j | j d d ƒ | j d k ƒ | j ƒ  d  S(   Ns   stride/stride_test_3.txtR"   i    R#   t   Ti   g333333N@i   gö(\ÂõYÀi   g33333s;Àt   12t   VTADVt   TCCCCi”  (   R	   R
   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   (   R   R   R    (    (    sL   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_stride.pyt   test_3R   s       &(   t   __name__t
   __module__R!   R'   R,   (    (    (    sL   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_stride.pyR   0   s   		t   __main__sa   Running additional tests of RunStride. These require that the STRIDE program is installed locallys   1CGP.pdb(   t
   __future__R    t   unittestt   corebiot   corebio.seqt   corebio.seq_iot   corebio.secstruc.stridet   test_corebiot   TestCaseR   R-   t   printt	   RunStridet   stridet   testdata_filenamet   fnt   process_pdbt   datat   recordt	   Exceptiont   exct   main(    (    (    sL   /Users/gec/Work/Projects/corebioproj/weblogo-3.4/test_corebio/test_stride.pyt   <module>%   s"   




3
	