Effect of the quantum zero-point atomic motion on the optical and electronic properties of diamond and trans-polyacetylene.