Creating Initial Configuration

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.

If the UA-FF you intend to use is included into the Towhee capabilities

you may want to try building your system (one chain) with Towhee and then writing out the lammps

data files with the corresponding tools embedded into Towhee. The molecular assembler into Towhee (I think) is smart enough to build your system (assuming again a known FF). The nice thing with the assembler is that the input connectivity file required

only includes a list of the atom types, the FF type and which atoms are bonded to which atoms in the structure. The assembler will figure out all the rest for you.

I have used Towhee successfully to build smaller molecules this way, yet, I cannot ensure 100% that this tool can tackle your problem although I’m somehow certain it will.

For a more precise answer (if interested) just fire a email to the Towhee users list service or check the examples provided with the distro (the mail service is SLOW and far from being as active as the Lammps one).


PS: Theoretically, Towhee should be better suited to equilibrate your full polymer melt than Lammps. This is b/c configurational-bias Monte Carlo should be able to find the equilibrium config much faster than MD in particular for long chains. However, Towhee is a serial code and for the kind of system that you are looking at, the parallel features of Lammps ± some tricks might be better suited to equilibrate your polymer system faster.