Effects of functional groups on the crystallization of ferric (oxyhydr)oxides