getWithin_kdTree

getWithin_kdTree.getWithin_kdTree(allAtoms, refSel, outSel, keepIdx, cellDims, distance)

This method uses the periodicCKDTree class to find all atoms within given distance from user selection.

The periodic KDTree class was written by Patrick Varilly. See https://github.com/patvarilly/periodic_kdtree

Parameters:
  • allAtoms – atom coordinates for all seleted frames (3D numpy array)
  • usrSel – atom indices that will be used in query_ball_point method
  • keepIdx – array of shape (# atoms, # frames) to store ones where atoms should be kept within given distance and selection
  • cellDims – cell dimensions for all selected frames
  • distance – distance in angstrom for query_ball_point method
Returns:

the keepIdx array with ones where atoms are within given distance and 0 otherwise.