ó
šxTc           @   sè   d  d l  m Z d  d l  m Z d  d l m Z d  d l m Z d  d l Z d  d l Z d Z	 e e	 d e
 ƒZ e j d e d	 d
 d d ƒ Z d „  Z d e j f d „  ƒ  YZ d „  Z d „  Z e d k rä e e j d ƒ Z n  d S(   iÿÿÿÿ(   t   AlterOriginSymmate(   t   cli(   t   parse(   t   runtime_utilsNs’  
AltOrigSymMates
{
    moving_pdb = None
      .help = "path to a PDB file from an MR solution"
      .type = path
      .short_caption = Moving PDB file
      .style = bold file_type:pdb input_file

    moving
      .help = "Specify either mrsolution or pickle_solution."
    {
        mrsolution
          .help = "MR solution produced by command-line version of Phaser"
          .style = noauto
        {
            solfname = None
              .help = "path to the solution file, i.e. the .sol file"
              .type = path
            ensembles
              .help = "Ensembles constituent in this MR solution."
                      "Typically these are chains in the PDB file."
              .multiple = True
            {
                name = None
                  .help = "ID for ensemble in the MR solution, i.e. the name after"
                          "the &quot;SOLU 6DIM ENSE&quot; string in the .sol file."
                  .type = str
                xyzfname = None
                  .help = "Path to the PDB file with atoms representing this ensemble."
                          "This is the search model used by Phaser for this ensemble"
                          "prior to solving the structure. It is not the solved structure."
                  .multiple = True
                  .type = path
            }
        }

        pickle_solution
          .help = "Phaser MR solution from PHENIX GUI"
          .style = noauto
        {
            pklfname = None
              .help = "PHENIX GUI solution file from Phaser-MR, i.e. the .pkl file"
              .type = path
            philfname = None
              .help = "PHENIX GUI configuration file used as input prior to Phaser-MR, i.e. the .eff file"
              .type = path
        }
    }

    fixed_pdb = None
      .help = "path to a PDB file from an MR solution"
      .type = path
      .short_caption = Fixed PDB file
      .style = bold file_type:pdb input_file

    fixed
      .help = "Specify either mrsolution or pickle_solution."
    {
        mrsolution
          .help = "MR solution produced by command-line version of Phaser"
          .style = noauto
        {
            solfname = None
              .help = "path to the solution file, i.e. the .sol file"
              .type = path
            ensembles
              .help = "Ensembles constituent in this MR solution."
                      "Typically these are chains in the PDB file."
              .multiple = True
              .style = noauto
            {
                name = None
                  .help = "ID for ensemble in the MR solution, i.e. the name after"
                          "the 'SOLU 6DIM ENSE' string in the .sol file."
                  .type = str
                xyzfname = None
                  .help = "Path to the PDB file with atoms representing this ensemble."
                          "This is the search model used by Phaser for this ensemble"
                          "prior to solving the structure. It is not the solved structure."
                  .multiple = True
                  .type = path
            }
        }

        pickle_solution
          .help = "Phaser MR solution from PHENIX GUI"
          .style = noauto
        {
            pklfname = None
              .help = "PHENIX GUI solution file from Phaser-MR, i.e. the .pkl file"
              .type = path
            philfname = None
              .help = "PHENIX GUI configuration file used as input prior to Phaser-MR, i.e. the .eff file"
              .type = path
        }
    }

    spacegroupfname = None
      .help = "A PDB file with a CRYST1 record or an MTZ file providing"
              "the space group and cell dimension for this computation."
      .type = path
      .short_caption = Symmetry file
      .style = file_type:pdb,mtz input_file
    chosenorigin = "Any"
      .help = "By default all allowed origin shifts are probed. Specifying"
              "'2/3, 1/3, 1/2' tells the program to only explore symmetry operations"
              "for the unit cells displaced at fractional positions (2/3, 1/3, 1/2)"
      .short_caption = Only use origin
      .type = str
    use_all_SSM = False
      .help = "By default only the best sequence alignment from SSM is used."
              "Setting this value to True will include other suboptimal alignments for testing."
      .type = bool
      .short_caption = Use all SSM alignments
    no_symmetry_operations = False
      .help = "When set to False all symmetry operations are probed during the computation."
      .short_caption = Don't loop over symmetry operators
      .type = bool
    movehetatms = False
      .help = "Move hetatoms close to a chain in conjunction with that chain."
              "Hetatoms are first associated with individual chains with phenix.sort_hetatms"
              "before undergoing the same spatial transformation as the chains."
      .short_caption = Also move HETATM
      .type = bool
    debug = False
      .type = bool
    verbose = False
      .type = bool
    gui_output_dir = None
      .type = path
      .short_caption = Output directory
      .help = For PHENIX GUI only.
      .style = directory output_dir
    include scope libtbx.phil.interface.tracking_params
}
t   process_includest   master_philt   descriptionsb   Identify equivalent MR solutions of the same dataset irrespective of origin and symmetry operationt   usages   %(prog)s [options] philsc         C   s   t  j t d |  ƒS(   Nt   args(   R    t   RunFromCommandlinet   parser(   R   (    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/command_line/find_alt_orig_sym_mate.pyt   run›   s    t   launcherc           B   s   e  Z d  „  Z RS(   c         C   s-   t  j |  j ƒ t  j |  j ƒ t |  j ƒ S(   N(   t   ost   makedirst
   output_dirt   chdirR   R   (   t   self(    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/command_line/find_alt_orig_sym_mate.pyR   Ÿ   s    (   t   __name__t
   __module__R   (    (    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/command_line/find_alt_orig_sym_mate.pyR   ž   s   c         C   sC   g  } |  d  k	 r9 x$ |  D] } | j | d f ƒ q Wn  | d f S(   Ns   Transformed model(    (   t   Nonet   append(   t   resultt   output_filest	   file_name(    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/command_line/find_alt_orig_sym_mate.pyt
   finish_job¤   s
    c         C   s   t  S(   N(   t   True(   t   params(    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/command_line/find_alt_orig_sym_mate.pyt   validate_params«   s    t   __main__i   (   t   phaserR    R   t   libtbx.philR   t   libtbxR   t   sysR   t   master_paramsR   R   t
   PCLIParserR
   R   t   target_with_save_resultR   R   R   R   t   argvt   ret(    (    (    sX   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/phaser/command_line/find_alt_orig_sym_mate.pyt   <module>   s"   Š					