  This article presents an \textit{ab initio} study of four polymers,
polythiophene, polypyrrole, ladder-type polythiophene, and ladder-type
polypyrrole. Upon an analysis of the variation of the band gap when comparing
the unconstrained and the ladder-type polymers, a discrepancy was found between
the thiophene and the pyrrole polymer families. For polythiophene, the
ladder-type polymer has a larger gap than the unconstrained polymer whereas the
opposite is found for the pyrrole polymers. The structural properties and the
charge densities using the Bader charge analysis of these four compounds are
investigated. The different band gap behaviors in thiophene and pyrrole
polymers can be explained in terms of the competition between the bond length
alternation and the effect of the charge density in the carbon backbone.
