[lammps-users] Limiting group to end monomers only

Hi all,

I am looking to have end chains of homopolymers react and form bonds via fix bond/create (exact command copied below). However, I am having a problem because the middle of the chain is able to form a third bond and since I set the max amount of bonds to 2, the code exits. To avoid this, I want to be able to reduce monomers able to form new bonds, limiting it to ends of the chain.

I’ve looked at the group function but I cannot find an easy way to group just the “ends” of the polymer (the atoms with the highest and lowest indices for each molecule).

  1. Is there an group command to do this that I am missing or is there some other command that I need to use?
  2. Alternatively, how can I use variable to just target atoms that have 2 bonds at the start of the simulation and subtract those from the all group?

fix 1 all bond/create 10 1 2 1.0 1 prob 0.5 12345 iparam 2 1 jparam 2 2

Thanks in advance,

melt.data (7.61 KB)

in.tild.help (2.11 KB)

Alternatively, you could use fix bond/react.

The group command can create a group for monomers with a molecule ID greater than or less than some specified
threshold. I’m assuming that if you are using fix bond/create you have defined molecule IDs which are consecutive
along the backbone of the linear chains. So you should be able to specify a fix group that is only the ends of the chains.