當前位置: 首頁>>代碼示例>>Python>>正文


Python Executor.__init__方法代碼示例

本文整理匯總了Python中Biskit.Executor.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Executor.__init__方法的具體用法?Python Executor.__init__怎麽用?Python Executor.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Biskit.Executor的用法示例。


在下文中一共展示了Executor.__init__方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, **kw ):
        """
        @param model: model analyze
        @type  model: PDBModel

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        self.model = model
#        self.model = model.clone( deepcopy=1 )

        ## temporary pdb-file
        self.f_pdb = tempfile.mktemp( '_dssp.pdb')
        self.f_out = tempfile.mktemp( '_dssp.out')

        Executor.__init__( self, 'dsspcmbi',
                           args='-na %s'%self.f_pdb,
                           catch_err=1, **kw )
開發者ID:ostrokach,項目名稱:biskit,代碼行數:27,代碼來源:DSSP.py

示例2: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, refmodel, **kw ):
        """
        @param model: structure to be aligned to reference
        @type  model: PDBModel
        @param refmodel: reference structure
        @type  refmodel: PDBModel

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        self.f_pdbin = tempfile.mktemp( '_tmalign_in.pdb' )
        self.f_pdbref= tempfile.mktemp( '_tmalign_ref.pdb' )
        self.f_matrix= tempfile.mktemp( '_tmalign_matrix.out' )

        Executor.__init__( self, 'tmalign', 
                           args= '%s %s -m %s' % (self.f_pdbin, self.f_pdbref, self.f_matrix),
                           **kw )

        self.refmodel = refmodel
        self.model = model
開發者ID:ostrokach,項目名稱:biskit,代碼行數:29,代碼來源:tmalign.py

示例3: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__(self, full=0, mode='w', verbose=1, **kw ):
        """
        @param mode: open file with this mode, w=override, a=append
        @type  mode: str
        @param full: dispaly pymol structures in fill screen mode::
                       0 - normal mode
                       1 - full screen mode
                       2 - full screen and no menues
        @type  full: 0|1|2        
        """
        self.verbose = verbose
        
        # name of .pml file
        self.foutName = tempfile.mktemp() + '.pml'

        # open for <appending|writing|reading>
        self.fgenerate = open(self.foutName, mode) 

        # will contain PymolModels or lists of PymolModels
        self.dic = {}

        ## add startup commands
        self.initPymol()

        ## set arguments for display options (normal, full, all)
        arg = '-q %s'%self.foutName
        if full == 1:
            arg = '-qe %s'%self.foutName
        if full == 2:
            arg = '-qei %s'%self.foutName
            
        Executor.__init__( self, 'pymol', args=arg,
                           catch_err=1, catch_out=1, **kw )
開發者ID:ostrokach,項目名稱:biskit,代碼行數:35,代碼來源:Pymoler.py

示例4: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, ref_model, models, **kw ):
        """
        @param ref_model: reference
        @type  ref_model: PDBModel
        @param models: structures to be compared with reference
        @type  models: [PDBModel]

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        Executor.__init__( self, 'icmbrowser', template=self.inp_head, **kw )

        self.f_ref = tempfile.mktemp('_icmcad_ref.pdb')
        self.f_pdb = tempfile.mktemp('_icmcad_%i.pdb')

        self.ref_model = ref_model
        self.models = models

        if not isinstance( self.models, list ):
            self.models = [ self.models ]
開發者ID:graik,項目名稱:biskit,代碼行數:29,代碼來源:IcmCad.py

示例5: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, **kw ): 
        """
        @param model: PDBModel
        @type  model:

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        self.f_xyzrn = tempfile.mktemp('_msms.xyzrn')

        ## output file from MSMS, will add .area exiension to file
        self.f_surf = tempfile.mktemp( )

        arg =' -surface ases -if %s  -af %s'%( self.f_xyzrn, self.f_surf )

        Executor.__init__( self, 'msms', args=arg, **kw )

        self.model = model.clone()
開發者ID:ostrokach,項目名稱:biskit,代碼行數:27,代碼來源:msms.py

