Hi AC Research,

getitng the file off PDB

phenix.fetch_pdb 3hz7 --mtz

and looking into its content

phenix.mtz.dump 3hz7.mtz

I see there are more than one data array in it.

So I think your "a = arrays[0]" is the root of trouble.

Also, doing this "f_obs = a.f_sq_as_f().map_to_asu()" unconditionally is not a good idea.

So loop over miller arrays, look at labels and pick the one that has the label you want.

Then, depending whether it is F or I, and depending on what you want (I or F) you can convert F to I or I to F, as desired.

Pavel

On 6/7/20 14:34, Academic Research wrote:
Hello Everyone,

I am trying to follow the script on the CCTBX website to get the F_obs values for my 3hz7.mtz file.

my code is as follows:

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)
a = arrays[0]
f_obs = a.f_sq_as_f().map_to_asu()

I get this following error:
Traceback (most recent call last):
  File "crystal.py", line 143, in <module>
    if __name__ == '__main__': main()
  File "crystal.py", line 140, in main
    Cls.features('3hz7.mtz')
  File "crystal.py", line 63, in features
    f_obs = a.f_sq_as_f().map_to_asu()
  File "/home/acresearch/Desktop/CCTBX/mc3/envs/tenv/lib/python3.8/site-packages/cctbx/miller/__init__.py", line 2374, in f_sq_as_f
    result = array(self, converter(self.data()).f)
Boost.Python.ArgumentError: Python argument types in
    array_f_sq_as_f_xtal_3_7.__init__(array_f_sq_as_f_xtal_3_7, int)
did not match C++ signature:
    __init__(_object*, scitbx::af::const_ref<double, scitbx::af::trivial_accessor>)
    __init__(_object*, scitbx::af::const_ref<double, scitbx::af::trivial_accessor>, scitbx::af::const_ref<double, scitbx::af::trivial_accessor>)
    __init__(_object*, scitbx::af::const_ref<double, scitbx::af::trivial_accessor>, scitbx::af::const_ref<double, scitbx::af::trivial_accessor>, double)


When I run:
print(i_obs.info())
I get:
3hz7.mtz:FREE

print(a.observation_type())
gives:
None

I repeated this script to many structure from the PDB (all solved by x-rays) yet I get the exact same output for all of them.

How can I get the F_obs values? Can someone please assist me?

Regards,

AC Research

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