Structural analysis of known drugs or drug-like compounds provides important information for drug design. The 142553 drug molecules in the MDL Drug Data Report database were analyzed, and then the common structural features were extracted. According to the common structural features, drug molecules were segmented into 32017 fragments, including 13642 ring fragments, 10076 linker fragments, and 8299 side chain fragments. These fragments were further used to establish three types of virtual combinatorial fragment libraries: a basic framework library containing 13574 rings; a linker library of 8051 linkers and a pharmacophore library of 34244 fragments combined by rings and side chains. After energy minimization, all fragments in the above three libraries maintain reasonable geometrical features and spatial conformations, and would be useful for building a virtual combinatorial database and de novo drug design.