Structural effects in polypyrrole synthesis