Skip to main content
  • Poster presentation
  • Open access
  • Published:

Efficient extraction of canonical spatial relationships using a recursive enumeration of k-subsets

The spatial arrangement of a chemical compound plays an important role regarding the related properties or activities. A straightforward approach to encode the geometry is to enumerate pairwise spatial relationships between k substructures, like functional groups or subgraphs. This leads to a combinatorial explosion with the number of features of interest and redundant information. The goal of this work is to compute all possible k-subsets of spatial points and to extract a single canonical descriptor for each subset in sub-polynomial computation time. More precisely, the problem is to reduce the complexity of n k = n·(n - 1)...(n - k) possible relationships (patterns or descriptors) for n features and k-point relationships.

We propose a two-step algorithm to solve this problem. A modified algorithm for the computation of the binomial coefficient computes the k-subsets [1] containing the possible combinations of the n relevant features. If a k-subset is completed in the inner recursion, the algorithm computes a canonical representation for it. By defining a natural order by means of the geometrical center of gravity of the k points, we extract k patterns that describe the distance to the center of gravity and type of the spatial feature k F. Then, the algorithm returns a unique identifier for the lexicographically sorted array of patterns. If applicable (), an additional identifier is added which has the form , where d ij denotes the geometrical distance between features i, j. Else (), this step is omitted. Therefore, this approach also considers stereochemistry. Finally, one feature is returned for each k-subset resulting in a set of C(n, k) patterns describing the structure.

The main result is that the number of features is reduced from n k to C(n, k), which equals the binomial coefficient. This procedure is useful in combination with similarity approaches that use spatial relationships, like pharmacophore searches, fingerprints, or graph kernels. We experimentally validated the algorithm on numerous QSAR benchmark sets in combination with the pharmacophore kernel [2].


  1. Rolfe T: SIGCSE Bull. 2001, 33 (3): 35-36. 10.1145/571922.571950.

    Article  Google Scholar 

  2. Mahé P, Ralaivola L, Stoven V, Vert J-P: J Chem Inf Mod. 2006, 46 (5): 2003-2014. 10.1021/ci060138m.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Rights and permissions

Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License ( ), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.

Reprints and permissions

About this article

Cite this article

Hinselmann, G., Fechner, N., Jahn, A. et al. Efficient extraction of canonical spatial relationships using a recursive enumeration of k-subsets. J Cheminform 2 (Suppl 1), P36 (2010).

Download citation

  • Published:

  • DOI: