royallgroup / TCC

The Topological Cluster Classification algorithm
https://royallgroup.github.io/TCC/
GNU General Public License v3.0
12 stars 5 forks source link

Python Wrapper: Box Size #89

Closed bc1032 closed 6 years ago

bc1032 commented 6 years ago

It would be helpful if the box size in the Python Wrapper was automatically calculated without any further work needing doing to it.

merrygoat commented 6 years ago

This is probably not a bug. The main reason to specify a the box is that the extremes of the particle coordinates may give an underestimate of the actual box size (particularly for low density systems) and so automatic detection can potentially change inter-particle distances a lot.

tranqui commented 6 years ago

This is a bug: the issue is that the snapshot class in the wrapper stores boxes as [[x_left, x_right], [y_left, y_right], [z_left, z_right]] format if that information is available, whereas the TCCWrapper uses the more practical [x_right - x_left, y_right - y_left, z_right - z_left] format. I will fix this so that the TCCWrapper parses the first type into the second if it is not already in the right format.

merrygoat commented 6 years ago

The wrapper now uses the format [len_x, len_y, len_z] which matches that of the TCC itself.