예제 #1
0
def get_mtz_column_list(hklin):

    mtz_obj = mtz_factory(file_name=hklin)

    # construct a list of columns in the file

    cnames = []

    batch_column = None
    batch_dataset = None

    for crystal in mtz_obj.crystals():
        for dataset in crystal.datasets():
            for column in dataset.columns():
                cnames.append(column.label())

    return cnames
예제 #2
0
파일: PyChefHelpers.py 프로젝트: hainm/xia2
def get_mtz_column_list(hklin):

  mtz_obj = mtz_factory(file_name = hklin)

  # construct a list of columns in the file

  cnames = []

  batch_column = None
  batch_dataset = None

  for crystal in mtz_obj.crystals():
    for dataset in crystal.datasets():
      for column in dataset.columns():
        cnames.append(column.label())

  return cnames
예제 #3
0
    cs = crystal_symmetry(unit_cell=unit_cell, space_group=space_group)

    return [
        hkl for hkl in build_set(cs,
                                 anomalous,
                                 d_min=high_resolution_limit,
                                 d_max=low_resolution_limit).indices()
    ]


if __name__ == '__main__':

    for hklin in sys.argv[1:]:

        mtz_obj = mtz_factory(file_name=hklin)
        sg = mtz_obj.space_group().build_derived_patterson_group()

        for crystal in mtz_obj.crystals():
            uc = crystal.unit_cell()

            for dataset in crystal.datasets():

                print crystal.name(), dataset.name()

        dmax, dmin = mtz_obj.max_min_resolution()

        print len(compute_unique_reflections(uc, sg, True, dmin, dmax))

        ms = set()
예제 #4
0
파일: PyChefHelpers.py 프로젝트: hainm/xia2
                               low_resolution_limit = None):
  '''Compute the list of unique reflections from the unit cell and space
  group.'''

  cs = crystal_symmetry(unit_cell = unit_cell,
                        space_group = space_group)

  return [hkl for hkl in build_set(cs, anomalous,
                                   d_min = high_resolution_limit,
                                   d_max = low_resolution_limit).indices()]

if __name__ == '__main__':

  for hklin in sys.argv[1:]:

    mtz_obj = mtz_factory(file_name = hklin)
    sg = mtz_obj.space_group().build_derived_patterson_group()

    for crystal in mtz_obj.crystals():
      uc = crystal.unit_cell()

      for dataset in crystal.datasets():

        print crystal.name(), dataset.name()

    dmax, dmin = mtz_obj.max_min_resolution()

    print len(compute_unique_reflections(uc, sg, True,
                                         dmin, dmax))

    ms = set()