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

[FEATURE] Distances should be able to do periodic boundaries #30

Open
richardjgowers opened this issue Mar 10, 2020 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@richardjgowers
Copy link

The distance calculations don't seem to be able to handle periodic boundaries, they probably should. Even with a centered and sane configuration, linalg.norm isn't going to give the minimum distance between two centers. One way of doing this would be mda.lib.distances.distance_array or mda.lib.distances.calc_bonds which will take a unitcell (box=) to given a minimum distance between two centers.

Maybe less importantly, calling center_of_geometry() isn't always going to give the real center if the atoms are split over a periodic boundary, eg if the atoms were all forced to be within the primary unit cell and the residue was bridging a box boundary.

@richardjgowers richardjgowers added the enhancement New feature or request label Mar 10, 2020
@richardjgowers
Copy link
Author

e: the center_of_mass problem can be resolved by using the unwrap keyword in mda

@joaomcteixeira
Copy link
Owner

Hi @richardjgowers , thanks very much for this scientific input, indeed! I will look carefully into your suggested implementation in the following days and come back to this issue asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants