Conformational study of protonated, neutral, and deprotonated formamide