Closed ma3ke closed 3 months ago
In addition to the auto
/value for setting the center, it would be wonderful to have a keep
option. This would set the center for some axis to be taken as the geometric center across that axis directly from the structure.
For instance, if the geometric center for the z-axis in some gro file is 5.0 nm, the two following expressions should behave identically:
auto, auto, 5.0
auto, auto, keep
The motivation for such a feature is that some segment structure files are already centered in some meaningful manner. A prime example would be membrane protein structures that are centered over the bilayer center.
Implementing this properly will take some consideration, however. Though the auto
/value centering was not trivial with respect to the interactions of different notions of offsets in different parts of the program, the flow of information is still rather similar.
On the other hand, the keep
directive would require knowledge of the structure at points in the program where that information is not already available. Though I don't think it is not a terrible hard change, it may reach deeper and touch more parts. It could, perhaps, prompt a refactor of the Segment
and Space
classes. I'll think about it a bit more.
In this PR, I aim to add the following features:
axis:z=10.0
. Structures will be placed according to that constraint, by only returning valid voxel locations that also match that axis constraint predicate.xyz
(the default), orz
for membrane proteins that can only be rotated over their z-axis.1.2, 3.4, 5.6
,auto, auto, auto
(the default), orauto, auto, 5.1
for some membrane protein that can be automatically centered over the xy plane, but has a fixed center over the z axis such that it can be placed with its transmembrane band over a specific z range.