Local symmetry determines the phases of linear chains: a simple model for the self-assembly of peptides