示例6: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__(self, model, **kw ):
        """
        @param model: reference PDBModel
        @type  model: PDBModel

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        self.temp_pdb     = tempfile.mktemp('_foldx_.pdb')
        self.temp_command = tempfile.mktemp('_foldx_.command')
        self.temp_option  = tempfile.mktemp('_foldx_.option')
        self.temp_result  = tempfile.mktemp('_foldx_.result')
        self.temp_runlog  = tempfile.mktemp('_foldx_.log')
        self.temp_errlog  = tempfile.mktemp('_foldx_.err')

        Executor.__init__( self, 'fold_X', args='-manual %s %s %s'\
                           %(self.temp_pdb, self.temp_option,
                             self.temp_command), **kw )

        self.model = model.clone()

        ## fold-X-allowed atoms for each res in standard order
        self.aminoAcidDict = molUtils.aaAtoms
        for k in self.aminoAcidDict:
            if 'HN' not in self.aminoAcidDict[ k ]:
                self.aminoAcidDict[ k ] += ['HN']
開發者ID:ostrokach,項目名稱:biskit,代碼行數:35,代碼來源:Fold_X.py

示例7: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, tempdir=None, args='', 
                  autocap=False, capN=[], capC=[],
                  **kw ):
        """
        @param model: structure to be aligned to reference
        @type  model: PDBModel
        @param tempdir: create dedicated temporary folder (default: None)
                        see Executor
        @param tempdir: str | 0|1
        @param args: additional command line arguments for reduce (default:'')
                     example: '-OLDpdb'
        @type  args: str
        
        @param autocap: add capping NME and ACE residues to any (auto-detected)
                        false N- or C-terminal (default: False)
        @type  autocap: bool
        
        @param capN: cap N-terminal of these chains (indices) with ACE ([])
        @type  capN: [ int ]
        
        @param capC: cap C-terminal of these chains (indices) with NME ([])
        @type  capN: [ int ]

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        tempdir = self.newtempfolder( tempdir )
        
        self.f_pdbin = tempfile.mktemp( '_in.pdb', 'reduce_', dir=tempdir )
        f_out= tempfile.mktemp( '_out.pdb', 'reduce_', dir=tempdir)
        self.f_db = T.dataRoot() + '/reduce/reduce_wwPDB_het_dict.txt' 
        
        self.autocap = autocap
        self.capN = capN
        self.capC = capC
        
        lenchains = model.lenChains()

        Executor.__init__( self, 'reduce', 
                           args= '%s -BUILD -Nterm%i -DB %s %s' %\
                           (args, lenchains, self.f_db, self.f_pdbin),
                           f_out=f_out, catch_err=True,
                           tempdir=tempdir,
                           **kw )

        self.model = model
開發者ID:ostrokach,項目名稱:biskit,代碼行數:55,代碼來源:reduce.py

示例8: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, hmmdb, **kw ):
        """
        @param hmmdb: Pfam hmm database
        @type  hmmdb: str
        """
        Executor.__init__( self, 'hmmindex', args='%s'%hmmdb, **kw )

        if not os.path.exists(hmmdb+'.ssi'):
            if self.verbose:
                self.log.writeln(
                    'HMMINDEX: Indexing hmm database. This will take a while')
            
            self.run()
開發者ID:ostrokach,項目名稱:biskit,代碼行數:15,代碼來源:Hmmer.py

示例9: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
 def __init__( self, hmmFile, fastaFile, fastaID, **kw ):
     """
     @param hmmFile: path to hmm file (profile)
     @type  hmmFile: str
     @param fastaFile: path to fasta search sequence
     @type  fastaFile: str
     @param fastaID: fasta id of search sequence
     @type  fastaID: str     
     """
     self.fastaID = fastaID
     
     Executor.__init__( self, 'hmmalign',
                        args=' -q %s %s'%(hmmFile, fastaFile), **kw )
開發者ID:talonsensei,項目名稱:Bfx_scripts,代碼行數:15,代碼來源:Hmmer.py

