forked from lijiext/lammps
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
"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
|