Learn R Programming

ChemmineR (version 2.24.2)

maximallyDissimilar: Maximally Dissimilar

Description

Find a set of compounds that are far away from each other.

Usage

maximallyDissimilar(compounds, n, similarity = cmp.similarity)

Arguments

compounds
The set of items from which to pick n dissimlar items. This can be a list of anything that the similarity function will accept. By default this will be an APset.
n
The number of dissimilar items to return.
similarity
The similarity function to use. By default Tanimoto will be used on APset objects. Internally, this will be converted to a distance function using 1-similarity(a,b), so whatever similarity function you use should return a value between 0 and 1.

Value

A vector of indexes of the dissimilar items.

Details

This will run in O(length(compounds)n) time. Based on the algorithm described in (Higgs,1997).

References

Higgs, R.E., Bemis, K.G., Watson, I.A., and Wikel, J.H. 1997. Experimental designs for selecting molecules from large chemical databases. J. Chem. Inf. Comput. Sci. 37, 861-870

Examples

Run this code
	data(apset)
	maximallyDissimilar(apset,10)

Run the code above in your browser using DataLab