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

Handle general periodic boxes #104

Open
agrossfield opened this issue Mar 2, 2023 · 1 comment
Open

Handle general periodic boxes #104

agrossfield opened this issue Mar 2, 2023 · 1 comment

Comments

@agrossfield
Copy link
Member

No description provided.

@agrossfield
Copy link
Member Author

I think the first step would be to create a PeriodicBox class and a subclass RectangularPrism. Calls to AtomicGroup.periodicBox currently return a GCoord, but instead should return a *PeriodicBox. Methods that consume periodic box information (e.g. Coord.distance, Coord.distance2, Coord.reimage, as well as their equivalents in AtomicGroup) would also take *PeriodicBox instead of a GCoord, and the actual reimagine would be implemented in the subclass. Each new type of periodic box would be its own subclass.

There are 3 reasons I think we should do it this way:

  1. This is a breaking change, and doing it this way BEFORE we add any actual new functionality would give us time to hunt down all of the cases where periodicity gets used. The hardest part would be verifying that there aren't any codes that did the periodicity manually as opposed to using calls to reimage.
  2. This also decouples us from the user-level issue of figuring out what kind of periodic box we have. Apparently, not all tools explicitly specify it (I think I recall NAMD deduces the box type from some combination of the angles specified). I suppose the easiest thing to do at least initially is require the user to specify it and just add it to the common options frameworks in the C++ and python.
  3. Once we support 2 types, adding a third should be easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant