1 "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
3 :link(lws,http://lammps.sandia.gov)
5 :link(lc,Section_commands.html#comm)
9 fix deposit command :h3
13 fix ID group-ID deposit N type M seed keyword values ... :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 deposit = style name of this fix command :l
17 N = # of atoms or molecules to insert :l
18 type = atom type to assign to inserted atoms (offset for moleclue insertion) :l
19 M = insert a single atom or molecule every M steps :l
20 seed = random # seed (positive integer) :l
21 one or more keyword/value pairs may be appended to args :l
22 keyword = {region} or {id} or {global} or {local} or {near} or {gaussian} or {attempt} or {rate} or {vx} or {vy} or {vz} or {mol} or {rigid} or {shake} or {units} :l
23 {region} value = region-ID
24 region-ID = ID of region to use as insertion volume
25 {id} value = {max} or {next}
26 max = atom ID for new atom(s) is max ID of all current atoms plus one
27 next = atom ID for new atom(s) increments by one for every deposition
28 {global} values = lo hi
29 lo,hi = put new atom/molecule a distance lo-hi above all other atoms (distance units)
30 {local} values = lo hi delta
31 lo,hi = put new atom/molecule a distance lo-hi above any nearby atom beneath it (distance units)
32 delta = lateral distance within which a neighbor is considered "nearby" (distance units)
34 R = only insert atom/molecule if further than R from existing particles (distance units)
35 {gaussian} values = xmid ymid zmid sigma
36 xmid,ymid,zmid = center of the gaussian distribution (distance units)
37 sigma = width of gaussian distribution (distance units)
39 Q = attempt a single insertion up to Q times
41 V = z velocity (y in 2d) at which insertion volume moves (velocity units)
42 {vx} values = vxlo vxhi
43 vxlo,vxhi = range of x velocities for inserted atom/molecule (velocity units)
44 {vy} values = vylo vyhi
45 vylo,vyhi = range of y velocities for inserted atom/molecule (velocity units)
46 {vz} values = vzlo vzhi
47 vzlo,vzhi = range of z velocities for inserted atom/molecule (velocity units)
48 {target} values = tx ty tz
49 tx,ty,tz = location of target point (distance units)
50 {mol} value = template-ID
51 template-ID = ID of molecule template specified in a separate "molecule"_molecule.html command
52 {molfrac} values = f1 f2 ... fN
53 f1 to fN = relative probability of creating each of N molecules in template-ID
54 {rigid} value = fix-ID
55 fix-ID = ID of "fix rigid/small"_fix_rigid.html command
56 {shake} value = fix-ID
57 fix-ID = ID of "fix shake"_fix_shake.html command
58 {units} value = {lattice} or {box}
59 lattice = the geometry is defined in lattice units
60 box = the geometry is defined in simulation box units :pre
65 fix 3 all deposit 1000 2 100 29494 region myblock local 1.0 1.0 1.0 units box
66 fix 2 newatoms deposit 10000 1 500 12345 region disk near 2.0 vz -1.0 -0.8
67 fix 4 sputter deposit 1000 2 500 12235 region sphere vz -1.0 -1.0 target 5.0 5.0 0.0 units lattice
68 fix 5 insert deposit 200 2 100 777 region disk gaussian 5.0 5.0 9.0 1.0 units box :pre
72 Insert a single atom or molecule into the simulation domain every M
73 timesteps until N atoms or molecules have been inserted. This is
74 useful for simulating deposition onto a surface. For the remainder of
75 this doc page, a single inserted atom or molecule is referred to as a
78 If inserted particles are individual atoms, they are assigned the
79 specified atom type. If they are molecules, the type of each atom in
80 the inserted molecule is specified in the file read by the
81 "molecule"_molecule.html command, and those values are added to the
82 specified atom type. E.g. if the file specifies atom types 1,2,3, and
83 those are the atom types you want for inserted molecules, then specify
84 {type} = 0. If you specify {type} = 2, the in the inserted molecule
85 will have atom types 3,4,5.
87 All atoms in the inserted particle are assigned to two groups: the
88 default group "all" and the group specified in the fix deposit command
89 (which can also be "all").
91 If you are computing temperature values which include inserted
92 particles, you will want to use the
93 "compute_modify"_compute_modify.html dynamic option, which insures the
94 current number of atoms is used as a normalizing factor each time the
95 temperature is computed.
97 Care must be taken that inserted particles are not too near existing
98 atoms, using the options described below. When inserting particles
99 above a surface in a non-periodic box (see the
100 "boundary"_boundary.html command), the possibility of a particle
101 escaping the surface and flying upward should be considered, since the
102 particle may be lost or the box size may grow infinitely large. A
103 "fix wall/reflect"_fix_wall_reflect.html command can be used to
104 prevent this behavior. Note that if a shrink-wrap boundary is used,
105 it is OK to insert the new particle outside the box, however the box
106 will immediately be expanded to include the new particle. When
107 simulating a sputtering experiment it is probably more realistic to
108 ignore those atoms using the "thermo_modify"_thermo_modify.html
109 command with the {lost ignore} option and a fixed
110 "boundary"_boundary.html.
112 The fix deposit command must use the {region} keyword to define an
113 insertion volume. The specified region must have been previously
114 defined with a "region"_region.html command. It must be defined with
117 NOTE: LAMMPS checks that the specified region is wholly inside the
118 simulation box. It can do this correctly for orthonormal simulation
119 boxes. However for "triclinic boxes"_Section_howto.html#howto_12, it
120 only tests against the larger orthonormal box that bounds the tilted
121 simulation box. If the specified region includes volume outside the
122 tilted box, then an insertion will likely fail, leading to a "lost
123 atoms" error. Thus for triclinic boxes you should insure the
124 specified region is wholly inside the simulation box.
126 The locations of inserted particles are taken from uniform distributed
127 random numbers, unless the {gaussian} keyword is used. Then the
128 individual coordinates are taken from a gaussian distribution of
129 width {sigma} centered on {xmid,ymid,zmid}.
131 Individual atoms are inserted, unless the {mol} keyword is used. It
132 specifies a {template-ID} previously defined using the
133 "molecule"_molecule.html command, which reads files that define one or
134 more molecules. The coordinates, atom types, charges, etc, as well as
135 any bond/angle/etc and special neighbor information for the molecule
136 can be specified in the molecule file. See the
137 "molecule"_molecule.html command for details. The only settings
138 required to be in each file are the coordinates and types of atoms in
141 If the molecule template contains more than one molecule, the relative
142 probability of depositing each molecule can be specified by the
143 {molfrac} keyword. N relative probablities, each from 0.0 to 1.0, are
144 specified, where N is the number of molecules in the template. Each
145 time a molecule is deposited, a random number is used to sample from
146 the list of relative probabilities. The N values must sum to 1.0.
148 If you wish to insert molecules via the {mol} keyword, that will be
149 treated as rigid bodies, use the {rigid} keyword, specifying as its
150 value the ID of a separate "fix rigid/small"_fix_rigid.html
151 command which also appears in your input script.
153 If you wish to insert molecules via the {mol} keyword, that will have
154 their bonds or angles constrained via SHAKE, use the {shake} keyword,
155 specifying as its value the ID of a separate "fix
156 shake"_fix_shake.html command which also appears in your input script.
158 Each timestep a particle is inserted, the coordinates for its atoms
159 are chosen as follows. For insertion of individual atoms, the
160 "position" referred to in the following description is the coordinate
161 of the atom. For insertion of molecule, the "position" is the
162 geometric center of the molecule; see the "molecule"_molecule.html doc
163 page for details. A random rotation of the molecule around its center
164 point is performed, which determines the coordinates all the
167 A random position within the region insertion volume is generated. If
168 neither the {global} or {local} keyword is used, the random position
169 is the trial position. If the {global} keyword is used, the random
170 x,y values are used, but the z position of the new particle is set
171 above the highest current atom in the simulation by a distance
172 randomly chosen between lo/hi. (For a 2d simulation, this is done for
173 the y position.) If the {local} keyword is used, the z position is
174 set a distance between lo/hi above the highest current atom in the
175 simulation that is "nearby" the chosen x,y position. In this context,
176 "nearby" means the lateral distance (in x,y) between the new and old
177 particles is less than the {delta} setting.
179 Once a trial x,y,z position has been selected, the insertion is only
180 performed if no current atom in the simulation is within a distance R
181 of any atom in the new particle, including the effect of periodic
182 boundary conditions if applicable. R is defined by the {near}
183 keyword. Note that the default value for R is 0.0, which will allow
184 atoms to strongly overlap if you are inserting where other atoms are
185 present. This distance test is performed independently for each atom
186 in an inserted molecule, based on the randomly rotated configuration
187 of the molecule. If this test fails, a new random position within the
188 insertion volume is chosen and another trial is made. Up to Q
189 attempts are made. If the particle is not successfully inserted,
190 LAMMPS prints a warning message.
192 NOTE: If you are inserting finite size particles or a molecule or
193 rigid body consisting of finite-size particles, then you should
194 typically set R larger than the distance at which any inserted
195 particle may overlap with either a previouly inserted particle or an
196 existing particle. LAMMPS will issue a warning if R is smaller than
197 this value, based on the radii of existing and inserted particles.
199 The {rate} option moves the insertion volume in the z direction (3d)
200 or y direction (2d). This enables particles to be inserted from a
201 successively higher height over time. Note that this parameter is
202 ignored if the {global} or {local} keywords are used, since those
203 options choose a z-coordinate for insertion independently.
205 The vx, vy, and vz components of velocity for the inserted particle
206 are set using the values specified for the {vx}, {vy}, and {vz}
207 keywords. Note that normally, new particles should be a assigned a
208 negative vertical velocity so that they move towards the surface. For
209 molecules, the same velocity is given to every particle (no rotation
212 If the {target} option is used, the velocity vector of the inserted
213 particle is changed so that it points from the insertion position
214 towards the specified target point. The magnitude of the velocity is
215 unchanged. This can be useful, for example, for simulating a
216 sputtering process. E.g. the target point can be far away, so that
217 all incident particles strike the surface as if they are in an
218 incident beam of particles at a prescribed angle.
220 The {id} keyword determines how atom IDs and molecule IDs are assigned
221 to newly deposited particles. Molecule IDs are only assigned if
222 molecules are being inserted. For the {max} setting, the atom and
223 molecule IDs of all current atoms are checked. Atoms in the new
224 particle are assigned IDs starting with the current maximum plus one.
225 If a molecule is inserted it is assigned an ID = current maximum plus
226 one. This means that if particles leave the system, the new IDs may
227 replace the lost ones. For the {next} setting, the maximum ID of any
228 atom and molecule is stored at the time the fix is defined. Each time
229 a new particle is added, this value is incremented to assign IDs to
230 the new atom(s) or molecule. Thus atom and molecule IDs for deposited
231 particles will be consecutive even if particles leave the system over
234 The {units} keyword determines the meaning of the distance units used
235 for the other deposition parameters. A {box} value selects standard
236 distance units as defined by the "units"_units.html command,
237 e.g. Angstroms for units = real or metal. A {lattice} value means the
238 distance units are in lattice spacings. The "lattice"_lattice.html
239 command must have been previously used to define the lattice spacing.
240 Note that the units choice affects all the keyword values that have
241 units of distance or velocity.
243 NOTE: If you are monitoring the temperature of a system where the atom
244 count is changing due to adding particles, you typically should use
245 the "compute_modify dynamic yes"_compute_modify.html command for the
246 temperature compute you are using.
248 [Restart, fix_modify, output, run start/stop, minimize info:]
250 This fix writes the state of the deposition to "binary restart
251 files"_restart.html. This includes information about how many
252 particles have been depositied, the random number generator seed, the
253 next timestep for deposition, etc. See the
254 "read_restart"_read_restart.html command for info on how to re-specify
255 a fix in an input script that reads a restart file, so that the
256 operation of the fix continues in an uninterrupted fashion.
258 None of the "fix_modify"_fix_modify.html options are relevant to this
259 fix. No global or per-atom quantities are stored by this fix for
260 access by various "output commands"_Section_howto.html#howto_15. No
261 parameter of this fix can be used with the {start/stop} keywords of
262 the "run"_run.html command. This fix is not invoked during "energy
263 minimization"_minimize.html.
267 This fix is part of the MISC package. It is only enabled if LAMMPS
268 was built with that package. See the "Making
269 LAMMPS"_Section_start.html#start_3 section for more info.
271 The specified insertion region cannot be a "dynamic" region, as
272 defined by the "region"_region.html command.
276 "fix pour"_fix_pour.html, "region"_region.html
280 Insertions are performed for individual atoms, i.e. no {mol} setting
281 is defined. If the {mol} keyword is used, the default for {molfrac}
282 is an equal probabilities for all molecules in the template.
283 Additional option defaults are id = max, delta = 0.0, near = 0.0,
284 attempt = 10, rate = 0.0, vx = 0.0 0.0, vy = 0.0 0.0, vz = 0.0 0.0,