Electronic and vibrational properties of sp carbon atomic wires : effects of boundary constraints