2011-08-25 23:07:08 +08:00
|
|
|
"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 restrain command :h3
|
|
|
|
|
|
|
|
[Syntax:]
|
|
|
|
|
2012-05-22 21:56:16 +08:00
|
|
|
fix ID group-ID restrain keyword args ... :pre
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
ID, group-ID are documented in "fix"_fix.html command :ulb,l
|
|
|
|
restrain = style name of this fix command :l
|
2012-05-22 21:56:16 +08:00
|
|
|
one or more keyword/arg pairs may be appended :l
|
|
|
|
keyword = {bond} or {angle} or {dihedral} :l
|
|
|
|
{bond} args = atom1 atom2 Kstart Kstop r0
|
|
|
|
atom1,atom2 = IDs of 2 atoms in bond
|
|
|
|
Kstart,Kstop = restraint coefficients at start/end of run (energy units)
|
2012-05-22 22:16:17 +08:00
|
|
|
r0 = equilibrium bond distance (distance units)
|
|
|
|
{angle} args = atom1 atom2 atom3 Kstart Kstop theta0
|
2012-05-22 21:56:16 +08:00
|
|
|
atom1,atom2,atom3 = IDs of 3 atoms in angle, atom2 = middle atom
|
|
|
|
Kstart,Kstop = restraint coefficients at start/end of run (energy units)
|
2012-05-22 22:16:17 +08:00
|
|
|
theta0 = equilibrium angle theta (degrees)
|
2014-05-03 05:47:08 +08:00
|
|
|
{dihedral} args = atom1 atom2 atom3 atom4 Kstart Kstop phi0
|
2012-05-22 21:56:16 +08:00
|
|
|
atom1,atom2,atom3,atom4 = IDs of 4 atoms in dihedral in linear order
|
|
|
|
Kstart,Kstop = restraint coefficients at start/end of run (energy units)
|
2012-05-22 22:16:17 +08:00
|
|
|
phi0 = equilibrium dihedral angle phi (degrees) :pre
|
2011-08-25 23:07:08 +08:00
|
|
|
:ule
|
|
|
|
|
|
|
|
[Examples:]
|
|
|
|
|
2012-05-22 21:56:16 +08:00
|
|
|
fix holdem all restrain bond 45 48 2000.0 2000.0 2.75
|
|
|
|
fix holdem all restrain dihedral 1 2 3 4 2000.0 2000.0 120.0
|
|
|
|
fix holdem all restrain bond 45 48 2000.0 2000.0 2.75 dihedral 1 2 3 4 2000.0 2000.0 120.0
|
|
|
|
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
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
[Description:]
|
|
|
|
|
2012-05-22 21:56:16 +08:00
|
|
|
Restrain the motion of the specified sets of atoms by making them part
|
2012-05-22 22:16:17 +08:00
|
|
|
of a bond or angle or dihedral interaction whose strength can vary
|
|
|
|
over time during a simulation. This is functionally equivalent to
|
|
|
|
creating a bond or angle or dihedral for the same atoms in a data
|
|
|
|
file, as specified by the "read_data"_read_data.html command, albeit
|
|
|
|
with a time-varying pre-factor coefficient. For the purpose of
|
|
|
|
forcefield parameter-fitting or mapping a molecular potential energy
|
|
|
|
surface, this fix reduces the hassle and risk associated with
|
|
|
|
modifying data files. In other words, use this fix to temporarily
|
|
|
|
force a molecule to adopt a particular conformation. To create a
|
|
|
|
permanent bond or angle or dihedral, you should modify the data file.
|
|
|
|
|
|
|
|
The group-ID specified by this fix is ignored.
|
|
|
|
|
|
|
|
The second example above applies a restraint to hold the dihedral
|
|
|
|
angle formed by atoms 1, 2, 3, and 4 near 120 degrees using a constant
|
|
|
|
restraint coefficient. The fourth example applies similar restraints
|
2011-08-25 23:07:08 +08:00
|
|
|
to multiple dihedral angles using a restraint coefficient that
|
|
|
|
increases from 0.0 to 2000.0 over the course of the run.
|
|
|
|
|
|
|
|
IMPORTANT NOTE: Adding a force to atoms implies a change in their
|
|
|
|
potential energy as they move due to the applied force field. For
|
|
|
|
dynamics via the "run"_run.html command, this energy can be added to
|
|
|
|
the system's potential energy for thermodynamic output (see below).
|
|
|
|
For energy minimization via the "minimize"_minimize.html command, this
|
|
|
|
energy must be added to the system's potential energy to formulate a
|
|
|
|
self-consistent minimization problem (see below).
|
|
|
|
|
|
|
|
In order for a restraint to be effective, the restraint force must
|
|
|
|
typically be significantly larger than the forces associated with
|
2012-05-22 22:16:17 +08:00
|
|
|
conventional forcefield terms. If the restraint is applied during a
|
2011-08-25 23:07:08 +08:00
|
|
|
dynamics run (as opposed to during an energy minimization), a large
|
|
|
|
restraint coefficient can significantly reduce the stable timestep
|
|
|
|
size, especially if the atoms are initially far from the preferred
|
|
|
|
conformation. You may need to experiment to determine what value of K
|
|
|
|
works best for a given application.
|
|
|
|
|
|
|
|
For the case of finding a minimum energy structure for a single
|
|
|
|
molecule with particular restratins (e.g. for fitting forcefield
|
|
|
|
parameters or constructing a potential energy surface), commands such
|
2012-05-22 22:16:17 +08:00
|
|
|
as the following may be useful:
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
# minimize molecule energy with restraints
|
|
|
|
velocity all create 600.0 8675309 mom yes rot yes dist gaussian
|
|
|
|
fix NVE all nve
|
|
|
|
fix TFIX all langevin 600.0 0.0 100 24601
|
2012-05-22 22:16:17 +08:00
|
|
|
fix REST all restrain dihedral 2 1 3 8 0.0 5000.0 ${angle1} dihedral 3 1 2 9 0.0 5000.0 ${angle2}
|
2011-08-25 23:07:08 +08:00
|
|
|
fix_modify REST energy yes
|
|
|
|
run 10000
|
|
|
|
fix TFIX all langevin 0.0 0.0 100 24601
|
2012-05-22 22:16:17 +08:00
|
|
|
fix REST all restrain dihedral 2 1 3 8 5000.0 5000.0 ${angle1} dihedral 3 1 2 9 5000.0 5000.0 ${angle2}
|
2011-08-25 23:07:08 +08:00
|
|
|
fix_modify REST energy yes
|
|
|
|
run 10000
|
|
|
|
# sanity check for convergence
|
|
|
|
minimize 1e-6 1e-9 1000 100000
|
|
|
|
# report unrestrained energies
|
|
|
|
unfix REST
|
|
|
|
run 0 :pre
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2012-05-22 22:16:17 +08:00
|
|
|
The {bond} keyword applies a bond restraint to the specified atoms
|
|
|
|
using the same functional form used by the "bond_style
|
|
|
|
harmonic"_bond_harmonic.html command. The potential associated with
|
|
|
|
the restraint is
|
|
|
|
|
|
|
|
:c,image(Eqs/bond_harmonic.jpg)
|
|
|
|
|
|
|
|
with the following coefficients:
|
|
|
|
|
|
|
|
K (energy/distance^2)
|
|
|
|
r0 (distance) :ul
|
|
|
|
|
|
|
|
K and r0 are specified with the fix. Note that the usual 1/2 factor
|
|
|
|
is included in K.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
The {angle} keyword applies an angle restraint to the specified atoms
|
|
|
|
using the same functional form used by the "angle_style
|
|
|
|
harmonic"_angle_harmonic.html command. The potential associated with
|
|
|
|
the restraint is
|
|
|
|
|
|
|
|
:c,image(Eqs/angle_harmonic.jpg)
|
|
|
|
|
|
|
|
with the following coefficients:
|
|
|
|
|
|
|
|
K (energy/radian^2)
|
|
|
|
theta0 (degrees) :ul
|
|
|
|
|
|
|
|
K and theta0 are specified with the fix. Note that the usual 1/2
|
|
|
|
factor is included in K.
|
|
|
|
|
|
|
|
:line
|
|
|
|
|
2011-08-25 23:07:08 +08:00
|
|
|
The {dihedral} keyword applies a dihedral restraint to the specified
|
2012-05-22 22:16:17 +08:00
|
|
|
atoms using a simplified form of the function used by the
|
|
|
|
"dihedral_style charmm"_dihedral_charmm.html command. The potential
|
|
|
|
associated with the restraint is
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
:c,image(Eqs/dihedral_charmm.jpg)
|
|
|
|
|
|
|
|
with the following coefficients:
|
|
|
|
|
2012-05-22 22:16:17 +08:00
|
|
|
K (energy)
|
2011-08-25 23:07:08 +08:00
|
|
|
n = 1
|
2012-05-22 22:16:17 +08:00
|
|
|
d (degrees) = phi0 + 180 :ul
|
|
|
|
|
|
|
|
K and phi0 are specified with the fix. Note that the value of n is
|
|
|
|
hard-wired to 1. Also note that the energy will be a minimum when the
|
|
|
|
current dihedral angle phi is equal to phi0.
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
:line
|
|
|
|
|
|
|
|
[Restart, fix_modify, output, run start/stop, minimize info:]
|
|
|
|
|
|
|
|
No information about this fix is written to "binary restart
|
|
|
|
files"_restart.html.
|
|
|
|
|
|
|
|
The "fix_modify"_fix_modify.html {energy} option is supported by this
|
|
|
|
fix to add the potential energy associated with this fix to the
|
|
|
|
system's potential energy as part of "thermodynamic
|
|
|
|
output"_thermo_style.html.
|
|
|
|
|
|
|
|
IMPORTANT NOTE: If you want the fictitious potential energy associated
|
|
|
|
with the added forces to be included in the total potential energy of
|
|
|
|
the system (the quantity being minimized), you MUST enable the
|
|
|
|
"fix_modify"_fix_modify.html {energy} option for this fix.
|
|
|
|
|
|
|
|
This fix computes a global scalar, which can be accessed by various
|
2011-08-26 01:01:01 +08:00
|
|
|
"output commands"_Section_howto.html#howto_15. The scalar is the
|
2012-05-22 22:16:17 +08:00
|
|
|
potential energy for all the restraints as discussed above. The scalar
|
|
|
|
value calculated by this fix is "extensive".
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
No parameter of this fix can be used with the {start/stop} keywords of
|
|
|
|
the "run"_run.html command.
|
|
|
|
|
2012-05-22 22:16:17 +08:00
|
|
|
[Restrictions:] none
|
2011-08-25 23:07:08 +08:00
|
|
|
|
|
|
|
[Related commands:] none
|
|
|
|
|
|
|
|
[Default:] none
|