Internal rotations of aromatic polyamides: a density functional theory study