示例10: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self,
                  template,
                  leaprc=None,
                  **kw ):
        """
        @param template: template for leap input file (file or string)
        @type  template: str
        @param leaprc: forcefield code (leaprc file ending, e.g. 'ff99')
                       OR leaprc file name (e.g, 'leaprc.f99')
                       OR leaprc path witin $AMBERHOME
                       OR leaprc path
                       default: take value from exe_tleap.dat
        @type  leaprc: str
        @param f_in:   complete leap input file -- existing or not, to be kept
                       (default: create from template and then discard)
        @type  f_in:   str
        @param f_out:  file for leap log output (default: discard)
        @type  f_out:  str

        @param out_parm: parm output file name (default: 'top.parm')
        @type  out_parm: str
        @param out_crd : coordinate output file name (default '0.crd' )
        @type  out_crd : str
        
        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        # override some Executor defaults unless they are freshly given
        kw['catchout'] = kw.get('catchout',0)

        Executor.__init__( self, 'tleap', template=template, **kw )

        self.args = '-f %s' % self.f_in

        self.leaprc = self.findLeaprc( leaprc or self.exe.leaprc )

        ## set some defaults that may or may not have been specified
        self.out_parm = kw.get('out_parm', 'top.parm' )
        self.out_crd  = kw.get('out_crd',  '0.crd')
開發者ID:ostrokach,項目名稱:biskit,代碼行數:48,代碼來源:AmberLeap.py

示例11: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__(self, models, **kw ):
        """
        @param models: if more than one model is given they are
                       concatenated and the energy is calculated
                       for the two together.
        @type  models: PDBModels
                 

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """

        self.models = models

        ## Potentials to use, pII3.0 is the default setting
        self.pairPot = 'prosa2003.pair-cb' # default: pII3.0.pair-cb 
        self.surfPot = 'prosa2003.surf-cb' # default: pII3.0.surf-cb

        ## temp files for prosa pdb file and prosa output file
        self.prosaPdbFile = tempfile.mktemp('_prosa2003.pdb')
        self.prosaOutput = tempfile.mktemp('_prosa2003.out')
        self.temp_dir = T.tempDir()

        prosaInput = tempfile.mktemp('_prosa2003.inp')

        ## set default values
        self.objectName = 'obj1'
        self.lower_k = 1
        self.upper_k = 600
        self.pot_lb = 0.
        self.pot_ub = 15.

        Executor.__init__( self, 'prosa2003', template=self.inp,
                           f_in=prosaInput, **kw )

        ## check the path to the potential files
        self.checkPotentials()
開發者ID:ostrokach,項目名稱:biskit,代碼行數:46,代碼來源:Prosa2003.py

示例12: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, cr=[0], cl=None, mode=2, breaks=0,
                  catch_err=1, **kw ):
        """
        Create a new Intervor instance for a given protein-protein complex.
        
        @param model: Structure of receptor, ligand and water
        @type  model: Biskit.PDBModel
        @param cr: receptor chains (default: [0] = first chain)
        @type  cr: [ int ]
        @param cl: ligand chains (default: None = all remaining protein chains)
        @type  cl: [ int ]
        @param breaks: consider chain breaks (backbone gaps) (default: 0)
        @type  breaks: bool or 1|0
        @param mode: what to calculate (default 2, = all with shelling order)
        @type  mode: int
        @param catch_err: deviate STDERR to temporary file (default 1)
        @type  catch_err: bool or 0|1
        @param **kw: any other keyword=value pair recognized by Executor
        """
        Executor.__init__( self, 'intervor', catch_err=catch_err, **kw )
        
        assert isinstance( model, B.PDBModel ), \
               'requires PDBModel instance'
        assert model is not None, 'requires PDBModel instance'
        
        self.model = model
        self.breaks= breaks
        self.chains_rec = cr
        self.chains_lig = cl or self.__getLigandChains( model, cr )
        
        self.local_model = None   #: will hold modified copy of model
        
        self.mode = mode
        
        ## intervor puts several output files into current working directory
        ## but respect cwd from Executor.__init__ or ExeConfig/exe_intervor.dat
        self.cwd = self.cwd or tempfile.gettempdir()

        #: will be used by intervor for different output files
        self.f_prefix = tempfile.mktemp( dir=self.exe.cwd )
        self.f_pdb = self.f_prefix + '_intervor.pdb'
        
        self.result = {}
開發者ID:graik,項目名稱:biskit,代碼行數:45,代碼來源:Intervor.py

示例13: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__(self, seq1, seq2, **kw ):
        """
        @param seq1: sequence string
        @type  seq1: str
        @param seq2: sequence string
        @type  seq2: str
        """
        self.seq1 = seq1
        self.seq2 = seq2

        self.inp1 = tempfile.mktemp('_seq1.fasta')
        self.inp2 = tempfile.mktemp('_seq2.fasta')

        # Blast Identities and Expext value
        self.ex_identity = re.compile('.+ Identities = (\d+)/(\d+) ') 
        self.ex_expect = re.compile('.+ Expect = ([\d\-e\.]+)')

        blastcmd = '-i %s -j %s  -M BLOSUM62 -p blastp -F F'\
                 %(self.inp1, self.inp2)

        Executor.__init__( self, 'bl2seq', blastcmd, catch_out=1, **kw )
開發者ID:ostrokach,項目名稱:biskit,代碼行數:23,代碼來源:Blast2Seq.py

示例14: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, **kw ):
        """
        @param model: PDBModel
        @type  model: 

        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        Executor.__init__( self, 'whatif', template=self.whatif_script,
                           f_out='/dev/null', **kw )

        self.f_pdb = tempfile.mktemp('_whatif.pdb')
        self.f_relativeASA = tempfile.mktemp('_whatif_relative.log')
        self.f_residueASA = tempfile.mktemp('_whatif_residue.log')

        self.model = model.clone()
