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


Python Flags.get_batch_scale方法代碼示例

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


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

示例1: __init__

# 需要導入模塊: from xia2.Handlers.Flags import Flags [as 別名]
# 或者: from xia2.Handlers.Flags.Flags import get_batch_scale [as 別名]
    def __init__(self):
      # generic things
      CCP4DriverInstance.__class__.__init__(self)

      self.set_executable(os.path.join(
          os.environ.get('CBIN', ''), 'aimless'))

      if not os.path.exists(self.get_executable()):
        raise RuntimeError, 'aimless binary not found'

      self.start()
      self.close_wait()

      version = None

      for record in self.get_all_output():
        if '##' in record and 'AIMLESS' in record:
          version = record.split()[5]

      if not version:
        raise RuntimeError, 'version not found'

      Debug.write('Using version: %s' % version)

      # FIXME (i) check program exists and (ii) version is known -
      # if not then default back in the calling code to using scala.

      # recently fixed things...

      version_values = map(int, version.split('.'))

      if (version_values[1] > 5) or (version_values[1] == 5 and \
                                     version_values[2] > 10):
        self._fixed_secondary_lmax = True
      else:
        self._fixed_secondary_lmax = False

      # clear all the header junk
      self.reset()

      # input and output files
      self._scalepack = False
      self._chef_unmerged = False
      self._unmerged_reflections = None
      self._xmlout = None

      # scaling parameters
      self._resolution = None

      self._resolution_by_run = { }

      # scales file for recycling
      self._scales_file = None

      # this defaults to SCALES - and is useful for when we
      # want to refine the SD parameters because we can
      # recycle the scale factors through the above interface
      self._new_scales_file = None

      # this flag indicates that the input reflections are already
      # scaled and just need merging e.g. from XDS/XSCALE.
      self._onlymerge = False

      # by default, switch this on
      if decay_correction is None:
        self._bfactor = True
      else:
        self._bfactor = decay_correction

      # this will often be wanted
      self._anomalous = False

      # by default switch this on too...
      if partiality_correction is None:
        self._tails = True
      else:
        self._tails = partiality_correction

      # alternative for this is 'batch' err.. no rotation
      if Flags.get_batch_scale():
        self._mode = 'batch'
      else:
        self._mode = 'rotation'

      # these are only relevant for 'rotation' mode scaling
      self._spacing = 5

      if absorption_correction == None:
        self._secondary = Flags.get_aimless_secondary()
      elif absorption_correction == True:
        self._secondary = Flags.get_aimless_secondary()
      else:
        self._secondary = 0

      self._cycles = 100
      self._brotation = None
      self._bfactor_tie = None
      self._surface_tie = None
      self._surface_link = True

#.........這裏部分代碼省略.........
開發者ID:hainm,項目名稱:xia2,代碼行數:103,代碼來源:Aimless.py


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