diff --git a/doc/Section_commands.html b/doc/Section_commands.html index 9a321b0c1f..42b1b8386b 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -318,13 +318,13 @@ of each style or click on the style itself for a full description:

- - - - - - - + + + + + +
addforceaveforceave/atomave/spatialave/timebond/breakbond/createbond/swap
comcoord/originaldeformdepositdragdt/resetefieldenforce2d
freezegravitygyrationheatindentlangevinlineforcemsd
momentumnphnptnpt/aspherenpt/spherenvenve/aspherenve/limit
nve/noforcenve/spherenvtnvt/aspherenvt/sllodnvt/sphereorient/fccplaneforce
poemspourpress/berendsenprintrdfrecenterrigidsetforce
shakespringspring/rgspring/selftemp/berendsentemp/rescalethermal/conductivitytmd
viscosityviscouswall/granwall/lj126wall/lj93wall/reflectwiggle +
boxcomcoord/originaldeformdepositdragdt/resetefield
enforce2dfreezegravitygyrationheatindentlangevinlineforce
msdmomentumnphnptnpt/aspherenpt/spherenvenve/asphere
nve/limitnve/noforcenve/spherenvtnvt/aspherenvt/sllodnvt/sphereorient/fcc
planeforcepoemspourpress/berendsenprintrdfrecenterrigid
setforceshakespringspring/rgspring/selftemp/berendsentemp/rescalethermal/conductivity
tmdviscosityviscouswall/granwall/lj126wall/lj93wall/reflectwiggle