開發者ID:graik,項目名稱:biskit,代碼行數:25,代碼來源:WhatIf.py

示例15: __init__

# 需要導入模塊: from Biskit import Executor [as 別名]
# 或者: from Biskit.Executor import __init__ [as 別名]
    def __init__( self, model, template=None, topologies=None,
                  f_charges=None,
                  f_map=None,
                  addcharge=True,
                  protonate=True,
                  autocap=False,
                  indi=4.0, exdi=80.0, salt=0.15, ionrad=2, prbrad=1.4, 
                  bndcon=4, scale=2.3, perfil=60, 
                  **kw ):
        """
        @param model: structure for which potential should be calculated
        @type  model: PDBModel
        @param template: delphi command file template [None=use default]
        @type  template: str
        @param f_radii: alternative delphi atom radii file [None=use default]
        @type  f_radii: str
        @param topologies: alternative list of residue charge/topology files
                           [default: amber/residues/all*]
        @type  topologies: [ str ]
        @param f_charges: alternative delphi charge file 
                          [default: create custom]
        @type  f_charges: str
        @param f_map   : output file name for potential map [None= discard]
        @type  f_map   : str
        @param addcharge: build atomic partial charges with AtomCharger
                          [default: True]
        @type  addcharge: bool
        
        @param protonate: (re-)build hydrogen atoms with reduce program (True)
                          see L{Biskit.Reduce}
        @type  protonate: bool
        @param autocap: add capping NME and ACE residues to any (auto-detected)
                        false N- or C-terminal and chain breaks (default: False)
                        see L{Biskit.Reduce} and L{Biskit.PDBCleaner}
        @type  autocap: bool

        @param indi: interior dilectric (4.0)
        @param exdi: exterior dielectric (80.0)
        @param salt: salt conc. in M (0.15)
        @param ionrad: ion radius (2)
        @param prbrad: probe radius (1.4) 
        @param bndcon: boundary condition (4, delphi default is 2)
        @param scale:  grid spacing (2.3)
        @param perfil: grid fill factor in % (for automatic grid, 60) 
        
        @param kw: additional key=value parameters for Executor:
        @type  kw: key=value pairs
        ::
          debug    - 0|1, keep all temporary files (default: 0)
          verbose  - 0|1, print progress messages to log (log != STDOUT)
          node     - str, host for calculation (None->local) NOT TESTED
                          (default: None)
          nice     - int, nice level (default: 0)
          log      - Biskit.LogFile, program log (None->STOUT) (default: None)
        """
        template = template or T.dataRoot() + '/delphi/' + self.F_PARAMS
        
        tempdir = self.newtempfolder( tempdir=True )  ## create new temp folder
        f_in = tempfile.mktemp( '.inp', 'delphi_', dir=tempdir )
        
        self.f_pdb = tempfile.mktemp( '.pdb', 'delphi_', dir=tempdir)

        self.keep_map = f_map != None
        self.f_map = f_map or \
            tempfile.mktemp( '_mapout.phi', 'delphi_', dir=tempdir )

##        self.f_map = None
        self.f_radii = None
        self.topologies = topologies or self.F_RESTYPES
        self.f_charges = f_charges or tempfile.mktemp( '.crg', 'delphi_',
                                                       dir=tempdir )
        
        self.protonate = protonate
        self.autocap = autocap
        self.addcharge = addcharge
        
        ## DELPHI run parameters
        self.indi=indi  # interior dilectric(4.0)
        self.exdi=exdi  # exterior dielectric(80.0)
        self.salt=salt  # salt conc. in M (0.15)
        self.ionrad=ionrad # ion radius (2)
        self.prbrad=prbrad # probe radius (1.4) 
        self.bndcon=bndcon # boundary condition (4, delphi default is 2)
        
        ## DELPHI parameters for custom grid
        self.scale=scale   # grid spacing (2.3)
        self.perfil=perfil # grid fill factor in % (for automatic grid, 60)
        self.gsize = None
        self.acenter = None
        self.strcenter = '(0.0,0.0,0.0)'
        
        kw['tempdir'] = tempdir
        kw['cwd']     = tempdir
        
        Executor.__init__( self, 'delphi', 
                           template=template,
                           f_in=f_in,
                           args=f_in,
                           catch_err=True,
                           **kw )
#.........這裏部分代碼省略.........
開發者ID:ostrokach,項目名稱:biskit,代碼行數:103,代碼來源:delphi.py


注:本文中的Biskit.Executor.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。