Open gabriellareggiano opened 4 months ago
Yes, it's confusing. axis_order ended up being primarily used to check if a grid corresponds to the unit cell.
Almost all grid functions work only in full-cell mode, with periodic boundary conditions (grid coordinates modulo grid size) always applied. I know it sometimes gets in the way. On the other hand, having a grid from (0,0,0) to (1,1,1) simplifies things.
We could have a separate class for 3D array data that would allow offset and wouldn't have translation symmetry. I've had it in mind for a long time, but I'm not sure if it's a good idea and what such class would be useful for.
As an alternative to set_subarray
, you could modify grid.array
which is a NumPy array interface to the grid.
Hello,
I've been using gemmi for a bit and I wanted to check that this was the intended behavior. I load in a X-ray map which has a map extent that is not equal to the unit cell. When I attempt to do setup with the MapReorderOnly, the axis order of the grid stays as unknown. Here's my ipython session (just removed some typo lines), gemmi version 0.6.4:
I believe this happens because it's not in the full cell. Is this the intended usage? It's confusing to me that the axis_order is not updated unless the grid is in the full cell, since we already have the full cell function. Is it to prevent other functions from running on a non-full cell grid?
For context, I just wanted to use
set_subarray
for this non-full cell grid, which understandably asks for XYZ axis order.Thank you for your help!