Beispiel #1
0
def sisa_optimize_mproc(micro_cycle_no, stack_no, miller_arrays,
                        indices_selected, cdf_set, iparams):
    from mmtbx.sisa.optimize.mod_optimize import sisa_optimizer
    somer = sisa_optimizer()
    result = somer.run_optimize(micro_cycle_no, stack_no, miller_arrays,
                                indices_selected, cdf_set, iparams)
    return result
Beispiel #2
0
def sisa_optimize_mproc(micro_cycle_no, stack_no, miller_arrays, indices_selected, cdf_set, iparams):
  from mmtbx.sisa.optimize.mod_optimize import sisa_optimizer
  somer = sisa_optimizer()
  result = somer.run_optimize(micro_cycle_no, stack_no, miller_arrays, indices_selected, cdf_set, iparams)
  return result
Beispiel #3
0
  from mmtbx.sisa.optimize.mod_mtz import mtz_handler
  mtzh = mtz_handler()
  miller_arrays, fp_sort_index_stacks, txt_out_format = mtzh.format_miller_arrays(iparams)
  print txt_out_format
  txt_out += txt_out_format

  for i in range(iparams.n_macro_cycles):
    txt_out += 'Macrocycle no. %4.0f\n'%(i+1)
    print 'Macrocycle no. %4.0f\n'%(i+1)
    for j in range(len(fp_sort_index_stacks)):
      #select the index group
      i_sel = fp_sort_index_stacks[j]

      #generate cdf_set for selected reflections
      from mmtbx.sisa.optimize.mod_optimize import sisa_optimizer
      somer = sisa_optimizer()
      hl_selected = flex.hendrickson_lattman([miller_arrays[3].data()[ii_sel] for ii_sel in i_sel])
      cdf_set = somer.calc_pdf_cdf_from_hl(hl_selected)

      def sisa_optimize_mproc_wrapper(arg):
        return sisa_optimize_mproc(arg, j, miller_arrays, i_sel, cdf_set, iparams)

      sisa_optimize_results = pool_map(
              args=range(iparams.n_micro_cycles),
              func=sisa_optimize_mproc_wrapper,
              processes=iparams.n_processors)

      list_phis = []
      foms_sum = None
      list_skews = []
      for result in sisa_optimize_results:
Beispiel #4
0
    mtzh = mtz_handler()
    miller_arrays, fp_sort_index_stacks, txt_out_format = mtzh.format_miller_arrays(
        iparams)
    print(txt_out_format)
    txt_out += txt_out_format

    for i in range(iparams.n_macro_cycles):
        txt_out += 'Macrocycle no. %4.0f\n' % (i + 1)
        print('Macrocycle no. %4.0f\n' % (i + 1))
        for j in range(len(fp_sort_index_stacks)):
            #select the index group
            i_sel = fp_sort_index_stacks[j]

            #generate cdf_set for selected reflections
            from mmtbx.sisa.optimize.mod_optimize import sisa_optimizer
            somer = sisa_optimizer()
            hl_selected = flex.hendrickson_lattman(
                [miller_arrays[3].data()[ii_sel] for ii_sel in i_sel])
            cdf_set = somer.calc_pdf_cdf_from_hl(hl_selected)

            def sisa_optimize_mproc_wrapper(arg):
                return sisa_optimize_mproc(arg, j, miller_arrays, i_sel,
                                           cdf_set, iparams)

            sisa_optimize_results = pool_map(args=range(
                iparams.n_micro_cycles),
                                             func=sisa_optimize_mproc_wrapper,
                                             processes=iparams.n_processors)

            list_phis = []
            foms_sum = None