Structure and stability of one-dimensional (MX2)n polymers. A band structure analysis