Thermodynamic analysis of the relative effectiveness of narcotics