A new version of an ant colony optimization (ACO) algorithm has been proposed. A modified ACO algorithmis proposed to select variables in QSAR modeling and to predict inhibiting action of some diarylimidazolederivatives on cyclooxygenase (COX) enzyme. As a comparison to this method, the evolution algorithm(EA) was also tested. Experimental results have demonstrated that the modified ACO is a useful tool forvariable selection that needs few parameters to be adjusted and converges quickly toward the optimal position.