Density functional studies of conformational properties of conjugated systems containing heteroatoms