Gus Atkinson reached his maiden ton against Sri Lanka with a classy boundary on day two of the Second Test.