find_voxels_containing_coords

macromol_voxelize.find_voxels_containing_coords(grid, coords_A)[source]

Calculate the voxel indices that contain the given coordinates.

Parameters:
  • grid – An object specifying the size and location of each voxel.

  • coords_A – The coordinates of interest, in units of angstroms. The dimensions of this array should either be \((3)\), for one coordinate, or \((N, 3)\), for \(N\) coordinates.

Returns:

An integer array of voxel indices, with the same dimensions as the input coordinates.