File: fix_bond_create.txt

package info (click to toggle)
lammps 0~20140523.gite5e877d-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 193,012 kB
  • ctags: 48,147
  • sloc: cpp: 458,874; python: 21,769; fortran: 16,023; ansic: 12,503; perl: 3,687; sh: 3,221; makefile: 1,366; f90: 1,177; xml: 788; objc: 238; lisp: 169; tcl: 61; csh: 16; awk: 14
file content (239 lines) | stat: -rwxr-xr-x 11,400 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

fix bond/create command :h3

[Syntax:]

fix ID group-ID bond/create Nevery itype jtype Rmin bondtype keyword values ... :pre

ID, group-ID are documented in "fix"_fix.html command :ulb,l
bond/create = style name of this fix command :l
Nevery = attempt bond creation every this many steps :l
itype,jtype = atoms of itype can bond to atoms of jtype :l
Rmin = 2 atoms separated by less than Rmin can bond (distance units) :l
bondtype = type of created bonds :l
zero or more keyword/value pairs may be appended to args :l
keyword = {iparam} or {jparam} or {prob} or {atype} or {dtype} or {itype} :l
  {iparam} values = maxbond, newtype
    maxbond = max # of bonds of bondtype the itype atom can have
    newtype = change the itype atom to this type when maxbonds exist
  {jparam} values = maxbond, newtype
    maxbond = max # of bonds of bondtype the jtype atom can have
    newtype = change the jtype atom to this type when maxbonds exist
  {prob} values = fraction seed
    fraction = create a bond with this probability if otherwise eligible
    seed = random number seed (positive integer)
  {atype} value = angletype
    angletype = type of created angles
  {dtype} value = dihedraltype
    dihedraltype = type of created dihedrals
  {itype} value = impropertype
    impropertype = type of created impropers :pre
:ule

[Examples:]

fix 5 all bond/create 10 1 2 0.8 1
fix 5 all bond/create 1 3 3 0.8 1 prob 0.5 85784 iparam 2 3
fix 5 all bond/create 1 3 3 0.8 1 prob 0.5 85784 iparam 2 3 atype 1 dtype 2 :pre

[Description:]

Create bonds between pairs of atoms as a simulation runs according to
specified criteria.  This can be used to model cross-linking of
polymers, the formation of a percolation network, etc.  In this
context, a bond means an interaction between a pair of atoms computed
by the "bond_style"_bond_style.html command.  Once the bond is created
it will be permanently in place.  Optionally, the creation of a bond
can also create angle, dihedral, and improper interactions that bond
is part of.  See the discussion of the {atype}, {dtype}, and {itype}
keywords below.

This is different than a "pairwise"_pair_style.html bond-order
potential such as Tersoff or AIREBO which infers bonds and many-body
interactions based on the current geometry of a small cluster of atoms
and effectively creates and destroys bonds and higher-order many-body
interactions from timestep to timestep as atoms move.

A check for possible new bonds is performed every {Nevery} timesteps.
If two atoms I,J are within a distance {Rmin} of each other, if I is
of atom type {itype}, if J is of atom type {jtype}, if both I and J
are in the specified fix group, if a bond does not already exist
between I and J, and if both I and J meet their respective {maxbond}
requirement (explained below), then I,J is labeled as a "possible"
bond pair.

If several atoms are close to an atom, it may have multiple possible
bond partners.  Every atom checks its list of possible bond partners
and labels the closest such partner as its "sole" bond partner.  After
this is done, if atom I has atom J as its sole partner, and atom J has
atom I as its sole partner, then the I,J bond is "eligible" to be
formed.

Note that these rules mean an atom will only be part of at most one
created bond on a given timestep.  It also means that if atom I
chooses atom J as its sole partner, but atom J chooses atom K is its
sole partner (due to Rjk < Rij), then this means atom I will not form
a bond on this timestep, even if it has other possible bond partners.

It is permissible to have {itype} = {jtype}.  {Rmin} must be <= the
pairwise cutoff distance between {itype} and {jtype} atoms, as defined
by the "pair_style"_pair_style.html command.

The {iparam} and {jparam} keywords can be used to limit the bonding
functionality of the participating atoms.  Each atom keeps track of
how many bonds of {bondtype} it already has.  If atom I of
itype already has {maxbond} bonds (as set by the {iparam}
keyword), then it will not form any more.  Likewise for atom J.  If
{maxbond} is set to 0, then there is no limit on the number of bonds
that can be formed with that atom.

The {newtype} value for {iparam} and {jparam} can be used to change
the atom type of atom I or J when it reaches {maxbond} number of bonds
of type {bondtype}.  This means it can now interact in a pairwise
fashion with other atoms in a different way by specifying different
"pair_coeff"_pair_coeff.html coefficients.  If you do not wish the
atom type to change, simply specify {newtype} as {itype} or {jtype}.

The {prob} keyword can also effect whether an eligible bond is
actually created.  The {fraction} setting must be a value between 0.0
and 1.0.  A uniform random number between 0.0 and 1.0 is generated and
the eligible bond is only created if the random number < fraction.

Any bond that is created is assigned a bond type of {bondtype}

When a bond is created, data structures within LAMMPS that store bond
topology are updated to reflect the creation.  If the bond is part of
new 3-body (angle) or 4-body (dihedral, improper) interactions, you
can choose to create new angles, dihedrals, impropers as well, using
the {atype}, {dtype}, and {itype} keywords.  All of these changes
typically affect pairwise interactions between atoms that are now part
of new bonds, angles, etc.

