Randomly bond breaking

Dear All,

I am currently working on implementing a random bond breaking algorithm on the bead-spring polymer model to mimic the polymer bond breaking induced by light/heat/water.

In stead of modifying “fix bond/break”, I decide to write a new fix called “fix setbondtype” to change the selected bond type for more flexibility.

After changing the bond type, I could use “fix bond/break” to delete those selected bonds.

My bond selecting algorithm is shown as below:

(1) Randomly changing polymer bead type from “A” to “B”, (A is ground state, B means activated state) which is already done before “fix setbondtype”.

(2) Loop over atoms in polymer group from local atom class (N=nlocal), if found the “B” particle, go to step(3), if found the “A” particle, go to step (4).

(3) For each selected atom i, loop all bonds associated with this “B” particle (I’m using “atom->map(atom->bond_atom[i])”) , and calculate their bond length, then select the longest bond to change the bond_type.

(4) For each selected atom i, loop all bonds associated with this “A” particle, if it has a bond with a “B” particle, loop all bonded particles for this “B” particle, if this “A” particle has the longest bond with selected “B” particle then change the bond type belong to this “A” particle.

I tested this algorithm on a linear polymer melt system with newton option set to off.

However I got a segmentation fault error.

After carefully looking up the source of the error. I found that the error comes from a negative number in “atom->num_bond[i]”, which means I accessed some particle info which is not stored in local proc. The problem comes from a crossing boundary bond.

It seems like the ghost atom in my fix only contain the coordination of atoms.

So my question is it possible to get the bonding information to be stored with the ghost atom? Or any suggestion on change the algorithm to avoid accessing those unavailable bond info. Thanks.

Zilu Wang

University of Akron

First, I suggest you look at the relatively new fix bond/react command, which

may be able to do what you want. I’ve CCd its author Jake Gissinger.

It is more powerful than fix bond/break.

Re: comm of additional atom properties with ghost atoms, you can

do this from a fix by calling comm->forward_comm_fix() and defining

a callback function in your fix to pack a buffer with per-atom

values of your choosing. Search for that call syntax in other fixes.

Steve