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: Stefan Shi <stefanshi1988@...24...>
Date: Tue, 19 Dec 2017 13:40:27 -0600

Dear Dr. Barnett

Please see the attached the data file and input file. In this data file, there is only one single chain, and the molecule ids of each bead are the same. And I also attached a output file and screenshot of one snapshot of the trajectory. As you can see in the output file `test.out`, the radius of gyration of the system diverges which is due to the breaking of the chain and small parts drift away. You can clearly see this in the snapshot. If I label the polymer chain using the molecule id like 1,2,3,…,50,49,48,….,3,2,1. The result would be same, the chain still break into parts.

Best
Guang



On Dec 19, 2017, 12:59 PM -0600, Wes Barnett <w.barnett@...668...>, wrote:


On Tue, Dec 19, 2017 at 10:19 AM, Guang Shi <stefanshi1988@...24...> wrote:
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. 

Best
Guang Shi 


Actually I don't see how swapping breaks your linear molecule into a linear chain and a ring. You'll have to elaborate a little bit more with your specific system (input files, output files, etc.) to show the problem if you want more help, or maybe I'm just missing it. I've used fix bond/swap with linear polymers and have not had any issues maintaining the size or number of chains if the segments are numbered properly according to the documentation.
 

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:
Hello,

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.  

Best
Guang

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users




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



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

Attachment: datafile.dat
Description: Binary data

Attachment: input.in
Description: Binary data

Attachment: test.out
Description: Binary data

Attachment: Screenshot 2017-12-19 13.32.08.png
Description: PNG image