IMPORTANT NOTE: One data structure that is not updated when a bond
breaks are the molecule IDs stored by each atom.  Even though two
molecules become one moleclue due to the created bond, all atoms in
the new moleclue retain their original molecule IDs.

If the {atype} keyword is used and if an angle potential is defined
via the "angle_style"_angle.html command, then any new 3-body
interactions inferred by the creation of a bond will create new angles
of type {angletype}, with parameters assigned by the corresponding
"angle_coeff"_angle_coeff.html command.  Likewise, the {dtype} and
{itype} keywords will create new dihedrals and impropers of type
{dihedraltype} and {impropertype}.

IMPORTANT NOTE: To create a new bond, the internal LAMMPS data
structures that store this information must have space for it.  When
LAMMPS is initialized from a data file, the list of bonds is scanned
and the maximum number of bonds per atom is tallied.  If some atom
will acquire more bonds than this limit as this fix operates, then the
"extra bond per atom" parameter must be set to allow for it.  Ditto
for "extra angle per atom", "extra dihedral per atom", and "extra
improper per atom" if angles, dihedrals, or impropers are being added
when bonds are created.  See the "read_data"_read_data.html or
"create_box"_create_box.html command for more details.  Note that a
data file with no atoms can be used if you wish to add unbonded atoms
via the "create atoms"_create_atoms.html command, e.g. for a
percolation simulation.

IMPORTANT NOTE: LAMMPS also maintains a data structure that stores a
list of 1st, 2nd, and 3rd neighbors of each atom (within the bond
topology of the system) for use in weighting pairwise interactions for
bonded atoms.  Adding a bond adds a single entry to this list.  The
"extra special per atom" parameter must typically be set to allow for
it.  There are 3 ways to do this.  See the "read_data"_read_data.html
or "create_box"_create_box.html or "special_bonds extra" commands for
details.

IMPORTANT NOTE: Even if you do not use the {atype}, {dtype}, or
{itype} keywords, the list of topological neighbors is updated for
atoms affected by the new bond.  This in turn affects which neighbors
are considered for pairwise interactions, using the weighting rules
set by the "special_bonds"_special_bonds.html command.  Consider a new
bond created between atoms I,J.  If J has a bonded neighbor K, then K
becomes a 2nd neighbor of I.  Even if the {atype} keyword is not used
to create angle I-J-K, the pairwise interaction between I and K will
be potentially turned off or weighted by the 1-3 weighting specified
by the "special_bonds"_special_bonds.html command.  This is the case
even if the "angle yes" option was used with that command.  The same
is true for 3rd neighbors (1-4 interactions), the {dtype} keyword, and
the "dihedral yes" option used with the
"special_bonds"_special_bonds.html command.

Note that even if your simulation starts with no bonds, you must
define a "bond_style"_bond_style.html and use the
"bond_coeff"_bond_coeff.html command to specify coefficients for the
{bondtype}.  Similarly, if new atom types are specified by the
{iparam} or {jparam} keywords, they must be within the range of atom
types allowed by the simulation and pairwise coefficients must be
specified for the new types.

Computationally, each timestep this fix operates, it loops over
neighbor lists and computes distances between pairs of atoms in the
list.  It also communicates between neighboring processors to
coordinate which bonds are created.  Moreover, if any bonds are
created, neighbor lists must be immediately updated on the same
timestep.  This is to insure that any pairwise interactions that
should be turned "off" due to a bond creation, because they are now
excluded by the presence of the bond and the settings of the
"special_bonds"_special_bonds.html command, will be immediately
recognized.  All of these operations increase the cost of a timestep.
Thus you should be cautious about invoking this fix too frequently.

You can dump out snapshots of the current bond topology via the "dump
local"_dump.html command.

IMPORTANT NOTE: Creating a bond typically alters the energy of a
system.  You should be careful not to choose bond creation criteria
that induce a dramatic change in energy.  For example, if you define a
very stiff harmonic bond and create it when 2 atoms are separated by a
distance far from the equilibribum bond length, then the 2 atoms will
oscillate dramatically when the bond is formed.  More generally, you
may need to thermostat your system to compensate for energy changes
resulting from created bonds (and angles, dihedrals, impropers).

:line

[Restart, fix_modify, output, run start/stop, minimize info:]

No information about this fix is written to "binary restart
files"_restart.html.  None of the "fix_modify"_fix_modify.html options
are relevant to this fix. 

This fix computes two statistics which it stores in a global vector of
length 2, which can be accessed by various "output
commands"_Section_howto.html#howto_15.  The vector values calculated
by this fix are "intensive".

These are the 2 quantities:

(1) # of bonds created on the most recent creation timestep
(2) cummulative # of bonds created :ul

No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command.  This fix is not invoked during "energy
minimization"_minimize.html.

[Restrictions:]

This fix is part of the MC package.  It is only enabled if LAMMPS was
built with that package.  See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.

[Related commands:]

"fix bond/break"_fix_bond_break.html, "fix
bond/swap"_fix_bond_swap.html, "dump local"_dump.html,
"special_bonds"_special_bonds.html

[Default:]

The option defaults are iparam = (0,itype), jparam = (0,jtype), and
prob = 1.0.