Hello Brahm Prakash Mishra,
The LAMMPS digest is doing odd things to the conversation, so I may have missed something, but I’ll jump in anyway since I haven’t seen the advice that was most useful when I was starting out.
That advice is “walk through a chain and write down all the interactions so you can see the pattern”.
Use whatever you like to generate a small chain. Avogadro is great for that. Point and click to make a chain of three repeat units look exactly the way you want. Ignore the actual identity if you want to do united atom simulations. Just put down spheres in approximately the right spots.
Make sure that the numbering for each atom makes sense instead of being random.
Now, walk around the chain to get a bond list. For example, for a styrene ring composed of united atoms I’d expect to see the first ring look like
bond 1 site 1 site 2
bond 2 site 2 site 3
bond 3 site 3 site 4
bond 4 site 4 site 5
bond 5 site 5 site 6
bond 6 site 6 site 1
Then, I’d expect to see an entry of bond 7 site 6 site 7 to bridge to the next part of the chain.
All of the rings will follow this pattern. Therefore, you only have to do it once and then program it up.
You can do something similar by walking around the ring for angles (e.g., angle 1 site 1 site 2 site 3) and for dihedrals (e.g., dihedral 1 site 1 site 2 site 3 site 4).
The great thing about using a program that “guesses” is that you only have to check that the guess is right for the first complete repeat unit that has bonds to the other repeat units. Don’t check a chain end only. You need to check both ends and a middle repeat unit for a chain. However, you only have to check one chain. A good program will be right on all the others. Even if the program guesses wrong, if you’ve done the work on your lists by hand, then you can figure out how to write a program that will change the wrong output to the right output by having your program read in the offending line and changing it according to a pattern. This is usually significantly faster for a mostly linear chain than doing all the coding yourself. But, doing all the coding yourself also isn’t that bad once you’ve made the lists necessary for repeat units and if you have starting positions for one chain.
However, the only way I know to get around making those lists yourself is to shell out big bucks for a complete commercial simulation package and accept that whatever they are doing to guess at connectivity is right.