The effect of calcium and magnesium ions on drug-receptor interactions