Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a keep option for setting the segment center #24

Open
ma3ke opened this issue May 16, 2024 · 0 comments
Open

Add a keep option for setting the segment center #24

ma3ke opened this issue May 16, 2024 · 0 comments

Comments

@ma3ke
Copy link
Collaborator

ma3ke commented May 16, 2024

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.

Originally posted by @ma3ke in #23 (comment)

ma3ke added a commit that referenced this issue May 16, 2024
Both are hidden behind details blocks, since it's quite the flood of
information for rather niche features.

Issue #24 is mentioned in reference to the proposed `keep` value for
center.
ma3ke added a commit that referenced this issue May 16, 2024
Both are hidden behind details blocks, since it's quite the flood of
information for rather niche features.

Issue #24 is mentioned in reference to the proposed `keep` value for
center.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant