In this paper we perform a systematic investigation on all-trans polyacetylene chains of different lengths, end-capped with moieties of different donor or acceptor natures and different strengths, to infer useful structure/property relationship rules and behavioral patterns. The values for bond length alternation (BLA), longitudinal polarizability, and first and second hyperpolarizabilities have been computed with the Coulomb-attenuating density function (CAM-B3LYP), using response theory. A comparison of the relative effect that each end-capping combination contributes to BLA, linear, and nonlinear optical coefficients has been performed. This results in useful insights and general rules to ad hoc tailoring the molecular response for a specific characteristic. [ABSTRACT FROM AUTHOR]