Hi Vincent,

I don't think Reflection File Editor can do that but I just wrote a cctbx based script to do that. Save lines below (between ****) into a file convert.py:

****

from iotbx import mtz
from iotbx import reflection_file_reader

def run(file_name = "1yjp_refine_001.mtz"):
  miller_arrays = reflection_file_reader.any_reflection_file(file_name =
    file_name).as_miller_arrays()
  mtz_dataset = None
  for ma in miller_arrays[1:]:
    label = ma.info().label_string()
    if "," in label: label = label[:label.index(",")]
    if mtz_dataset is None:
      mtz_dataset = ma.as_mtz_dataset(column_root_label = label)
    else:
      mtz_dataset.add_miller_array(ma, column_root_label = label)
  mtz_dataset.mtz_object().write("output.mtz")

if __name__ == '__main__':
  run()

****

then put the correct file name instead of 1yjp_refine_001.mtz and run

phenix.python convert.py

The output output.mtz file will have all the arrays in one data block.

Good luck!
Pavel


On 9/28/23 07:36, vincent Chaptal wrote:
Hi,

I have a reflection file generated by phenix.refine, which contains  HKL, I, Rfree, SIGI, Fs..., Fmodel... and map coeffs. All these arrays are placed in several dataset#.
I would like to place them all in a single Dataset#. Is it possible to do that using the reflection file editor? I've tried to modify the output with "edit arrays" but I can't figure out how to do that?

Thank you.
Best
Vincent

--

Vincent Chaptal, PhD

Director of GdR APPICOM

Drug Resistance and Membrane Proteins Lab


MMSB -UMR5086

7 passage du Vercors 

69007 LYON

FRANCE

+33 4 37 65 29 01

http://www.appicom.cnrs.fr

http://mmsb.cnrs.fr/en/



_______________________________________________
phenixbb mailing list
[email protected]
http://phenix-online.org/mailman/listinfo/phenixbb
Unsubscribe: [email protected]