Welding molecules by extending fix_bond_create?

Hello,

I have a low-density system of rigid (fix rigid) rod-like molecules in shear flow (using pair_style dpd with fluid particles) and I’d like have the molecules “weld” together if they touch during the simulation. Right now I use fix bond create with a short cutoff and stiff harmonic bonds but that doesn’t really constrain the molecules (they can still rotate around the bond). I also allow the created bonds to break so the full solution needs to continue to allow that somehow.

I’ve considered creating the appropriate angles or dihedrals during the bond creation fix or trying to dynamically create rigid groups of molecules from the two that touch, but nothing seems like the “right” way to do this (admittedly not very physical process). I’m hoping the list can suggest something!

Thanks,
Oscar

Hello,

I have a low-density system of rigid (fix rigid) rod-like molecules in shear
flow (using pair_style dpd with fluid particles) and I'd like have the
molecules "weld" together if they touch during the simulation. Right now I
use fix bond create with a short cutoff and stiff harmonic bonds but that
doesn't really constrain the molecules (they can still rotate around the
bond). I also allow the created bonds to break so the full solution needs to
continue to allow that somehow.

I don't have any comment on this part of your post.

I've considered creating the appropriate angles or dihedrals during the bond
creation fix or trying to dynamically create rigid groups of molecules from
the two that touch, but nothing seems like the "right" way to do this
(admittedly not very physical process). I'm hoping the list can suggest
something!

This is technically a little bit challenging.

I have not yet ran any simulations with fix bond/break or fix
bond/create. But I did write a script ("gen_all_angles_topo.sh")
which attempts to do what you asked for if you invoked it from within
LAMMPS. I have never tried this, but I am under the impression you
can run bash scripts like this one periodically in LAMMPS using the
"shell" command. (See below for an example how to do this.)

The script I am posting requires that you have access to the
bourne-shell, and install "moltemplate" (download and follow the
installation instructions at moltemplate.org).

  --- disclaimer ----
I never had a chance to test the "gen_all_angles_topo.sh" script, and
there is a high probability that something will fail and you will have
to debug it or ask me for help. If you are brave, feel free to try
this out with a short for-loop (see below) and let me know what
happens. I feel guilty and strange posting totally untested code
knowing that it probably does not work.

I forgot to attach the script. Here it is.

gen_all_angles_topo.sh (5.33 KB)