Energy gap and thermal properties of selfsimilar structures: An application to epoxy resin