LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] bond swap within a single chain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] bond swap within a single chain

From: Guang Shi <stefanshi1988@...24...>
Date: Tue, 19 Dec 2017 09:19:34 -0600

Dear Dr. Barnett

Please correct me if I am wrong. In LAMMPS, there are two ways you can do the bond swapping within the same chain. Either by labeling the chain using molecule id like 1,2,3,…,N/2,N/2,N/2-1,…,3,2,1 or just using the same molecule id for all beads in the chain. Both methods can break the chain. This is because that there are no checking on the order of these swapped bond. For instance, the bond swapping can occur like this: bonded pair 10 - 11 and 100 - 101 becomes 10 - 101 and 11 - 100 (note the number indicates the current position of the bead along the chain, not necessarily be the global id (tag) of the bead). As you can see, right now the chain actually break into two parts (one linear and one ring). You can do a simple test for a single chain system. I hope this help clarify the problem. 

Guang Shi 

On Dec 19, 2017, 7:13 AM -0600, Wes Barnett <w.barnett@...668...>, wrote:

On Mon, Dec 18, 2017 at 5:32 PM, Stefan Shi <stefanshi1988@...24...> wrote:

I have a single chain globule system (basically a singe long chain with LJ interactions between the beads). I want to facilitate the equilibration of such system. Right now I am looking at the method of bond swapping while keeping the chain intact (not breaking into parts). If I label the chain with molecule id like 1,2,…,N/2,N/2,…,2,1 and use the default fix bond/swap. The chain will break into parts. But this is easily overcome by adding the following code into the fix_bond_swap.cpp

I'm confused here by what you mean by "breaking into parts". Does not the chain remain whole before and after the swap?


if (molecule[i] == molecule[j] - 1)
 if (molecule[inext] != molecule[jnext] + 1) continue;
else if (molecule[i] == molecule[j] + 1)
 if (molecule[inext] != molecule[jnext] - 1) continue;

This will ensure the chain remain intact (not breaking into parts). However the swapping events between beads with small chain separation occurs much more frequently compared to the pairs of beads with large chain separation (in other words, swap mostly occurs between beads with large molecule id). This is simply because the intrachain contact probability decrease very fast with increasing of separation along the chain. This kind of problem doesn’t occur in the simulation of polymer melt where the double bridge bond swapping is often used to swap bond between different chain. There, the contact probability between beads with same molecule id on different chains doesn’t depend on the id itself. This problem undermine the efficiency of this algorithm in which we want the chain quickly relax to equilibrium.

Right now a good way I am thinking of is to only swap bond between end and a random bead near that end. Let’s say the position of each beads along the chain is 1,2,3,4…,N. The algorithm essentially goes like this:

1. randomly pick a end out of two ends of the chain, for instance, we pick first bead (position is 1).
2. scan the nearby beads, randomly pick one, say its position is i.
3. attempt the bond swapping by connecting the bead 1 and i and breaking the bond between i and i-1
4. determine the success of bond swapping using metropolis.

I have looked at the source code. If my understanding is correct, the bond_atom stores the global id of bonded atom but there is no way for a processor to know the position of a bead along the chain. At the beginning, it’s just the global tag of the bead, but after several swaps, the positions are no longer known. I am thinking to use a array to store the position of bead along the chain. But this array needed to updated across the processors which may not be a good idea due to extra communication between processors. Any suggestions on this problem would be really appreciated.  


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

James "Wes" Barnett
Postdoctoral Research Scientist
Department of Chemical Engineering