Hi Pavel, Thank you for your answer and hints. Trying to just test and understand how the libraries works, this is as far as I have come: import iotbx.pdb import mmtbx.model import mmtbx.f_model from iotbx import reflection_file_reader pdb_file = '1gwd.pdb' mtz_file = '1gwd.mtz' pdb_inp = iotbx.pdb.input(file_name=pdb_file) model = mmtbx.model.manager(model_input=pdb_inp) miller_arrays = reflection_file_reader.any_reflection_file(file_name=mtz_file).as_miller_arrays() f_obs = miller_arrays[1] fmodel = mmtbx.f_model.manager(f_obs=f_obs, xray_structure=model.get_xray_structure(), target_name='ls_wunit_k1') gradients = fmodel.one_time_gradients_wrt_atomic_parameters() print(list(gradients.d_target_d_site_cart()))
[(0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), […]
I would expect the gradients to not be zero for all scatterers so obviously I am doing something wrong – help on how to get further would be very much appreciated.
Best regards
Kristoffer
From: Pavel Afonine