Quantum chemistry and molecular engineering of oligomeric and polymeric materials for optoelectronics