Molecular topology is a portion of mathematical chemistry managing the logarithmic portrayal of chemical materials, permitting a tremendous yet straightforward characterization of the compounds. Concerning the traditional physical-chemical descriptors, it is conceivable to set up direct quantitative structure-activity relationship methods to associate with such descriptors termed topological indices. In this study, we have developed the mathematical technique to study the Wiener polarity index of chemical materials without squares. We have taken the cancer treatment drugs such as lenvatinib and cabozantinib to illustrate our approach. In addition, we explored the inherent property of silicate, Sierpiński, and octahedral-related complex materials that the edge set can be decomposed in such a way that any edge in the same part of the decomposition has an equal number of neighboring vertices and applied the technique to derive the formulae for these materials.