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 create_bonds command :h3
13 create_bonds group-ID group2-ID btype rmin rmax :pre
15 group-ID = ID of first group
16 group2-ID = ID of second group, bonds will be between atoms in the 2 groups
17 btype = bond type of created bonds
18 rmin = minimum distance between pair of atoms to bond together
19 rmax = minimum distance between pair of atoms to bond together :ul
23 create_bonds all all 1 1.0 1.2
24 create_bonds surf solvent 3 2.0 2.4 :pre
28 Create bonds between pairs of atoms that meet specified distance
29 criteria. The bond interactions can then be computed during a
30 simulation by the bond potential defined by the
31 "bond_style"_bond_style.html and "bond_coeff"_bond_coeff.html
32 commands. This command is useful for adding bonds to a system,
33 e.g. between nearest neighbors in a lattice of atoms, without having
34 to enumerate all the bonds in the data file read by the
35 "read_data"_read_data.html command.
37 Note that the flexibility of this command is limited. It can be used
38 several times to create different types of bond at different
39 distances. But it cannot typically create all the bonds that would
40 normally be defined in a complex system of molecules. Also note that
41 this command does not add any 3-body or 4-body interactions which,
42 depending on your model, may be induced by added bonds,
43 e.g. "angle"_angle_style.html, "dihedral"_dihedral_style.html, or
44 "improper"_improper_style.html interactions.
46 All created bonds will be between pairs of atoms I,J where I is in one
47 of the two specified groups, and J is in the other. The two groups
48 can be the same, e.g. group "all". The created bonds will be of bond
49 type {btype}, where {btype} must be a value between 1 and the number
50 of bond types defined. This maximum value is set by the "bond types"
51 field in the header of the data file read by the
52 "read_data"_read_data.html command, or via the optional "bond/types"
53 argument of the "create_box"_create_box.html command.
55 For a bond to be created, an I,J pair of atoms must be a distance D
56 apart such that {rmin} <= D <= {rmax}.
58 The following settings must have been made in an input
59 script before this command is used:
61 special_bonds weight for 1-2 interactions must be 0.0
62 a "pair_style"_pair_style.html must be defined
63 no "kspace_style"_kspace_style.html defined
64 minimum "pair_style"_pair_style.html cutoff + "neighbor"_neighbor.html skin >= {rmax} :ul
66 These settings are required so that a neighbor list can be created to
67 search for nearby atoms. Pairs of atoms that are already bonded
68 cannot appear in the neighbor list, to avoid creation of duplicate
69 bonds. The neighbor list for all atom type pairs must also extend to
70 a distance that encompasses the {rmax} for new bonds to create.
72 An additional requirement is that your system must be ready to perform
73 a simulation. This means, for example, that all
74 "pair_style"_pair_style.html coefficients be set via the
75 "pair_coeff"_pair_coeff.html command. A "bond_style"_bond_style.html
76 command and all bond coefficients must also be set, even if no bonds
77 exist before this command is invoked. This is because the building of
78 neighbor list requires initialization and setup of a simulation,
79 similar to what a "run"_run.html command would require.
81 Note that you can change any of these settings after this command
82 executes, e.g. if you wish to use long-range Coulombic interactions
83 via the "kspace_style"_kspace_style.html command for your subsequent
86 NOTE: If the system has no bonds to begin with, or if more bonds per
87 atom are being added than currently exist, then you must insure that
88 the number of bond types and the maximum number of bonds per atom are
89 set to large enough values. Otherwise an error may occur when too
90 many bonds are added to an atom. If the "read_data"_read_data.html
91 command is used to define the system, these 2 parameters can be set
92 via the "bond types" and "extra bond per atom" fields in the header
93 section of the data file. If the "create_box"_create_box.html command
94 is used to define the system, these 2 parameters can be set via its
95 optional "bond/types" and "extra/bond/per/atom" arguments. See the
96 doc pages for the 2 commands for details.
100 This command cannot be used with molecular systems defined using
101 molecule template files via the "molecule"_molecule.html and
102 "atom_style template"_atom_style.html commands.
106 "create_atoms"_create_atoms.html, "delete_bonds"_delete_bonds.html