Electronic and lattice structures in potassium-doped stage-1 polyacetylene