Grouping molecules by their sizes LAMMPS

Dear All,

I`m working on a coarse-grained aggregation related problem wherein I start with ‘N’ number of bead-type one in the box (lets call this bead ‘C’). These beads come together with weak LJ interactions and can occasionally cluster together.
Upon clustering, one of the beads in the cluster can then swap to a second bead type ‘B’ which has much more stable interaction with both B and C bead types. Also, once there are two B beads in a cluster, I would then apply the fix bond/create to create a bond between them which is then irreversible.

Now, Iam aware of the atom/swap fix in LAMMPS. However, I want to perform the swap ONLY when there is a cluster of 2 or more beads. The free beads with no interaction partner should continue to remain in its initial type ‘C’. In this case the fix atom/swap should apply only to those groups with size > 2.

1.) Is there a way to renumber molecules by considering atoms within a distance cutoff to be part of the same molecule? I found a reference to this fix , fix renum/mol but I`m not sure if its part of the LAMMPS implementation anymore.
http://www.moltemplate.org/lammps_code/fix_renum_mol.html

2.) If the above fix works the way it is mentioned, can I then define groups based on molecule sizes? If so, how could this be achieved.

Let me know if the question is clear enough. Looking forward to a fruitful discussion on this.

Thanks and Regards

Srivastav Ranganathan

Indian Institute of Technology Bombay,

Mumbai,

India

Dear All,

I`m working on a coarse-grained aggregation related problem wherein I start
with 'N' number of bead-type one in the box (lets call this bead 'C'). These
beads come together with weak LJ interactions and can occasionally cluster
together.
Upon clustering, one of the beads in the cluster can then swap to a second
bead type 'B' which has much more stable interaction with both B and C bead
types. Also, once there are two B beads in a cluster, I would then apply
the fix bond/create to create a bond between them which is then
irreversible.

Now, Iam aware of the atom/swap fix in LAMMPS. However, I want to perform
the swap ONLY when there is a cluster of 2 or more beads. The free beads
with no interaction partner should continue to remain in its initial type
'C'. In this case the fix atom/swap should apply only to those groups with
size > 2.

1.) Is there a way to renumber molecules by considering atoms within a
distance cutoff to be part of the same molecule? I found a reference to this
fix , fix renum/mol but I`m not sure if its part of the LAMMPS
implementation anymore.
http://www.moltemplate.org/lammps_code/fix_renum_mol.html

never has been, but the author is a frequent responder on this list.

2.) If the above fix works the way it is mentioned, can I then define groups
based on molecule sizes? If so, how could this be achieved.

not sure if that is the right strategy. there is only a limited number
of groups possible in LAMMPS and most of the time what people need is
some kind of indexing and not grouping. this can be achieved by
partitioning atoms into "chunks". the above referenced fix has been
likely obsoleted by the "chunk" infrastructure in LAMMPs. you can get
a cluster id and cluster size from a compute and then use either
information (or both) to group atoms into chunks and then operate on
these chunks.

axel.

1.) Is there a way to renumber molecules by considering atoms within a
distance cutoff to be part of the same molecule? I found a reference to this
fix , fix renum/mol but I`m not sure if its part of the LAMMPS
implementation anymore.
http://www.moltemplate.org/lammps_code/fix_renum_mol.html

never has been, but the author is a frequent responder on this list.

   Hi. Yes, there is a version of "fix renum/mol" that works in
serial. You can use it to assign molecule-ID numbers to pairs of
atoms connected by the same network of bonds and/or within a cutoff
distance from each other. I intended to use it for a coarse-grained
protein aggregation paper a collaborator and I were planning to write,
but employment realities forced me to postpone that project. I
intentionally hid the link to this code and to its documentation (I'm
surprised you found it). I was embarassed that there is still a bug
(or conceptual mistake), that prevents the code from working in
parallel, so I did not intend to release this code until that was
fixed (and the paper was published). If you don't mind this severe
limitation, you can download the code for it here:
http://www.moltemplate.org/lammps_code/downloads/
   Incidentally, if you decide to use this fix, I would run it using
the "partial" keyword, since the aggregation process in your
simulation is irreversible. (IE no bonds are broken.) That way you
can run the fix more often (e.g. every 20 timesteps) without a
noticeable slowdown. (It saves time by not attempting to assign the
molecule-IDs for ALL the atoms every time. Instead only the
molecule-IDs for atoms in merging clusters are renumbered.) If you
figure out how to get this working in parallel, please let me know.
(I just don't have time these days.)

  However, as Axel pointed out, I'm not sure this helps you in your
larger goal. If you want to simulate the irreversible aggregation
soft, flexible molecules, then there are several ways you could
approach that which may differer in their implementation details, but
would ultimately behave in a similar fashion. Usually, you can get by
using a combination of existing fixes or pair styles to get something
which is good enough.

   If you're not content with that, then more generally, one can
imagine wanting modify an atom's type depending upon it's nearby
environment (nearby atoms, charges, etc), ... or the internal degrees
of freedom of the molecule its attached to, and/or it's molecular
bond-partners. (One difficult problem is trying to figure out a
general way to simulate allosteric interactions in a coarse-grained
model.) I remember asking Steve and Axel what was the most general
possible way to approach these kinds of problems. Perhaps this is the
kind of thing the user needs to write their own "fix" to accomplish.
To do that, download the LAMMPS source code, and, for inspiration look
at one of the files in the "src" directory beginning with "fix_".
Hope this helps.

Andrew

P.S. If you haven't already done this, check out:

http://www.moltemplate.org/lammps_code/pair_lj_charmm_coul_charmm_inter.html