File: create_atoms.txt

package info (click to toggle)
lammps 0~20120615.gite442279-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 128,448 kB
  • sloc: cpp: 321,874; fortran: 15,187; ansic: 11,007; python: 7,889; perl: 2,915; sh: 2,088; makefile: 924; f90: 374; objc: 238; lisp: 169; csh: 16; tcl: 6
file content (186 lines) | stat: -rw-r--r-- 8,044 bytes parent folder | download | duplicates (3)
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
"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

create_atoms command :h3

[Syntax:]

create_atoms type style args keyword values ... :pre

type = atom type (1-Ntypes) of atoms to create :ulb,l
style = {box} or {region} or {single} or {random} :l
  {box} args = none
  {region} args = region-ID
    region-ID = atoms will only be created if contained in the region
  {single} args = x y z
    x,y,z = coordinates of a single atom (distance units)
  {random} args = N seed region-ID
    N = number of atoms to create
    seed = random # seed (positive integer)
    region-ID = create atoms within this region, use NULL for entire simulation box :pre
zero or more keyword/value pairs may be appended :l
keyword = {basis} or {remap} or {units} :l
  {basis} values = M itype
    M = which basis atom
    itype = atom type (1-N) to assign to this basis atom
  {remap} value = {yes} or {no}
  {units} value = {lattice} or {box}
    {lattice} = the geometry is defined in lattice units
    {box} = the geometry is defined in simulation box units :pre
:ule

[Examples:]

create_atoms 1 box
create_atoms 3 region regsphere basis 2 3
create_atoms 3 single 0 0 5 :pre

[Description:]

This command creates atoms on a lattice, or a single atom, or a random
collection of atoms, as an alternative to reading in their coordinates
explicitly via a "read_data"_read_data.html or
"read_restart"_read_restart.html command.  A simulation box must
already exist, which is typically created via the
"create_box"_create_box.html command.  Before using this command, a
lattice must also be defined using the "lattice"_lattice.html command.
The only exceptions are for the {single} style with units = box or the
{random} style.

For the {box} style, the create_atoms command fills the entire
simulation box with atoms on the lattice.  If your simulation box is
periodic, you should insure its size is a multiple of the lattice
spacings, to avoid unwanted atom overlaps at the box boundaries.  If
your box is periodic and a multiple of the lattice spacing in a
particular dimension, LAMMPS is careful to put exactly one atom at the
boundary (on either side of the box), not zero or two.

For the {region} style, the geometric volume is filled that is inside
the simulation box and is also consistent with the region volume.  See
the "region"_region.html command for details.  Note that a region can
be specified so that its "volume" is either inside or outside a
geometric boundary.  Also note that if your region is the same size as
a periodic simulation box (in some dimension), LAMMPS does not
implement the same logic as with the {box} style, to insure exactly
one atom at the boundary.  if this is what you desire, you should
either use the {box} style, or tweak the region size to get precisely
the atoms you want.

For the {single} style, a single atom is added to the system at the
specified coordinates.  This can be useful for debugging purposes or
to create a tiny system with a handful of atoms at specified
positions.

For the {random} style, N atoms are added to the system at randomly
generated coordinates, which can be useful for generating an amorphous
system.  The atoms are created one by one using the speficied random
number {seed}, resulting in the same set of atom coordinates,
independent of how many processors are being used in the simulation.
If the {region-ID} argument is specified as NULL, then the created
atoms will be anywhere in the simulation box.  If a {region-ID} is
specified, a geometric volume is filled that is inside the simulation
box and is also consistent with the region volume.  See the
"region"_region.html command for details.  Note that a region can be
specified so that its "volume" is either inside or outside a geometric
boundary.

IMPORTANT NOTE: The atoms generated by the {random} style will
typically be highly overlapped which will cause many interatomic
potentials to compute large energies and forces.  Thus you should
either perform an "energy minimization"_minimize.html or run dynamics
with "fix nve/limit"_fix_nve_limit.html to equilibrate such a system,
before running normal dynamics.

The {basis} keyword specifies an atom type that will be assigned to
specific basis atoms as they are created.  See the
"lattice"_lattice.html command for specifics on how basis atoms are
defined for the unit cell of the lattice.  By default, all created
atoms are assigned the argument {type} as their atom type.

The {remap} keyword only applies to the {single} style.  If it is set
to {yes}, then if the specified position is outside the simulation
box, it will mapped back into the box, assuming the relevant
dimensions are periodic.  If it is set to {no}, no remapping is done
and no atom is created if its position is outside the box.

The {units} keyword determines the meaning of the distance units used
to specify the coordinates of the one atom created by the {single}
style.  A {box} value selects standard distance units as defined by
the "units"_units.html command, e.g. Angstroms for units = real or
metal.  A {lattice} value means the distance units are in lattice
spacings.
 
Note that this command adds atoms to those that already exist.  By
using the create_atoms command multiple times, multiple sets of atoms
can be added to the simulation.  For example, interleaving
create_atoms with "lattice"_lattice.html commands specifying different
orientations, grain boundaries can be created.  By using the
create_atoms command in conjunction with the
"delete_atoms"_delete_atoms.html command, reasonably complex
geometries can be created.  The create_atoms command can also be used
to add atoms to a system previously read in from a data or restart
file.  In all these cases, care should be taken to insure that new
atoms do not overlap existing atoms inappropriately.  The
"delete_atoms"_delete_atoms.html command can be used to handle
overlaps.

Atom IDs are assigned to created atoms in the following way.  The
collection of created atoms are assigned consecutive IDs that start
immediately following the largest atom ID existing before the
create_atoms command was invoked.  When a simulation is performed on
different numbers of processors, there is no guarantee a particular
created atom will be assigned the same ID.

Aside from their ID, atom type, and xyz position, other properties of
created atoms are set to default values, depending on which quantities
are defined by the chosen "atom style"_atom_style.html.  See the "atom
style"_atom_style.html command for more details.  See the
"set"_set.html and "velocity"_velocity.html commands for info on how
to change these values.

charge = 0.0
dipole moment magnitude = 0.0
diameter = 1.0
shape = 0.0 0.0 0.0
density = 1.0
volume = 1.0
velocity = 0.0 0.0 0.0
angular velocity = 0.0 0.0 0.0
angular momentum = 0.0 0.0 0.0
quaternion = (1,0,0,0)
bonds, angles, dihedrals, impropers = none :ul

Note that the {sphere} atom style sets the default particle diameter
to 1.0 as well as the density.  This means the mass for the particle
is not 1.0, but is PI/6 * diameter^3 = 0.5236.

Note that the {ellipsoid} atom style sets the default particle shape
to (0.0 0.0 0.0) and the density to 1.0 which means it is a point
particle, not an ellipsoid, and has a mass of 1.0.

Note that the {peri} style sets the default volume and density to 1.0
and thus also set the mass for the particle to 1.0.

The "set"_set.html command can be used to override many of these
default settings.

[Restrictions:]

An "atom_style"_atom_style.html must be previously defined to use this
command.

[Related commands:]

"lattice"_lattice.html, "region"_region.html, "create_box"_create_box.html,
"read_data"_read_data.html, "read_restart"_read_restart.html

[Default:]

The default for the {basis} keyword is that all created atoms are
assigned the argument {type} as their atom type.  The default for 
{remap} = no and for {units} = lattice.