Ab initio calculation of optical rotation