LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] request: allow fix bond/break to change atom types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] request: allow fix bond/break to change atom types


From: Steve Plimpton <sjplimp@...24...>
Date: Wed, 5 Jul 2017 08:03:19 -0600

Hi Andrew - you could look at fix bond/create, which
has some logic to change an atom type under certain
conditions.

In principle changing atom types for atoms in a bond
should be OK to do.  You need to insure that all other
procs know about the change, e.g in their ghost or owned
atoms.  The forward comm should accomplish that
for ghost atoms.  If you had one proc change the
type of a ghost atom owned by another proc, then
you'd need a reverse comm as well, to propagate that.

Re: bigger picture, you should talk to Jake Gissinger, CCd.
He's been working on a general "fix react" command to
allow more complex reactions than fix bond break/create allow,
and your model might fit into that framework.

Steve

On Wed, Jul 5, 2017 at 7:36 AM, Andrew Jewett <jewett@...1937...> wrote:
Suppose I want to modify "fix_bond_break.cpp" so that whenever a bond
is broken, both atoms from the bond are also changed to atom type 2
(for example).  How would I go about this?

--- Goal ----
Actually, I have already written a much more general fix (based on
"fix_bond_break.cpp") which allows LAMMPS users to simulate
"intelligent molecules".  These molecules can make or break bonds and
make arbitrarily complex decisions to alter their properties in
response to contact with other molecules.  (Essentially, this fix
allows LAMMPS users to run arbitrary cellular automaton on networks of
bonded atoms.  There's a Conway's game of life example which uses this
fix.)

The reason we created this fix was to study coarse-grained machines in
cells which are driven out of equilibrium and exhibit complex behavior
(such as microtubules which are dynamically unstable, as well as
proteins which read and walk along DNA controlling gene _expression_ and
cell fate).  Because the fix is general, the hope is that anybody
could use it to model new biomolecules we don't understand yet.  We
want to eventually get many biologists interested in using LAMMPS.

Alas, I have not released this fix because when I run it in parallel,
it crashes, (unsurprisingly).  But it only seems to crash when I ask
it to alter the atom types.  Rather than post that code, just knowing
the answer to the question above would be incredibly useful.

Thanks to everyone who read this far.
Andrew

P.S. We are currently writing a paper on this, in case anyone wants be
part of that.  Help on this issue would definitely earn authorship.

P.P.S.  More specific questions (feel free to ignore these):
1) I'm curious: Is it a problem to change the atom types from within
FixBondBreak::post_integrate()?  (I ask because I noticed that
"fix_atom_swap.cpp" places the code that changes the atom types inside
"pre_exchange()" instead)
2) Is there anything else I have to do after changing the atom types
besides invoke comm->forward_comm_fix() and update
"un/pack_forward_comm()"?  (To make it easier, let's assume, for the
moment, that the distance c.utoff is the same for all atoms types.
I'll worry about that issue later.)