How to generate Lammps input script for Coarse Grained Polymer?

This statement makes no sense, since you already provide an example input yourself. What is wrong with that input?

You seem to be misunderstanding what kind of help a forum can provide. I suggest you have a close look at Please Read This First: Guidelines and Suggestions for posting LAMMPS questions and perhaps also Guidelines for posting questions to the LAMMPS forum to get a better understanding of that.

Right now you are creating the impression of somebody that has so little understanding of the task at hand that even asking meaningful questions is difficult. A good way to avoid this is to start with explaining in detail what kind of system you want to simulate (“polymer” is way to general), what kind of steps and simulations you already have done, what your level of experience is with LAMMPS, what version of LAMMPS you are using, what kind of issues/errors you have encountered and especially what are the specific problems with the input you have posted (please note that your input is not quoted correct and thus does not render correctly, see the guidelines post for how to properly quote input files). Please also note, that your input without the data and potential table file is pretty useless for testing.