rotate_translate_map function causes "splinching"
Hi all, I’m having a problem with the rotate_translate_map function from cctbx.maptbx. I have a 3D array (a mask of 0s and 1s, in this case) that I’m writing as a CCP4 map file. If I write it out “on the origin” (without running rotate_translate_map), then it’s fine (see attached “before.png”). However, if I apply the rotate_translate_map function and then write it out, odd features appear at the edge of the unit cell (see “after.png”). It is NOT the case that the map is going through the “periodic boundary conditions” of the unit cell (the shift is less than one unit cell, as shown by the structure which is transformed by the same amount). The minimal code is: ——————————— array = cctbx.maptbx.rotate_translate_map( unit_cell=self.unit_cell(), map_data=array, rotation_matrix=scitbx.matrix.rec([1,0,0,0,1,0,0,0,1], (3,3)).elems, translation_vector=(-1.0*scitbx.matrix.rec((X,Y,Z), (3,1))).elems ) # Write the map iotbx.ccp4_map.write_ccp4_map( file_name=f_name, unit_cell=self.unit_cell(), space_group=self.space_group(), map_data=array, labels=flex.std_string(['’]) ) ——————————— where (X,Y,Z) is a tuple for the origin shift. Is there something stupid that I’m missing? Has anyone else had the same problem? The only code for a rotate_translate_map function I could find was actually in maptbx/average_densities.h and I couldn’t see anything obviously “wrong”… though I’m not that familiar with C++. The maps and files can be found at https://www.dropbox.com/sh/xqrsk5lcn603416/AABiVO74g6A_jZMGn_DjxOmka?dl=0 all “grid” files are without translation, and all “ref” files are after translation. both are written out exactly the same (the iotbx.ccp4_map call above). I’m using the cctbx bundled with a ccp4 nightly from 2016-10-22. Thanks, Nick [cid:[email protected]][cid:[email protected]]
Hi Nick, could you please send complete script that reads the map, shifts it and then writes it out? It isn't clear what files you used.. Also, if you could reduce this to a small toy example (small box, just one blob) then it will help too. Pavel On 11/15/17 08:11, Pearce, N.M. (Nick) wrote:
Hi all,
I’m having a problem with the rotate_translate_map function from cctbx.maptbx.
I have a 3D array (a mask of 0s and 1s, in this case) that I’m writing as a CCP4 map file. If I write it out “on the origin” (without running rotate_translate_map), then it’s fine (see attached “before.png”). However, if I apply the rotate_translate_map function and then write it out, odd features appear at the edge of the unit cell (see “after.png”).
It is NOT the case that the map is going through the “periodic boundary conditions” of the unit cell (the shift is less than one unit cell, as shown by the structure which is transformed by the same amount).
The minimal code is: ——————————— array = cctbx.maptbx.rotate_translate_map( unit_cell=self.unit_cell(), map_data=array, rotation_matrix=scitbx.matrix.rec([1,0,0,0,1,0,0,0,1], (3,3)).elems, translation_vector=(-1.0*scitbx.matrix.rec((X,Y,Z), (3,1))).elems )
# Write the map iotbx.ccp4_map.write_ccp4_map( file_name=f_name, unit_cell=self.unit_cell(), space_group=self.space_group(), map_data=array, labels=flex.std_string(['’]) ) ——————————— where (X,Y,Z) is a tuple for the origin shift.
Is there something stupid that I’m missing? Has anyone else had the same problem? The only code for a rotate_translate_map function I could find was actually in maptbx/average_densities.h and I couldn’t see anything obviously “wrong”… though I’m not that familiar with C++.
The maps and files can be found at https://www.dropbox.com/sh/xqrsk5lcn603416/AABiVO74g6A_jZMGn_DjxOmka?dl=0 all “grid” files are without translation, and all “ref” files are after translation. both are written out exactly the same (the iotbx.ccp4_map call above).
I’m using the cctbx bundled with a ccp4 nightly from 2016-10-22.
Thanks, Nick
participants (2)
-
Pavel Afonine
-
Pearce, N.M. (Nick)