diff --git a/doc/Section_commands.html b/doc/Section_commands.html index c4c098ae64..a5fa3a0c1d 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -325,14 +325,14 @@ of each style or click on the style itself for a full description:
- - - - - - - - + + + + + + +
adaptaddforceaveforceave/atomave/correlateave/histoave/spatialave/time
bond/breakbond/createbond/swapbox/relaxdeformdepositdragdt/reset
efieldenforce2devaporatefreezegravityheatindentlangevin
lineforcemomentummovemsstnphnph/aspherenph/spherenpt
npt/aspherenpt/spherenvenve/aspherenve/limitnve/noforcenve/spherenvt
nvt/aspherenvt/sllodnvt/sphereorient/fccplaneforcepoemspourpress/berendsen
printqeq/combreax/bondsrecenterrigidrigid/nverigid/nvtsetforce
shakespringspring/rgspring/selfstore/forcestore/statetemp/berendsentemp/rescale
thermal/conductivitytmdttmviscosityviscouswall/colloidwall/granwall/harmonic
wall/lj126wall/lj93wall/reflectwall/region +
efieldenforce2devaporateexternalfreezegravityheatindent
langevinlineforcemomentummovemsstnphnph/aspherenph/sphere
nptnpt/aspherenpt/spherenvenve/aspherenve/limitnve/noforcenve/sphere
nvtnvt/aspherenvt/sllodnvt/sphereorient/fccplaneforcepoemspour
press/berendsenprintqeq/combreax/bondsrecenterrigidrigid/nverigid/nvt
setforceshakespringspring/rgspring/selfstore/forcestore/statetemp/berendsen
temp/rescalethermal/conductivitytmdttmviscosityviscouswall/colloidwall/gran
wall/harmonicwall/lj126wall/lj93wall/reflectwall/region

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 377ec3d5d6..88e8806177 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -401,6 +401,7 @@ of each style or click on the style itself for a full description: "efield"_fix_efield.html, "enforce2d"_fix_enforce2d.html, "evaporate"_fix_evaporate.html, +"external"_fix_external.html, "freeze"_fix_freeze.html, "gravity"_fix_gravity.html, "heat"_fix_heat.html, diff --git a/doc/fix.html b/doc/fix.html index fc6e8828cc..b205d42b75 100644 --- a/doc/fix.html +++ b/doc/fix.html @@ -178,6 +178,7 @@ list of fix styles available in LAMMPS:

  • efield - impose electric field on system
  • enforce2d - zero out z-dimension velocity and force
  • evaporate - remove atoms from simulation periodically +
  • external - callback to an external driver program
  • freeze - freeze atoms in a granular simulation
  • gravity - add gravity to atoms in a granular simulation
  • heat - add/subtract momentum-conserving heat diff --git a/doc/fix.txt b/doc/fix.txt index 0ec33264f2..1c3d001ba4 100644 --- a/doc/fix.txt +++ b/doc/fix.txt @@ -173,6 +173,7 @@ list of fix styles available in LAMMPS: "efield"_fix_efield.html - impose electric field on system "enforce2d"_fix_enforce2d.html - zero out z-dimension velocity and force "evaporate"_fix_evaporate.html - remove atoms from simulation periodically +"external"_fix_external.html - callback to an external driver program "freeze"_fix_freeze.html - freeze atoms in a granular simulation "gravity"_fix_gravity.html - add gravity to atoms in a granular simulation "heat"_fix_heat.html - add/subtract momentum-conserving heat diff --git a/doc/fix_external.html b/doc/fix_external.html new file mode 100644 index 0000000000..5dad5b49aa --- /dev/null +++ b/doc/fix_external.html @@ -0,0 +1,76 @@ + +
    LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands +
    + + + + + + +
    + +

    fix external command +

    +

    Syntax: +

    +
    fix ID group-ID external 
    +
    + +

    Examples: +

    +
    fix 1 all external 
    +
    +

    Description: +

    +

    This fix makes a callback each timestep to an external driver program +that is using LAMMPS as a library. This is a way to let another +program compute forces on atoms which LAMMPS will include in its +dynamics performed by the run command. +

    +

    The callback function "foo" will be invoked every timestep as: +

    +
    foo(ptr,timestep,nlocal,ids,x,fexternal); 
    +
    +

    which has this prototype: +

    +

    void foo(void *, int, int, int *, double **, double **); +

    +

    The arguments are as follows: +

    + +

    Fexternal are the forces returned by the driver program, +which LAMMPS adds to the current force on each atom. +

    +

    See the couple/lammps_quest/lmpqst.cpp file in the LAMMPS distribution +for an example of a coupling application that uses this fix, and how +it makes a call to the fix to specify what function the fix should +callback to. The sample application performs classical MD using +quantum forces computed by a density functional code Quest. +

    + + +

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

    +

    No information about this fix is written to binary restart +files. None of the fix_modify options +are relevant to this fix. No global 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 not invoked during energy minimization. +

    +

    Restrictions: none +

    +

    Related commands: none +

    +

    Default: none +

    + diff --git a/doc/fix_external.txt b/doc/fix_external.txt new file mode 100644 index 0000000000..392b0b3431 --- /dev/null +++ b/doc/fix_external.txt @@ -0,0 +1,71 @@ +"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 external command :h3 + +[Syntax:] + +fix ID group-ID external :pre + +ID, group-ID are documented in "fix"_fix.html command +external = style name of this fix command :ul + +[Examples:] + +fix 1 all external :pre + +[Description:] + +This fix makes a callback each timestep to an external driver program +that is using LAMMPS as a library. This is a way to let another +program compute forces on atoms which LAMMPS will include in its +dynamics performed by the "run"_run.html command. + +The callback function "foo" will be invoked every timestep as: + +foo(ptr,timestep,nlocal,ids,x,fexternal); :pre + +which has this prototype: + +void foo(void *, int, int, int *, double **, double **); + +The arguments are as follows: + +ptr = pointer provided by and simply passed back to external driver +timestep = current LAMMPS timestep +nlocal = # of atoms on this processor +ids = list of atom IDs on this processor +x = coordinates of atoms on this processor +fexternal = forces on atoms on this processor :ul + +Fexternal are the forces returned by the driver program, +which LAMMPS adds to the current force on each atom. + +See the couple/lammps_quest/lmpqst.cpp file in the LAMMPS distribution +for an example of a coupling application that uses this fix, and how +it makes a call to the fix to specify what function the fix should +callback to. The sample application performs classical MD using +quantum forces computed by a density functional code "Quest"_quest. + +:link(quest,http://dft.sandia.gov/Quest) + +[Restart, fix_modify, output, run start/stop, minimize info:] + +No information about this fix is written to "binary restart +files"_restart.html. None of the "fix_modify"_fix_modify.html options +are relevant to this fix. No global 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 not invoked during "energy minimization"_minimize.html. + +[Restrictions:] none + +[Related commands:] none + +[Default:] none