How to extract phases from .mtz files
0
0
Entering edit mode
3.9 years ago
ac.research ▴ 30

People, I am trying to figure out how to extract the calculated phases from an .MTZ file using CCTBX, so far I have this code:

from iotbx.reflection_file_reader import any_reflection_file
hkl_file = any_reflection_file('3hz7.mtz')
arrays = hkl_file.as_miller_arrays(merge_equivalents=False)
arrays[0].phases() #<---- Error

But I get the following error:

Traceback (most recent call last):
    arrays[0].phases()
  File "/home/acresearch/Desktop/CCTBX/mc3/envs/tenv/lib/python3.8/site-packages/cctbx/miller/__init__.py", line 3871, in phases
    assert isinstance(self.data(), flex.complex_double)
AssertionError

The CCTBX documentation does not have any explanation on how to use .phases() nor shows any example of it that allows me to understand how it is used.

Does anyone know how to extract the phases from an .MTZ file? if not with CCTBX then with another python library?

CCTBX crystallography python MTZ Phase • 832 views
ADD COMMENT

Login before adding your answer.

Traffic: 2960 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6