questions about fix_bond_create

Dear all,

I am simulating a surface-initiated polymerization in a coarse-grained DPD system. I met some weird problem when using fix_bond_create commands. Let’s me briefly describe how I model the polymerization. I have some fixed initiator bead (type 2) on a wall surface (wall bead as type 1). The surface is immersed in monomer solution (monomer type 3, solvent type 6).

I use one fix_bond_create to initialize polymerization, monomers could form bond with initiators and once the bond forms, the monomer transfer to an active end (type 4). Initiator can only have one bond.

fix polymerization_1 all bond/create 10 2 3 0.8 1 iparam 1 2 jparam 1 4 prob 0.01

Then, when an active end meets monomers, a bond could form and the newly connected monomer is changed to type 4. Since the original active end already has two bonds, it is transferred to type 5 as nonactive bead in the polymer chain. chain 2—4 grows to 2—5---4. By this process, the polymerization could propagate. A example of polymer brush has beads 2—5---5—5---5—4.

fix polymerization_2 all bond/create 10 3 4 0.8 1 iparam 1 4 jparam 2 5 prob 0.01

This strategy works well so far, if I invoke fix polymerization_1 first and let all initiators form bonds before polymerization_2 starts. However, if I invoke fix polymerization_1 and fix polymerization_2 simultaneously. Strange chains form in the simulation, e.g. 2—4---4. And if I allow special bond extra to be 3. Chains like 2—4---4 could evolve to two branches 2—5---4(5—4).

I check the source code of fix_bond_create and problem may due to update of bondcount array. For example, do two fix bond/create maintain and update the same bondcount array? when fixs are invoked, are they invoked sequentially or simultaneously. Because I am guess, if two fix runs simultaneously and the bondcount array is not updated correctly, it may cause this problem.

Thanks.

Best
Frank

I check the source code of fix_bond_create and problem may due to update of bondcount array. For example, do two fix >bond/create maintain and update the same bondcount array? when fixs are invoked, are they invoked sequentially or >simultaneously. Because I am guess, if two fix runs simultaneously and the bondcount array is not updated correctly, it may cause >this problem.

No, each fix will have its own bondcount array, each of which will know
nothing about the other. The two fixes will not run simultaneously

(nothing can run simultaneously on the same core), they
will run one after the other within a timestep. If your bond forming
logic depends on one atom having a bondcount that combines
the updates from both fixes, then you can’t use two instances of fix bond/create

in this way.

Steve

Dear Steve,

Thanks a lot for the clarification. I can see my problem is due to the bond/created from one fix don’t know the information from the other one. You mentioned I can’t use two fix bond/create in this way, do you have any suggestion on how to achieve two types of bond/create correctly?

Best
Frank

no I don’t - not unless someone writes code to enhance
fix bond/create.

Steve