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

Voxelization problem #28

Open
jan-stevens opened this issue Jun 11, 2024 · 2 comments
Open

Voxelization problem #28

jan-stevens opened this issue Jun 11, 2024 · 2 comments

Comments

@jan-stevens
Copy link
Member

Voxelization fails for structures that contain integer value position coordinates. (outlier bug)

You can download the pdb file reproducing the bug here:
https://drive.google.com/file/d/1BsVeHqA6jDyDZC51Ft5jONQdI7FBCG2I/view?usp=sharing

@ma3ke
Copy link
Collaborator

ma3ke commented Jun 11, 2024

I went through the file and all of the pdb ATOM records appear to be fine. Or at least, the position coordinates are all floating point values afaict, no integers.

Would you mind sharing the traceback in a comment here, if you can easily produce it again?

@jan-stevens
Copy link
Member Author

The error that was thrown is:

  File "/home/jan/VirtualEnvs/bentopy/lib/python3.10/site-packages/bentopy/pack/segment.py", line 175, in voxelize
    voxels[int(x), int(y), int(z)] = 1
IndexError: index 7 is out of bounds for axis 0 with size 7

I now realise that you center the segment coordinates before voxelisation. Afte doing this, on of the bead coordinates becomes:

[7.0, 1.611799955368042, 2.050399899482727]

The voxel mask for this segment is a Numpy array of 7yz, so 7 is out of bounds for this specific segment.

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

2 participants