Compound M2 displayed the highest affinity to the COX-2 receptor with an ACE value of -238.55, indicating significant potential as an anti-inflammatory agent.