Potential Bug in fix bond/create

Multiple fix bond/create typically creates problems while crosslinking.
What you are trying to achieve can be accomplished by defining different bondtypes that have the same bond coefficients (the bond to be created) and by using fix bond/create in a loop and also by changing atom types after crosslinking.

I have implemented complex reaction mechanisms only by using only one fix bond/create based on the above idea but its slightly difficult.

A snippet of my lammps code. I hope this helps.

label loopbondcreate
variable R equal R pair_style hybrid lj/cut/coul/long {R}
include allcoeffs_equalreactivity.txt
fix 1r all bond/create 1 14 15 {R} {bondtype} iparam 1 20 jparam 1 17 prob 1 4546 atype 426 dtype 719
run 1
Change types accordingly and then loop, keep track of conversion.

Good luck
Arun

Hi Zilu,

I replied from an account not the mail list, so resending again. IMO running multiple fix bond create (or break) commands on the same atoms will give an undefined behavior. These commands act independently and will make bond decisions based on an out-dated bond count. I’m not sure why there would be bond differences at the domain boundaries, but you could also have unexpected bonds in serial. Pierre de Buyl and Arun have some relevant posts on the mail list. Whichever route you take, I suggest checking the number of new bonds and the new bonds per atom in your final structure, to make sure its what you expect based on your bond create commands. Also - it looks to me like your fix bond create commands actually depend on their independent behavior, because they all create bonds with the same bond type and have maxbond of 1.

HTH

Tim

Hi Tim and Arun,

Your comments really inspired me a lot. Thank you.

I tested a smaller system with only one cpu core, with my previous multiple fix bond/create input script, I got an error about the bond number exceed the number of bond per atom value defined in data file, which I have meet before but without pay much attention to. I think it should be the results from the “undefined behavior”.

Inspired by Arun’s scripts, I changed my previous multiple fix bond/create input file using two different methods below:

(1) Changing Nevery value for different reaction:

fix p1 all bond/create 1 1 1 1.12246 1 iparam 1 2 jparam 1 2 prob 1 2

fix p2 all bond/create 2 2 1 1.12246 1 iparam 1 3 jparam 1 2 prob 1 3

fix p3 all bond/create 3 3 1 1.12246 1 iparam 1 4 jparam 1 2 prob 1 4

fix p4 all bond/create 4 4 1 1.12246 1 iparam 1 5 jparam 1 2 prob 1 5
fix p5 all bond/create 5 2 2 1.12246 1 iparam 1 3 jparam 1 3 prob 1 6

fix p6 all bond/create 6 3 2 1.12246 1 iparam 1 4 jparam 1 3 prob 1 7

fix p7 all bond/create 7 4 2 1.12246 1 iparam 1 5 jparam 1 3 prob 1 8

fix p8 all bond/create 8 3 3 1.12246 1 iparam 1 4 jparam 1 4 prob 1 9

fix p9 all bond/create 9 4 3 1.12246 1 iparam 1 5 jparam 1 4 prob 1 10

fix p10 all bond/create 10 4 4 1.12246 1 iparam 1 5 jparam 1 5 prob 1 11

For single core simulation with small box, it runs smoothly without any problem, however, the big box sample with 36 mpi threads crashed on some steps with error info:

“Bond atoms 82994 106937 missing on proc 8 at step 5 (…/neigh_bond.cpp:65)”

I think at particular step, multiple fix bond/create run at the same time may cause similar problem as before.

(2) Using loops and add “run 1” between each fix command.

variable j loop 500
label loop_j
fix p1 all bond/create 1 1 1 1.12246 1 iparam 1 2 jparam 1 2 prob 1 2

run 1
fix p2 all bond/create 1 2 1 1.12246 1 iparam 1 3 jparam 1 2 prob 1 3
run 1
fix p3 all bond/create 1 3 1 1.12246 1 iparam 1 4 jparam 1 2 prob 1 4
run 1
fix p4 all bond/create 1 4 1 1.12246 1 iparam 1 5 jparam 1 2 prob 1 5
run 1
fix p5 all bond/create 1 2 2 1.12246 1 iparam 1 3 jparam 1 3 prob 1 6

run 1
fix p6 all bond/create 1 3 2 1.12246 1 iparam 1 4 jparam 1 3 prob 1 7
run 1
fix p7 all bond/create 1 4 2 1.12246 1 iparam 1 5 jparam 1 3 prob 1 8
run 1
fix p8 all bond/create 1 3 3 1.12246 1 iparam 1 4 jparam 1 4 prob 1 9
run 1
fix p9 all bond/create 1 4 3 1.12246 1 iparam 1 5 jparam 1 4 prob 1 10
run 1
fix p10 all bond/create 1 4 4 1.12246 1 iparam 1 5 jparam 1 5 prob 1 11
run 1
dump $j all atom 100 dump.atom.*

write_data final.data.*

next j

jump SELF loop_j

Simulation runs smoothly, no processor boundary effect observed, however, the increasing of the crosslink degree is very low even after 500 loops. I guess the reaction in the front may has some screening effect on the following reaction which could reduced the crosslinking probability. I hope each reaction could have same probability, and I am still trying to understand Arun’s smart method. I didn’t change bond type, because I am still thinking about how to apply it to my system which is relatively simple compared with Arun’s simulation.

I am also checking the source code and try to understand and locate this “undefined behavior”. Thanks.

Zilu

Hi Tim,

You are right. I want to use this step-by-step method to control the cross-linking process, i.e. each elemental reaction could happen at each step serially. Without previous reaction, new beads cannot grow onto the cross-linked polymers. It was designed based on the assumption that each step could be done independently and all information are updated after each fix command finished. However, it looks like not that simple. And the bond number in each step are based on out dated information which is determined by the initial structure. Do you think it is possible to synchronize the status information after each fix command finished? Thanks.

Zilu

Hi,

It is possible to track the bond count across fixes only by modifying lammps
source code. I have made such a modification some time ago. I am not sure why
you have these spatial structures though.

If I understand well, you want (physically, i.e. mass, lj parameters) identical
particles to form a fully crosslinked melt. You may find
http://arxiv.org/abs/1409.7498 (disclaimer: I am an author) interesting. I
review the communication scheme for bond/create in the paper.

Regards,

Pierre

Hi Pierre,

Thanks for your help. I am reading your paper and the code fix bond/create/random you shared on github. They are extremely helpful to me. Let me try on my system. Thanks again.

Zilu

Hi Pierre,

Thanks for your help. I am reading your paper and the code fix bond/create/random you shared on github. They are extremely helpful to me. Let me try on my system. Thanks again.

Zilu