support a second usage model with fix bond/swap
This commit is contained in:
@ -27,15 +27,15 @@ Examples
|
|||||||
Description
|
Description
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
|
||||||
In a simulation of polymer chains, this command attempts to swap a
|
In a simulation of polymer chains this command attempts to swap a pair
|
||||||
pair of bonds, as illustrated below. This is done via Monte Carlo
|
of bonds, as illustrated below. This is done via Monte Carlo rules
|
||||||
rules using the Boltzmann acceptance criterion, typically with the
|
using the Boltzmann acceptance criterion, typically with the goal of
|
||||||
goal of equilibrating the polymer system more quickly. This fix is
|
equilibrating the polymer system more quickly. This fix is designed
|
||||||
designed for use with idealized bead-spring polymer chains where each
|
for use with idealized bead-spring polymer chains where each polymer
|
||||||
polymer is a linear chain of monomers, but LAMMPS does not check that
|
is a linear chain of monomers, but LAMMPS does not check that is the
|
||||||
is the case for your system.
|
case for your system.
|
||||||
|
|
||||||
Here are two use cases where this fix can be used effectively.
|
Here are two use cases for this fix.
|
||||||
|
|
||||||
The first use case is for swapping bonds on two different chains,
|
The first use case is for swapping bonds on two different chains,
|
||||||
effectively grafting the end of one chain onto the other chain and
|
effectively grafting the end of one chain onto the other chain and
|
||||||
@ -62,22 +62,30 @@ undergone a dramatic conformational change. This reference,
|
|||||||
effectiveness for this use case.
|
effectiveness for this use case.
|
||||||
|
|
||||||
The second use case is a collection of polymer chains with some
|
The second use case is a collection of polymer chains with some
|
||||||
fraction of their sites identified as "sticker" sites.
|
fraction of their sites identified as "sticker" sites. Initially each
|
||||||
|
polymer chain is isolated from the others in a topological sense, and
|
||||||
|
there is an intra-chain bond between every pair of sticker sites on
|
||||||
|
the same chain. Over time, bonds swap so that inter-moleculer sticker
|
||||||
|
bonds are created. This models a vitrification-style process whereby
|
||||||
|
the polymer chains all become interconnected. For this use case, if
|
||||||
|
angles are defined they should not include sticker sites.
|
||||||
|
|
||||||
|
----------
|
||||||
|
|
||||||
The bond swapping operation is invoked every *Nevery* timesteps. If
|
The bond swapping operation is invoked once every *Nevery* timesteps.
|
||||||
any bond in the entire system is swapped, a re-build of the neighbor
|
If any bond in the entire system is swapped, a re-build of the
|
||||||
lists is triggered, since a swap alters the list of which neighbors
|
neighbor lists is triggered, since a swap alters the list of which
|
||||||
are considered for pairwise interaction. At each invocation, each
|
neighbors are considered for pairwise interaction. At each
|
||||||
processor considers a random specified *fraction* of its atoms as
|
invocation, each processor considers a random specified *fraction* of
|
||||||
potential swapping monomers for this timestep. Choosing a small
|
its atoms as potential swapping monomers for this timestep. Choosing
|
||||||
*fraction* value can reduce the likelihood of a reverse swap occurring
|
a small *fraction* value can reduce the likelihood of a reverse swap
|
||||||
soon after an initial swap.
|
occurring soon after an initial swap.
|
||||||
|
|
||||||
For each monomer A1, its neighbors are looped over as B1 monomers. An
|
For each monomer A1, its neighbors are looped over as B1 monomers.
|
||||||
additional double loop of bond partners A2 of A1, and bond partners B2
|
For each A1,B1 an additional double loop of bond partners A2 of A1,
|
||||||
of B1 a is performed. For each pair of A1-A2 and B1-B2 bonds to be
|
and bond partners B2 of B1 a is performed. For each pair of A1-A2 and
|
||||||
eligible for swapping, the following 4 criteria must be met:
|
B1-B2 bonds to be eligible for swapping, the following 4 criteria must
|
||||||
|
be met:
|
||||||
|
|
||||||
(1) All 4 monomers must be in the fix group.
|
(1) All 4 monomers must be in the fix group.
|
||||||
|
|
||||||
@ -103,15 +111,22 @@ accepted. If the energy increases it is accepted with probability
|
|||||||
exp(-delta/kT) where delta is the increase in energy, k is the
|
exp(-delta/kT) where delta is the increase in energy, k is the
|
||||||
Boltzmann constant, and T is the current temperature of the system.
|
Boltzmann constant, and T is the current temperature of the system.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
IMPORTANT: Whether the swap is accepted or rejected, no other swaps
|
IMPORTANT: Whether the swap is accepted or rejected, no other swaps
|
||||||
are attempted by this processor on this timestep.
|
are attempted by this processor on this timestep. No other
|
||||||
|
eliglble 4-tuples of atoms are considered. This means that each
|
||||||
|
processor will perform either a single swap or none on timesteps
|
||||||
|
this fix is invoked.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The criterion for matching molecule IDs is how bond swaps performed by
|
The criterion for matching molecule IDs is how the first use case
|
||||||
this fix conserve chain length. To use this features you must setup
|
described above can be simulated while conserving chain lengths. This
|
||||||
the molecule IDs for your polymer chains in a certain way, typically
|
is done by setting up the molecule IDs for the polymer chains in a
|
||||||
in the data file, read by the :doc:`read_data <read_data>` command.
|
specific way, typically in the data file, read by the :doc:`read_data
|
||||||
|
<read_data>` command.
|
||||||
|
|
||||||
Consider a system of 6-mer chains. You have 2 choices. If the
|
Consider a system of 6-mer chains. You have 2 choices. If the
|
||||||
molecule IDs for monomers on each chain are set to 1,2,3,4,5,6 then
|
molecule IDs for monomers on each chain are set to 1,2,3,4,5,6 then
|
||||||
swaps will conserve chain length. For a particular monomer there will
|
swaps will conserve chain length. For a particular monomer there will
|
||||||
@ -140,6 +155,9 @@ ends of a chain swap with each other.
|
|||||||
running dynamics, but can affect calculation of some diagnostic
|
running dynamics, but can affect calculation of some diagnostic
|
||||||
quantities or the printing of unwrapped coordinates to a dump file.
|
quantities or the printing of unwrapped coordinates to a dump file.
|
||||||
|
|
||||||
|
For the second use case described above, the molecule IDs for all
|
||||||
|
sticker sites should be the same.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
This fix computes a temperature each time it is invoked for use by the
|
This fix computes a temperature each time it is invoked for use by the
|
||||||
|
|||||||
@ -261,12 +261,12 @@ void FixBondSwap::post_integrate()
|
|||||||
// J must be on-processor (J < nlocal)
|
// J must be on-processor (J < nlocal)
|
||||||
// I,J must be in fix group
|
// I,J must be in fix group
|
||||||
// I,J must have same molecule IDs
|
// I,J must have same molecule IDs
|
||||||
// use case 1:
|
// use case 1 (see doc page):
|
||||||
// if user defines mol IDs appropriately for linear chains,
|
// if user defines mol IDs appropriately for linear chains,
|
||||||
// this will mean they are same distance from (either) chain end
|
// this will mean they are same distance from (either) chain end
|
||||||
// use case 2:
|
// use case 2 (see doc page):
|
||||||
// if user defines a unique mol ID for desired bond sites (on any chain)
|
// if user defines a unique mol ID for desired bond sites (on any chain)
|
||||||
// and defines the fix group for these sites,
|
// and defines the fix group as these sites,
|
||||||
// this will mean they are eligible bond sites
|
// this will mean they are eligible bond sites
|
||||||
|
|
||||||
int ntest = static_cast<int> (fraction * neligible);
|
int ntest = static_cast<int> (fraction * neligible);
|
||||||
|
|||||||
Reference in New Issue
Block a user