fix bond/swap not working on polymers with angles

Hi everyone,

I’ve trying to use the command fix bond/swap on a system made of two polymers almost touching in order to swap bonds between different chains.

When there are angles in the system and the angle potential is on (even if with zero energy) the chains seem not be able to actually swap bonds, even if K in the cosine potential is 0. In this case instead, only self-swapping (swapping among bonds belonging to the same chain) seem more frequent. When I remove all the angles and the angle interaction, the chains seem to swap bonds between them.

I used chains made of atoms with same molecule id in order to maximise the probability of swapping between chains and reduced the K in the FENE potential to 5-10 k_bT.

Again, this is just an example to see if it worked.

Are you aware of any bugs in this fix ?
Should I use some other things to make this work?


What version of LAMMPS are you using and
can you post a simple-as-possible input script
that illustrates the problem (e.g. one that works
and one that doesn’t)? Tim may be able to
comment (CCd).


Hi Steve and Tim,

thanks for the reply.

I think I might have done something wrong because now I can reproduce the same behaviour by using polymers without stiffness
and with stiffness but bending energy 0.

In any case, I’m observing that as soon as the bending energy is nonzero, the polymers don’t swap bonds anymore, even if I increase the probability of swapping. I can’t believe there is such a energy gap that the move is always refused by the Metropolis algorithm.

I’m attaching the lammps commands file and the input file.
I was wondering if you could give me some hints to make it work. The idea is that two “almost touching” wormlike chains
swap bonds between them randomly at any point along the contour and also can swap bonds within themselves, i.e. no length restriction.

Thanks. (5.02 KB)

commands_LAMMPS_polychain_angles.lam (5.48 KB)

Hi Davide, have you tried printing the number of attempted and accepted swaps with thermo custom (using the fix id)?. When I run your script and print these, I am seeing many accepted swaps for zero or small values of the bending stiffness. Then as I increase the stiffness to ~5, the moves are accepted less often.