unitaryfund / aquapointer

Package applying quantum algorithms to find locations of water molecules in a protein cavity
GNU General Public License v3.0
8 stars 1 forks source link

Fix skew plane slicer bug #70

Closed Misty-W closed 5 months ago

Misty-W commented 6 months ago

Fixes #67 Arbitrary plane slicer bug:

This PR fixes the bug in _shape_slice() in slicing.py, in which a wrong assumption about the projected points had resulted in a 1D array instead of a 2D array.

Now, a grid is generated on the midplane (to which all points in the slice are projected), and instead of assuming the points remain in rows and columns (as before), the projected points are snapped to the grid on the midplane.

From there the rest of the slice shaping proceeds as before and works correctly on all examples generated thus far.