Chemical libraries can be generated using an approach based on selecting data subsets from large libraries and performing a partition and selection of various data subsets. Another way of designing chemical libraries is by constructing compound libraries based on a set of chemical fragments, which can be obtained through retrosynthetic analysis of a dataset of original compounds .