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
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
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()
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()