Mathematical Treatise to Model Dihedral Energy in the Multiscale Modeling of Two-Dimensional Nanomaterials