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 restrain command :h3
13 fix ID group-ID restrain keyword args ... :pre
15 ID, group-ID are documented in "fix"_fix.html command :ulb,l
16 restrain = style name of this fix command :l
17 one or more keyword/arg pairs may be appended :l
18 keyword = {bond} or {angle} or {dihedral} :l
19 {bond} args = atom1 atom2 Kstart Kstop r0
20 atom1,atom2 = IDs of 2 atoms in bond
21 Kstart,Kstop = restraint coefficients at start/end of run (energy units)
22 r0 = equilibrium bond distance (distance units)
23 {angle} args = atom1 atom2 atom3 Kstart Kstop theta0
24 atom1,atom2,atom3 = IDs of 3 atoms in angle, atom2 = middle atom
25 Kstart,Kstop = restraint coefficients at start/end of run (energy units)
26 theta0 = equilibrium angle theta (degrees)
27 {dihedral} args = atom1 atom2 atom3 atom4 Kstart Kstop phi0
28 atom1,atom2,atom3,atom4 = IDs of 4 atoms in dihedral in linear order
29 Kstart,Kstop = restraint coefficients at start/end of run (energy units)
30 phi0 = equilibrium dihedral angle phi (degrees) :pre
35 fix holdem all restrain bond 45 48 2000.0 2000.0 2.75
36 fix holdem all restrain dihedral 1 2 3 4 2000.0 2000.0 120.0
37 fix holdem all restrain bond 45 48 2000.0 2000.0 2.75 dihedral 1 2 3 4 2000.0 2000.0 120.0
38 fix texas_holdem all restrain dihedral 1 2 3 4 0.0 2000.0 120.0 dihedral 1 2 3 5 0.0 2000.0 -120.0 dihedral 1 2 3 6 0.0 2000.0 0.0 :pre
42 Restrain the motion of the specified sets of atoms by making them part
43 of a bond or angle or dihedral interaction whose strength can vary
44 over time during a simulation. This is functionally similar to
45 creating a bond or angle or dihedral for the same atoms in a data
46 file, as specified by the "read_data"_read_data.html command, albeit
47 with a time-varying pre-factor coefficient, and except for exclusion
48 rules, as explained below.
50 For the purpose of forcefield parameter-fitting or mapping a molecular
51 potential energy surface, this fix reduces the hassle and risk
52 associated with modifying data files. In other words, use this fix to
53 temporarily force a molecule to adopt a particular conformation. To
54 create a permanent bond or angle or dihedral, you should modify the
57 NOTE: Adding a bond/angle/dihedral with this command does not apply
58 the exclusion rules and weighting factors specified by the
59 "special_bonds"_special_bonds.html command to atoms in the restraint
60 that are now bonded (1-2,1-3,1-4 neighbors) as a result. If they are
61 close enough to interact in a "pair_style"_pair_style.html sense
62 (non-bonded interaction), then the bond/angle/dihedral restraint
63 interaction will simply be superposed on top of that interaction.
65 The group-ID specified by this fix is ignored.
67 The second example above applies a restraint to hold the dihedral
68 angle formed by atoms 1, 2, 3, and 4 near 120 degrees using a constant
69 restraint coefficient. The fourth example applies similar restraints
70 to multiple dihedral angles using a restraint coefficient that
71 increases from 0.0 to 2000.0 over the course of the run.
73 NOTE: Adding a force to atoms implies a change in their potential
74 energy as they move due to the applied force field. For dynamics via
75 the "run"_run.html command, this energy can be added to the system's
76 potential energy for thermodynamic output (see below). For energy
77 minimization via the "minimize"_minimize.html command, this energy
78 must be added to the system's potential energy to formulate a
79 self-consistent minimization problem (see below).
81 In order for a restraint to be effective, the restraint force must
82 typically be significantly larger than the forces associated with
83 conventional forcefield terms. If the restraint is applied during a
84 dynamics run (as opposed to during an energy minimization), a large
85 restraint coefficient can significantly reduce the stable timestep
86 size, especially if the atoms are initially far from the preferred
87 conformation. You may need to experiment to determine what value of K
88 works best for a given application.
90 For the case of finding a minimum energy structure for a single
91 molecule with particular restratins (e.g. for fitting forcefield
92 parameters or constructing a potential energy surface), commands such
93 as the following may be useful:
95 # minimize molecule energy with restraints
96 velocity all create 600.0 8675309 mom yes rot yes dist gaussian
98 fix TFIX all langevin 600.0 0.0 100 24601
99 fix REST all restrain dihedral 2 1 3 8 0.0 5000.0 $\{angle1\} dihedral 3 1 2 9 0.0 5000.0 $\{angle2\}
100 fix_modify REST energy yes
102 fix TFIX all langevin 0.0 0.0 100 24601
103 fix REST all restrain dihedral 2 1 3 8 5000.0 5000.0 $\{angle1\} dihedral 3 1 2 9 5000.0 5000.0 $\{angle2\}
104 fix_modify REST energy yes
106 # sanity check for convergence
107 minimize 1e-6 1e-9 1000 100000
108 # report unrestrained energies
114 The {bond} keyword applies a bond restraint to the specified atoms
115 using the same functional form used by the "bond_style
116 harmonic"_bond_harmonic.html command. The potential associated with
119 :c,image(Eqs/bond_harmonic.jpg)
121 with the following coefficients:
123 K (energy/distance^2)
126 K and r0 are specified with the fix. Note that the usual 1/2 factor
131 The {angle} keyword applies an angle restraint to the specified atoms
132 using the same functional form used by the "angle_style
133 harmonic"_angle_harmonic.html command. The potential associated with
136 :c,image(Eqs/angle_harmonic.jpg)
138 with the following coefficients:
143 K and theta0 are specified with the fix. Note that the usual 1/2
144 factor is included in K.
148 The {dihedral} keyword applies a dihedral restraint to the specified
149 atoms using a simplified form of the function used by the
150 "dihedral_style charmm"_dihedral_charmm.html command. The potential
151 associated with the restraint is
153 :c,image(Eqs/dihedral_charmm.jpg)
155 with the following coefficients:
159 d (degrees) = phi0 + 180 :ul
161 K and phi0 are specified with the fix. Note that the value of n is
162 hard-wired to 1. Also note that the energy will be a minimum when the
163 current dihedral angle phi is equal to phi0.
167 [Restart, fix_modify, output, run start/stop, minimize info:]
169 No information about this fix is written to "binary restart
172 The "fix_modify"_fix_modify.html {energy} option is supported by this
173 fix to add the potential energy associated with this fix to the
174 system's potential energy as part of "thermodynamic
175 output"_thermo_style.html.
177 The "fix_modify"_fix_modify.html {respa} option is supported by this
178 fix. This allows to set at which level of the "r-RESPA"_run_style.html
179 integrator the fix is adding its forces. Default is the outermost level.
181 NOTE: If you want the fictitious potential energy associated with the
182 added forces to be included in the total potential energy of the
183 system (the quantity being minimized), you MUST enable the
184 "fix_modify"_fix_modify.html {energy} option for this fix.
186 This fix computes a global scalar, which can be accessed by various
187 "output commands"_Section_howto.html#howto_15. The scalar is the
188 potential energy for all the restraints as discussed above. The scalar
189 value calculated by this fix is "extensive".
191 No parameter of this fix can be used with the {start/stop} keywords of
192 the "run"_run.html command.
196 [Related commands:] none