These are fix styles contributed by users, which can be used if diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index b339a5d509..70ebc71d82 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -383,6 +383,7 @@ of each style or click on the style itself for a full description: "bond/break"_fix_bond_break.html, "bond/create"_fix_bond_create.html, "bond/swap"_fix_bond_swap.html, +"box"_fix_box_relax.html, "com"_fix_com.html, "coord/original"_fix_coord_original.html, "deform"_fix_deform.html, diff --git a/doc/fix.html b/doc/fix.html index abb6410e7f..31e5333f7d 100644 --- a/doc/fix.html +++ b/doc/fix.html @@ -111,6 +111,7 @@ list of fix styles available in LAMMPS:

  • bond/break - break bonds on the fly
  • bond/create - create bonds on the fly
  • bond/swap - Monte Carlo bond swapping +
  • box/relax - relax box size during energy minimization
  • com - compute a center-of-mass
  • coord/original - store original coords of each atom
  • deform - change the simulation box size/shape diff --git a/doc/fix.txt b/doc/fix.txt index ba410b95ff..ebcb5069e0 100644 --- a/doc/fix.txt +++ b/doc/fix.txt @@ -108,6 +108,7 @@ list of fix styles available in LAMMPS: "bond/break"_fix_bond_break.html - break bonds on the fly "bond/create"_fix_bond_create.html - create bonds on the fly "bond/swap"_fix_bond_swap.html - Monte Carlo bond swapping +"box/relax"_fix_box_relax.html - relax box size during energy minimization "com"_fix_com.html - compute a center-of-mass "coord/original"_fix_coord_original.html - store original coords of each atom "deform"_fix_deform.html - change the simulation box size/shape diff --git a/doc/fix_box_relax.html b/doc/fix_box_relax.html new file mode 100644 index 0000000000..e07770d6c5 --- /dev/null +++ b/doc/fix_box_relax.html @@ -0,0 +1,176 @@ + +
    LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands +
    + + + + + + +
    + +

    fix box/relax command +

    +

    Syntax: +

    +
    fix ID group-ID box/relax style args keyword value ... 
    +
    + +

    Examples: +

    +
    fix 1 all box/relax xyz 0.0
    +fix 2 water box/relax aniso 0.0 0.0 1000.0 dilate partial 
    +
    +

    Description: +

    +

    Apply a pressure to the simulation box during an energy +minimization. This allows the box dimensions to vary +during the iterations of the minimizer so that the final configuration +will be both an energy minimum for the potential energy of the atoms +and the system pressure will be close to the desired pressure. +Conceptually, specifying a positive pressure is like squeezing on the +simulation box; a negative pressure typically allows the box to +expand. +

    +

    The pressure can be specified in one of several styles, as determined +by the style argument. +

    +

    Style xyz means couple all 3 dimensions together when pressure is +computed (isotropic pressure), and dilate/contract the 3 dimensions +together. Styles xy or yz or xz means that the 2 specified +dimensions are coupled together, both for pressure computation and for +dilation/contraction. The 3rd dimension dilates/contracts +independently according to its specified pressure. For style aniso, +all 3 dimensions dilate/contract independently according to the 3 +specified pressure values. +

    +

    For any of the styles except xyz, the target pressure for any +independent components (e.g. z in xy, or any dimension in aniso) +can be specified as NULL. This means that no pressure is applied to +that dimension so that the box dimension remains unchanged during the +minimization. +

    +

    For styles xy and yz and xz, the target pressures must be the +same for the two coupled dimensions and cannot be specified as NULL. +

    +

    For all pressure styles, the simulation box stays rectangular in +shape. Tilted boxes (triclinic symmetry) are supported by other +LAMMPS commands (see this section of the +manual), but not yet by this command. +

    +

    When the size of the simulation box changes, all atoms are re-scaled +to new positions, unless the keyword dilate is specified with a +value of partial, in which case only the atoms in the fix group are +re-scaled. This can be useful for leaving the coordinates of atoms in +a solid substrate unchanged and controlling the pressure of a +surrounding fluid. +

    +
    + +

    This fix computes a temperature and pressure each timestep. The +temperature is used to compute the kinetic contribution to the +pressure. Since atom velocities do not change during minimization, +that contribution will depend on what atom velocities are at the +beginning of the minimization procedure, and will remain constant. To +do this, the fix creates its own computes of style "temp" and +"pressure", as if these commands had been issued: +

    +
    compute fix-ID_temp group-ID temp
    +compute fix-ID_press group-ID pressure fix-ID_temp 
    +
    +

    See the compute temp and compute +pressure commands for details. Note that the +IDs of the new computes are the fix-ID + underscore + "temp" or fix_ID ++ underscore + "press", and the group for the new computes is the same +as the fix group. +

    +

    Note that these are NOT the computes used by thermodynamic output (see +the thermo_style command) with ID = thermo_temp +and thermo_press. This means you can change the attributes of this +fix's temperature or pressure via the +compute_modify command or print this temperature +or pressure during thermodynamic output via the thermo_style +custom command using the appropriate compute-ID. +It also means that changing attributes of thermo_temp or +thermo_press will have no effect on this fix. +

    +

    Like other fixes that perform thermostatting, this fix can be used +with compute commands that calculate a temperature +after removing a "bias" from the atom velocities. E.g. removing the +center-of-mass velocity from a group of atoms or only calculating +temperature on the x-component of velocity or only calculating +temperature for atoms in a geometric region. This is not done by +default, but only if the fix_modify command is used +to assign a temperature compute to this fix that includes such a bias +term. See the doc pages for individual compute +commands to determine which ones include a bias. +

    +
    + +

    Restart, fix_modify, output, run start/stop, minimize info: +

    +

    No information about this fix is written to binary restart +files. +

    +

    The fix_modify temp and press options are +supported by this fix. You can use them to assign a +compute you have defined to this fix which will be used +in its temperature and pressure calculation, as described above. If +you do this, note that the kinetic energy derived from the compute +temperature should be consistent with the virial term computed using +all atoms for the pressure. LAMMPS will warn you if you choose to +compute temperature on a subset of atoms. +

    +

    IMPORTANT NOTE: If both the temp and press keywords are used in a +single thermo_modify command (or in two separate commands), then the +order in which the keywords are specified is important. Note that a +pressure compute defines its own temperature +compute as an argument when it is specified. The temp keyword will +override this (for the pressure compute being used by fix npt), but +only if the temp keyword comes after the press keyword. If the +temp keyword comes before the press keyword, then the new pressure +compute specified by the press keyword will be unaffected by the +temp setting. +

    +

    No global scalar or vector or per-atom quantities are stored by this +fix for access by various output commands. +No parameter of this fix can be used with the start/stop keywords of +the run command. +

    +

    This fix is invoked during energy minimization, but +not for the purpose of adding a contribution to the energy or forces +being minimized. Instead it alters the box geometry as described +above. +

    +

    Restrictions: +

    +

    Any box dimension adjusted by this fix must be periodic. A dimension +whose target pressure is specified as NULL can be non-periodic or +periodic. +

    +

    Related commands: +

    +

    fix npt, minimize +

    +

    Default: +

    +

    The keyword default is dilate = all. +

    + diff --git a/doc/fix_box_relax.txt b/doc/fix_box_relax.txt new file mode 100644 index 0000000000..f13243ab22 --- /dev/null +++ b/doc/fix_box_relax.txt @@ -0,0 +1,165 @@ +"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 box/relax command :h3 + +[Syntax:] + +fix ID group-ID box/relax style args keyword value ... :pre + +ID, group-ID are documented in "fix"_fix.html command :ulb,l +box/relax = style name of this fix command :l +style = {xyz} or {xy} or {yz} or {xz} or {aniso} :l + {xyz} arg = P = desired pressure (pressure units) + {xy} or {yz} or {xz} or {aniso} args = Px Py Pz + Px,Py,Pz = desired pressure in x,y,z (pressure units) :pre + +zero or more keyword/value pairs may be appended to the args :l +keyword = {dilate} :l + {dilate} value = {all} or {partial} :pre +:ule + +[Examples:] + +fix 1 all box/relax xyz 0.0 +fix 2 water box/relax aniso 0.0 0.0 1000.0 dilate partial :pre + +[Description:] + +Apply a pressure to the simulation box during an "energy +minimization"_minimize.html. This allows the box dimensions to vary +during the iterations of the minimizer so that the final configuration +will be both an energy minimum for the potential energy of the atoms +and the system pressure will be close to the desired pressure. +Conceptually, specifying a positive pressure is like squeezing on the +simulation box; a negative pressure typically allows the box to +expand. + +The pressure can be specified in one of several styles, as determined +by the {style} argument. + +Style {xyz} means couple all 3 dimensions together when pressure is +computed (isotropic pressure), and dilate/contract the 3 dimensions +together. Styles {xy} or {yz} or {xz} means that the 2 specified +dimensions are coupled together, both for pressure computation and for +dilation/contraction. The 3rd dimension dilates/contracts +independently according to its specified pressure. For style {aniso}, +all 3 dimensions dilate/contract independently according to the 3 +specified pressure values. + +For any of the styles except {xyz}, the target pressure for any +independent components (e.g. z in {xy}, or any dimension in {aniso}) +can be specified as NULL. This means that no pressure is applied to +that dimension so that the box dimension remains unchanged during the +minimization. + +For styles {xy} and {yz} and {xz}, the target pressures must be the +same for the two coupled dimensions and cannot be specified as NULL. + +For all pressure styles, the simulation box stays rectangular in +shape. Tilted boxes (triclinic symmetry) are supported by other +LAMMPS commands (see "this section"_Section_howto.html#4_12 of the +manual), but not yet by this command. + +When the size of the simulation box changes, all atoms are re-scaled +to new positions, unless the keyword {dilate} is specified with a +value of {partial}, in which case only the atoms in the fix group are +re-scaled. This can be useful for leaving the coordinates of atoms in +a solid substrate unchanged and controlling the pressure of a +surrounding fluid. + +:line + +This fix computes a temperature and pressure each timestep. The +temperature is used to compute the kinetic contribution to the +pressure. Since atom velocities do not change during minimization, +that contribution will depend on what atom velocities are at the +beginning of the minimization procedure, and will remain constant. To +do this, the fix creates its own computes of style "temp" and +"pressure", as if these commands had been issued: + +compute fix-ID_temp group-ID temp +compute fix-ID_press group-ID pressure fix-ID_temp :pre + +See the "compute temp"_compute_temp.html and "compute +pressure"_compute_pressure.html commands for details. Note that the +IDs of the new computes are the fix-ID + underscore + "temp" or fix_ID ++ underscore + "press", and the group for the new computes is the same +as the fix group. + +Note that these are NOT the computes used by thermodynamic output (see +the "thermo_style"_thermo_style.html command) with ID = {thermo_temp} +and {thermo_press}. This means you can change the attributes of this +fix's temperature or pressure via the +"compute_modify"_compute_modify.html command or print this temperature +or pressure during thermodynamic output via the "thermo_style +custom"_thermo_style.html command using the appropriate compute-ID. +It also means that changing attributes of {thermo_temp} or +{thermo_press} will have no effect on this fix. + +Like other fixes that perform thermostatting, this fix can be used +with "compute commands"_compute.html that calculate a temperature +after removing a "bias" from the atom velocities. E.g. removing the +center-of-mass velocity from a group of atoms or only calculating +temperature on the x-component of velocity or only calculating +temperature for atoms in a geometric region. This is not done by +default, but only if the "fix_modify"_fix_modify.html command is used +to assign a temperature compute to this fix that includes such a bias +term. See the doc pages for individual "compute +commands"_compute.html to determine which ones include a bias. + +: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 {temp} and {press} options are +supported by this fix. You can use them to assign a +"compute"_compute.html you have defined to this fix which will be used +in its temperature and pressure calculation, as described above. If +you do this, note that the kinetic energy derived from the compute +temperature should be consistent with the virial term computed using +all atoms for the pressure. LAMMPS will warn you if you choose to +compute temperature on a subset of atoms. + +IMPORTANT NOTE: If both the {temp} and {press} keywords are used in a +single thermo_modify command (or in two separate commands), then the +order in which the keywords are specified is important. Note that a +"pressure compute"_compute_pressure.html defines its own temperature +compute as an argument when it is specified. The {temp} keyword will +override this (for the pressure compute being used by fix npt), but +only if the {temp} keyword comes after the {press} keyword. If the +{temp} keyword comes before the {press} keyword, then the new pressure +compute specified by the {press} keyword will be unaffected by the +{temp} setting. + +No global scalar or vector or per-atom quantities are stored by this +fix for access by various "output commands"_Section_howto.html#4_15. +No parameter of this fix can be used with the {start/stop} keywords of +the "run"_run.html command. + +This fix is invoked during "energy minimization"_minimize.html, but +not for the purpose of adding a contribution to the energy or forces +being minimized. Instead it alters the box geometry as described +above. + +[Restrictions:] + +Any box dimension adjusted by this fix must be periodic. A dimension +whose target pressure is specified as NULL can be non-periodic or +periodic. + +[Related commands:] + +"fix npt"_fix_nph.html, "minimize"_minimize.html + +[Default:] + +The keyword default is dilate = all.