Software systems tend to become larger and more complicated as the functional requirements increase gradually. Well-modularized software systems are widely believed to be understood, managed and evolved easily. Software module clustering problems (SMCPs) are significant and challenging problems in software engineering whose primary aim is to obtain perfect structures of software systems according to predefined rules. To solve SMCPs, it is important to design a measure which can appropriately evaluate the quality of the structures obtained. So far, the modularization quality (the basic MQ) is widely used as the conventional measure. However, this measure does not consider global modules and edge directions between two modules. Therefore, in this paper, we design a new modularization quality measure based on the similarity, labeled as MS, to automatically guide optimization algorithms to find a good partition of software systems which considers both global modules and edge directions. To systematically validate the performance of MS, three optimization algorithms, namely hill-climbing algorithm (HC), genetic algorithm (GA), and multi-agent evolutionary algorithm (MAEA), are adopted to optimize MS on 17 real-world software systems with varying sizes. A thorough comparison shows that MS outperforms the basic MQ in guiding the optimization algorithms to find more meaningful module clusters for software systems. (C) 2016 Elsevier Inc. All rights reserved.